Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ jobs:
lint:
runs-on: ubuntu-latest
env:
APPRAISAL_NAME: rack_only
BUNDLE_GEMFILE: ./gemfiles/rack_only.gemfile
APPRAISAL_NAME: rack_3
BUNDLE_GEMFILE: ./gemfiles/rack_3.gemfile
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2
ruby-version: 3.0.0
- uses: actions/cache@v4
with:
path: vendor/bundle
key: bundle-use-ruby-ubuntu-latest-2.7-rack_only-${{ hashFiles(format('{0}.lock', env.BUNDLE_GEMFILE)) }}
key: bundle-use-ruby-ubuntu-latest-3.0.0-rack_3-${{ hashFiles(format('{0}.lock', env.BUNDLE_GEMFILE)) }}
restore-keys: |
bundle-use-ruby-ubuntu-latest-2.7-rack_only
bundle-use-ruby-ubuntu-latest-3.0.0-rack_3
- name: bundle install
run: |
gem update --system
bundle config deployment true
bundle config path vendor/bundle
bundle install --jobs 4
Expand All @@ -42,8 +41,8 @@ jobs:
strategy:
fail-fast: false
matrix:
appraisal_name: [rack_only, rails_6_0, rails_6_1]
ruby: [2.7.5, 3.0.0]
appraisal_name: [rack_2, rack_3, rails_6_0, rails_6_1]
ruby: [3.0.0]
env:
APPRAISAL_NAME: ${{ matrix.appraisal_name }}
BUNDLE_GEMFILE: ${{ format('./gemfiles/{0}.gemfile', matrix.appraisal_name) }}
Expand All @@ -52,15 +51,14 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: vendor/bundle
key: bundle-use-ruby-ubuntu-latest-${{ matrix.ruby }}-${{ env.APPRAISAL_NAME }}-${{ hashFiles(format('{0}.lock', env.BUNDLE_GEMFILE)) }}
restore-keys: |
bundle-use-ruby-ubuntu-latest-${{ matrix.ruby }}-${{ env.APPRAISAL_NAME }}
- name: bundle install
run: |
gem update --system
bundle config deployment true
bundle config path vendor/bundle
bundle install --jobs 4
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AllCops:
- Appraisals
- "bin/*"
- "gemfiles/**/*"
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0

Bundler/OrderedGems:
Enabled: false
Expand Down Expand Up @@ -174,6 +174,9 @@ Style/IfWithBooleanLiteralBranches:
Style/Lambda:
Enabled: false

Style/LambdaCall:
Enabled: false

Style/MultilineBlockChain:
Enabled: false

Expand Down
7 changes: 6 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# frozen_string_literal: true

appraise "rack_only" do
appraise "rack_2" do
gem "rack", ">= 2.2", "< 3"
end

appraise "rack_3" do
gem "rack", ">= 3", "< 4"
end

appraise "rails_6_0" do
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ gem "keycloak_rack", "1.0.0"

### Ruby & Rails Versions

- Ruby 2.7, 3.0
- Rails 6.0, 6.1, or using only Rack 2.2

It has also been tested on Rails 5.2, but isn't officially supported because it doesn't support Ruby 3.

