Skip to content

Commit 74f8239

Browse files
authored
Create v0.6.0 (#1)
* Update * Fix cop offences in existing source * Add specs Based on the devise-jwt test suite * Rename and update readme * Add actions workflow * Downgrade rails and add rubocop rake task * Fix migrations * Update to support ruby 2.7 and rails 7.1 * Separate rubocop * Fix rubocop ruby version * Perhaps fix rubocop * Actually fix rubocop * Add LICENSE, update gemspec files, and add gem push workflow
1 parent 10e0591 commit 74f8239

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2566
-224
lines changed

.github/workflows/ci.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Lint and Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
ruby: ['2.7', '3.0', '3.1', '3.2']
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Ruby ${{ matrix.ruby }}
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: ${{ matrix.ruby }}
22+
bundler-cache: true
23+
- name: Run Spec
24+
run: bundle exec rake spec
25+
26+
lint:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
name: Checkout Repository
31+
32+
- uses: ruby/setup-ruby@v1
33+
name: Setup Ruby
34+
with:
35+
ruby-version: 3.2
36+
bundler-cache: true
37+
38+
- name: Rubocop
39+
uses: reviewdog/action-rubocop@v2
40+
with:
41+
skip_install: true
42+
use_bundler: true
43+
rubocop_version: gemfile
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
fail_level: error

.github/workflows/gem-push.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Push Gem
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build:
10+
name: Build + Publish
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
bundler-cache: true
19+
20+
- name: Publish to RubyGems
21+
run: |
22+
mkdir -p $HOME/.gem
23+
touch $HOME/.gem/credentials
24+
chmod 0600 $HOME/.gem/credentials
25+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
26+
gem build *.gemspec
27+
gem push *.gem
28+
env:
29+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
*.gem
1+
*.gem
2+
coverage/
3+
.idea/

.rspec

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format documentation
2+
--color
3+
--require rails_helper

.rubocop.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
inherit_gem:
2+
mlh-rubocop-config: .rubocop.yml
3+
4+
AllCops:
5+
# Ruby 2.7 is the MINIMUM Ruby version supported
6+
TargetRubyVersion: '2.7.0'
7+
Exclude:
8+
- vendor/**/*
9+
- spec/fixtures/rails_app/bin/**/*
10+
- spec/fixtures/rails_app/db/schema.rb
11+
- spec/fixtures/rails_app/vendor/**/*
12+
NewCops: disable
13+
SuggestExtensions: false
14+
15+
Rails/TimeZone:
16+
Enabled: false

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5.7
1+
ruby-2.7.8

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
gemspec

0 commit comments

Comments
 (0)