At minimum, it requires Ruby 2.7, because it makes use of [pattern matching](https://docs.ruby-lang.org/en/3.0.0/doc/syntax/pattern_matching_rdoc.html).
If you find the warning at boot annoying (I sure do), you can set `RUBYOPT='-W:no-experimental'` in your environment to silence the nag.
- Ruby 3.0+
- Rails 6.0, 6.1, 7.0, 7.1, or using only Rack 2.2+ or 3.x

## Basic Usage in Rails

Expand Down
7 changes: 7 additions & 0 deletions gemfiles/rack_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rack", ">= 2.2", "< 3"

gemspec path: "../"
189 changes: 111 additions & 78 deletions gemfiles/rack_only.gemfile.lock → gemfiles/rack_2.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
keycloak_rack (1.1.0)
keycloak_rack (1.2.0)
activesupport (>= 4.2)
anyway_config (>= 2.1.0, < 3)
dry-auto_inject
Expand All @@ -14,108 +14,136 @@ PATH
dry-types (>= 1, < 2)
dry-validation
jwt (>= 2.2.0, < 3)
rack (>= 2.0.0, < 3)
rack (>= 2.0.0, < 4)
zeitwerk (>= 2.0.0, < 3)

GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.2)
activesupport (7.1.5.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
anyway_config (2.2.3)
ruby-next-core (>= 0.14.0)
appraisal (2.4.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
anyway_config (2.7.2)
ruby-next-core (~> 1.0)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
backports (3.23.0)
ast (2.4.3)
backports (3.25.1)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.2)
coderay (1.1.3)
concurrent-ruby (1.1.9)
crack (0.4.5)
concurrent-ruby (1.3.5)
connection_pool (2.5.3)
crack (1.0.0)
bigdecimal
rexml
diff-lcs (1.5.0)
docile (1.4.0)
dry-auto_inject (0.9.0)
dry-container (>= 0.3.4)
dry-configurable (0.14.0)
diff-lcs (1.6.2)
docile (1.4.1)
drb (2.2.3)
dry-auto_inject (1.0.1)
dry-core (~> 1.0)
zeitwerk (~> 2.6)
dry-configurable (1.2.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-container (0.11.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.6)
dry-container (0.9.0)
dry-core (1.0.2)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.13, >= 0.13.0)
dry-core (0.7.1)
logger
zeitwerk (~> 2.6)
dry-effects (0.4.1)
concurrent-ruby (~> 1.0)
dry-effects (0.2.0)
concurrent-ruby (~> 1.0)
dry-container (~> 0.7, >= 0.7.2)
dry-core (~> 0.5, >= 0.5)
dry-inflector (~> 0.1, >= 0.1.2)
dry-core (~> 1.0)
dry-inflector (~> 1.0)
dry-initializer (~> 3.0)
dry-inflector (0.2.1)
zeitwerk (~> 2.6)
dry-inflector (1.1.0)
dry-initializer (3.1.1)
dry-logic (1.2.0)
dry-logic (1.5.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.5, >= 0.5)
dry-matcher (0.9.0)
dry-core (~> 0.4, >= 0.4.8)
dry-monads (1.4.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-matcher (1.0.0)
dry-core (~> 1.0, < 2)
dry-monads (1.6.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.7)
dry-schema (1.8.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-schema (1.13.4)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.13, >= 0.13.0)
dry-core (~> 0.5, >= 0.5)
dry-configurable (~> 1.0, >= 1.0.1)
dry-core (~> 1.0, < 2)
dry-initializer (~> 3.0)
dry-logic (~> 1.0)
dry-types (~> 1.5)
dry-struct (1.4.0)
dry-core (~> 0.5, >= 0.5)
dry-types (~> 1.5)
dry-logic (>= 1.4, < 2)
dry-types (>= 1.7, < 2)
zeitwerk (~> 2.6)
dry-struct (1.6.0)
dry-core (~> 1.0, < 2)
dry-types (>= 1.7, < 2)
ice_nine (~> 0.11)
dry-types (1.5.1)
zeitwerk (~> 2.6)
dry-types (1.7.2)
bigdecimal (~> 3.0)
concurrent-ruby (~> 1.0)
dry-container (~> 0.3)
dry-core (~> 0.5, >= 0.5)
dry-inflector (~> 0.1, >= 0.1.2)
dry-logic (~> 1.0, >= 1.0.2)
dry-validation (1.7.0)
dry-core (~> 1.0)
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
dry-validation (1.10.0)
concurrent-ruby (~> 1.0)
dry-container (~> 0.7, >= 0.7.1)
dry-core (~> 0.5, >= 0.5)
dry-core (~> 1.0, < 2)
dry-initializer (~> 3.0)
dry-schema (~> 1.8, >= 1.8.0)
dry-schema (>= 1.12, < 2)
zeitwerk (~> 2.6)
factory_bot (6.1.0)
activesupport (>= 5.0.0)
faker (2.19.0)
i18n (>= 1.6, < 2)
hashdiff (1.0.1)
i18n (1.9.1)
hashdiff (1.2.0)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jwt (2.3.0)
method_source (1.0.0)
minitest (5.15.0)
parallel (1.21.0)
parser (3.1.0.0)
jwt (2.10.2)
base64
logger (1.7.0)
method_source (1.1.0)
minitest (5.25.5)
mutex_m (0.3.0)
ostruct (0.6.3)
parallel (1.27.0)
parser (3.3.9.0)
ast (~> 2.4.1)
racc
prism (1.4.0)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
public_suffix (6.0.2)
racc (1.8.1)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-test (2.2.0)
rack (>= 1.3)
rainbow (3.1.1)
rake (13.0.6)
redcarpet (3.5.1)
regexp_parser (2.2.0)
rexml (3.2.5)
rake (13.3.0)
redcarpet (3.6.1)
regexp_parser (2.11.0)
rexml (3.4.1)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
Expand All @@ -139,56 +167,61 @@ GEM
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.15.1)
parser (>= 3.0.1.1)
rubocop-ast (1.46.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-rake (0.5.1)
rubocop
rubocop-rspec (2.3.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
ruby-next-core (0.14.1)
ruby-progressbar (1.11.0)
ruby-next-core (1.1.2)
ruby-progressbar (1.13.0)
securerandom (0.3.2)
set (1.1.2)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
thor (1.2.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
thor (1.4.0)
timecop (0.9.4)
tzinfo (2.0.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
unicode-display_width (2.6.0)
webmock (3.12.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
yard (0.9.26)
yard-junk (0.0.9)
yard-junk (0.0.10)
backports (>= 3.18)
ostruct
rainbow
yard
zeitwerk (2.5.4)
zeitwerk (2.6.18)

PLATFORMS
ruby
x86_64-darwin-19
x86_64-linux

DEPENDENCIES
appraisal (= 2.4.0)
appraisal (= 2.5.0)
factory_bot (~> 6.1.0)
faker (= 2.19.0)
keycloak_rack!
pry (= 0.14.1)
rack-test (= 1.1.0)
rack (>= 2.2, < 3)
rack-test (= 2.2.0)
rake (>= 13, < 14)
redcarpet
rspec (= 3.10.0)
rspec-json_expectations (= 2.2.0)
rubocop (= 1.13.0)
rubocop-rake (= 0.5.1)
rubocop-rspec (= 2.3.0)
set (= 1.1.2)
simplecov (= 0.21.2)
timecop (= 0.9.4)
webmock (= 3.12.2)
Expand Down
Loading