From 23f00d57b4250a34df85c2339a9ed5e59de76067 Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:04:48 +1200 Subject: [PATCH 01/10] fix compatibility issues with rack 3 - it's possible for `rack.input` to be `nil` in rack 3, which means that we can't always assume that the body is readable and need to do a nil check. See https://github.com/rack/rack/blob/main/CHANGELOG.md#spec-changes. - in Rack 3, the body is not automatically rewound after reading, so we need to rewind it manually. See https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md#rackinput-is-no-longer-rewound-after-consuming-form-and-multipart-data --- lib/jwt_signed_request/verify.rb | 3 +++ spec/jwt_signed_request/verify_spec.rb | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lib/jwt_signed_request/verify.rb b/lib/jwt_signed_request/verify.rb index 427e411..071692c 100644 --- a/lib/jwt_signed_request/verify.rb +++ b/lib/jwt_signed_request/verify.rb @@ -109,6 +109,9 @@ def verify_request! end def request_body + return '' if request.body.nil? + + request.body.rewind string = request.body.read request.body.rewind string diff --git a/spec/jwt_signed_request/verify_spec.rb b/spec/jwt_signed_request/verify_spec.rb index 2210025..d8982c3 100644 --- a/spec/jwt_signed_request/verify_spec.rb +++ b/spec/jwt_signed_request/verify_spec.rb @@ -221,6 +221,21 @@ expect(request.body.read).to eq 'data=body' end + context 'and the body has already been read' do + before do + body.read + end + + it 'does not raise any errors' do + expect { verify_request }.not_to raise_error + end + + it 'allows the body to be read' do + verify_request + expect(request.body.read).to eq 'data=body' + end + end + context 'when secret key and algorithm are unspecified' do subject(:verify_request) { described_class.call(request: request) } From 738da816913e64d0648cb7ae35bfab33521081fd Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:12:12 +1200 Subject: [PATCH 02/10] add tests for rack 2 & 3 --- .github/workflows/test.yml | 2 +- Appraisals | 13 ++++++++++++- gemfiles/rack_2.2.0.gemfile | 8 ++++++++ gemfiles/rack_3.0.0.gemfile | 8 ++++++++ gemfiles/rack_3.1.0.gemfile | 8 ++++++++ 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 gemfiles/rack_2.2.0.gemfile create mode 100644 gemfiles/rack_3.0.0.gemfile create mode 100644 gemfiles/rack_3.1.0.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c736c7..3cfcc50 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3' ] - gemfile: [ 'faraday_1.10.0', 'faraday_2.1.0', 'faraday_2.2.0', 'faraday_2.3.0', 'jwt_1.5.6', 'jwt_2.2.3', 'jwt_2.3.0', 'jwt_2.4.1' ] + gemfile: [ 'faraday_1.10.0', 'faraday_2.1.0', 'faraday_2.2.0', 'faraday_2.3.0', 'jwt_1.5.6', 'jwt_2.2.3', 'jwt_2.3.0', 'jwt_2.4.1', 'rack_2.2.0', 'rack_3.0.0', 'rack_3.1.0' ] exclude: - { ruby: '2.4', gemfile: 'faraday_2.1.0' } - { ruby: '2.4', gemfile: 'faraday_2.2.0' } diff --git a/Appraisals b/Appraisals index 7fdbc1d..02d61eb 100644 --- a/Appraisals +++ b/Appraisals @@ -22,6 +22,17 @@ end 2.3.0 ].each do |faraday_version| appraise "faraday-#{faraday_version}" do - gem "faraday", faraday_version, require: false + end +end + +# Latest Rack minor versions +# Source: https://rubygems.org/gems/rack/versions +%w[ + 2.2.0 + 3.0.0 + 3.1.0 +].each do |rack_version| + appraise "rack-#{rack_version}" do + gem 'rack', "~> #{rack_version}" end end diff --git a/gemfiles/rack_2.2.0.gemfile b/gemfiles/rack_2.2.0.gemfile new file mode 100644 index 0000000..7149628 --- /dev/null +++ b/gemfiles/rack_2.2.0.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "faraday", require: false +gem "rack", "~> 2.2.0" + +gemspec path: "../" diff --git a/gemfiles/rack_3.0.0.gemfile b/gemfiles/rack_3.0.0.gemfile new file mode 100644 index 0000000..7519ac2 --- /dev/null +++ b/gemfiles/rack_3.0.0.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "faraday", require: false +gem "rack", "~> 3.0.0" + +gemspec path: "../" diff --git a/gemfiles/rack_3.1.0.gemfile b/gemfiles/rack_3.1.0.gemfile new file mode 100644 index 0000000..b78a2e9 --- /dev/null +++ b/gemfiles/rack_3.1.0.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "faraday", require: false +gem "rack", "~> 3.1.0" + +gemspec path: "../" From 2be4336426b6cce296aab1292c1f089cd9e2dcfc Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:14:35 +1200 Subject: [PATCH 03/10] update appraisal gemfiles to be for latest minor versions currently, they're for fixed minor versions and this breaks things like testing older versions of faraday against older versions of rails. --- Appraisals | 9 +++++---- gemfiles/faraday_1.10.0.gemfile | 2 +- gemfiles/faraday_2.1.0.gemfile | 2 +- gemfiles/faraday_2.2.0.gemfile | 2 +- gemfiles/faraday_2.3.0.gemfile | 2 +- gemfiles/{jwt_1.5.6.gemfile => jwt_1.5.0.gemfile} | 2 +- gemfiles/{jwt_2.2.3.gemfile => jwt_2.2.0.gemfile} | 2 +- gemfiles/jwt_2.3.0.gemfile | 2 +- gemfiles/{jwt_2.4.1.gemfile => jwt_2.4.0.gemfile} | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) rename gemfiles/{jwt_1.5.6.gemfile => jwt_1.5.0.gemfile} (84%) rename gemfiles/{jwt_2.2.3.gemfile => jwt_2.2.0.gemfile} (84%) rename gemfiles/{jwt_2.4.1.gemfile => jwt_2.4.0.gemfile} (84%) diff --git a/Appraisals b/Appraisals index 02d61eb..1ab5d1a 100644 --- a/Appraisals +++ b/Appraisals @@ -3,13 +3,13 @@ # Latest JWT minor versions # Source: https://rubygems.org/gems/jwt/versions %w[ - 1.5.6 - 2.2.3 + 1.5.0 + 2.2.0 2.3.0 - 2.4.1 + 2.4.0 ].each do |jwt_version| appraise "jwt-#{jwt_version}" do - gem "jwt", jwt_version + gem 'jwt', "~> #{jwt_version}" end end @@ -22,6 +22,7 @@ end 2.3.0 ].each do |faraday_version| appraise "faraday-#{faraday_version}" do + gem 'faraday', "~> #{faraday_version}", require: false end end diff --git a/gemfiles/faraday_1.10.0.gemfile b/gemfiles/faraday_1.10.0.gemfile index f24e3ac..59e475f 100644 --- a/gemfiles/faraday_1.10.0.gemfile +++ b/gemfiles/faraday_1.10.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "faraday", "1.10.0", require: false +gem "faraday", "~> 1.10.0", require: false gemspec path: "../" diff --git a/gemfiles/faraday_2.1.0.gemfile b/gemfiles/faraday_2.1.0.gemfile index f0d4fdf..1f3a2a5 100644 --- a/gemfiles/faraday_2.1.0.gemfile +++ b/gemfiles/faraday_2.1.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "faraday", "2.1.0", require: false +gem "faraday", "~> 2.1.0", require: false gemspec path: "../" diff --git a/gemfiles/faraday_2.2.0.gemfile b/gemfiles/faraday_2.2.0.gemfile index beb2844..c3160cb 100644 --- a/gemfiles/faraday_2.2.0.gemfile +++ b/gemfiles/faraday_2.2.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "faraday", "2.2.0", require: false +gem "faraday", "~> 2.2.0", require: false gemspec path: "../" diff --git a/gemfiles/faraday_2.3.0.gemfile b/gemfiles/faraday_2.3.0.gemfile index 251836a..a791996 100644 --- a/gemfiles/faraday_2.3.0.gemfile +++ b/gemfiles/faraday_2.3.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "faraday", "2.3.0", require: false +gem "faraday", "~> 2.3.0", require: false gemspec path: "../" diff --git a/gemfiles/jwt_1.5.6.gemfile b/gemfiles/jwt_1.5.0.gemfile similarity index 84% rename from gemfiles/jwt_1.5.6.gemfile rename to gemfiles/jwt_1.5.0.gemfile index 95f4e7d..4e04c07 100644 --- a/gemfiles/jwt_1.5.6.gemfile +++ b/gemfiles/jwt_1.5.0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "faraday", require: false -gem "jwt", "1.5.6" +gem "jwt", "~> 1.5.0" gemspec path: "../" diff --git a/gemfiles/jwt_2.2.3.gemfile b/gemfiles/jwt_2.2.0.gemfile similarity index 84% rename from gemfiles/jwt_2.2.3.gemfile rename to gemfiles/jwt_2.2.0.gemfile index 8268df3..454e37d 100644 --- a/gemfiles/jwt_2.2.3.gemfile +++ b/gemfiles/jwt_2.2.0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "faraday", require: false -gem "jwt", "2.2.3" +gem "jwt", "~> 2.2.0" gemspec path: "../" diff --git a/gemfiles/jwt_2.3.0.gemfile b/gemfiles/jwt_2.3.0.gemfile index e04c6d4..d2de1c9 100644 --- a/gemfiles/jwt_2.3.0.gemfile +++ b/gemfiles/jwt_2.3.0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "faraday", require: false -gem "jwt", "2.3.0" +gem "jwt", "~> 2.3.0" gemspec path: "../" diff --git a/gemfiles/jwt_2.4.1.gemfile b/gemfiles/jwt_2.4.0.gemfile similarity index 84% rename from gemfiles/jwt_2.4.1.gemfile rename to gemfiles/jwt_2.4.0.gemfile index 559e6b8..60d83a1 100644 --- a/gemfiles/jwt_2.4.1.gemfile +++ b/gemfiles/jwt_2.4.0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "faraday", require: false -gem "jwt", "2.4.1" +gem "jwt", "~> 2.4.0" gemspec path: "../" From e2ba7d09a29edc9e22bae3e411d560cd5de6d833 Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:16:14 +1200 Subject: [PATCH 04/10] update readme adding details on how to get appraisals setup --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 0d0986e..f0b2a11 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,12 @@ Configured versions are defined in [Appraisals](./Appraisals), which at time of ].each do |jwt_version| ``` +Ensure you set up your local environment by running: + +```sh +bundle exec appraisal install +``` + Run the test suite like this: ```sh From 8908a8ba0fe67928dba0772da3e1502c6fa0e78d Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:27:52 +1200 Subject: [PATCH 05/10] update supported versions of gems to 3 latest --- .github/workflows/test.yml | 18 ++++++++++-------- Appraisals | 13 +++++++------ ...ay_2.3.0.gemfile => faraday_2.10.0.gemfile} | 2 +- ...day_2.1.0.gemfile => faraday_2.8.0.gemfile} | 2 +- ...day_2.2.0.gemfile => faraday_2.9.0.gemfile} | 2 +- .../{jwt_2.3.0.gemfile => jwt_2.6.0.gemfile} | 2 +- .../{jwt_2.4.0.gemfile => jwt_2.7.0.gemfile} | 2 +- .../{jwt_2.2.0.gemfile => jwt_2.8.0.gemfile} | 2 +- gemfiles/rack_2.1.0.gemfile | 8 ++++++++ 9 files changed, 31 insertions(+), 20 deletions(-) rename gemfiles/{faraday_2.3.0.gemfile => faraday_2.10.0.gemfile} (68%) rename gemfiles/{faraday_2.1.0.gemfile => faraday_2.8.0.gemfile} (68%) rename gemfiles/{faraday_2.2.0.gemfile => faraday_2.9.0.gemfile} (68%) rename gemfiles/{jwt_2.3.0.gemfile => jwt_2.6.0.gemfile} (84%) rename gemfiles/{jwt_2.4.0.gemfile => jwt_2.7.0.gemfile} (84%) rename gemfiles/{jwt_2.2.0.gemfile => jwt_2.8.0.gemfile} (84%) create mode 100644 gemfiles/rack_2.1.0.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cfcc50..53b7d79 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,15 +9,17 @@ jobs: fail-fast: false matrix: ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3' ] - gemfile: [ 'faraday_1.10.0', 'faraday_2.1.0', 'faraday_2.2.0', 'faraday_2.3.0', 'jwt_1.5.6', 'jwt_2.2.3', 'jwt_2.3.0', 'jwt_2.4.1', 'rack_2.2.0', 'rack_3.0.0', 'rack_3.1.0' ] + gemfile: [ 'faraday_1.10.0', 'faraday_2.8.0', 'faraday_2.9.0', 'faraday_2.10.0', 'jwt_1.5.0', 'jwt_2.6.0', 'jwt_2.7.0', 'jwt_2.8.0', 'rack_2.1.0', 'rack_2.2.0', 'rack_3.0.0', 'rack_3.1.0' ] exclude: - - { ruby: '2.4', gemfile: 'faraday_2.1.0' } - - { ruby: '2.4', gemfile: 'faraday_2.2.0' } - - { ruby: '2.4', gemfile: 'faraday_2.3.0' } - - { ruby: '2.4', gemfile: 'jwt_2.4.1' } - - { ruby: '2.5', gemfile: 'faraday_2.1.0' } - - { ruby: '2.5', gemfile: 'faraday_2.2.0' } - - { ruby: '2.5', gemfile: 'faraday_2.3.0' } + - { ruby: '2.4', gemfile: 'faraday_2.8.0' } + - { ruby: '2.4', gemfile: 'faraday_2.9.0' } + - { ruby: '2.4', gemfile: 'faraday_2.10.0' } + - { ruby: '2.4', gemfile: 'jwt_2.6.0' } + - { ruby: '2.4', gemfile: 'jwt_2.7.0' } + - { ruby: '2.4', gemfile: 'jwt_2.8.0' } + - { ruby: '2.5', gemfile: 'faraday_2.8.0' } + - { ruby: '2.5', gemfile: 'faraday_2.9.0' } + - { ruby: '2.5', gemfile: 'faraday_2.10.0' } - { ruby: '3.0', gemfile: 'faraday_1.10.0' } - { ruby: '3.1', gemfile: 'faraday_1.10.0' } - { ruby: '3.2', gemfile: 'faraday_1.10.0' } diff --git a/Appraisals b/Appraisals index 1ab5d1a..33ab6a8 100644 --- a/Appraisals +++ b/Appraisals @@ -4,9 +4,9 @@ # Source: https://rubygems.org/gems/jwt/versions %w[ 1.5.0 - 2.2.0 - 2.3.0 - 2.4.0 + 2.6.0 + 2.7.0 + 2.8.0 ].each do |jwt_version| appraise "jwt-#{jwt_version}" do gem 'jwt', "~> #{jwt_version}" @@ -17,9 +17,9 @@ end # Source: https://rubygems.org/gems/faraday/versions %w[ 1.10.0 - 2.1.0 - 2.2.0 - 2.3.0 + 2.8.0 + 2.9.0 + 2.10.0 ].each do |faraday_version| appraise "faraday-#{faraday_version}" do gem 'faraday', "~> #{faraday_version}", require: false @@ -29,6 +29,7 @@ end # Latest Rack minor versions # Source: https://rubygems.org/gems/rack/versions %w[ + 2.1.0 2.2.0 3.0.0 3.1.0 diff --git a/gemfiles/faraday_2.3.0.gemfile b/gemfiles/faraday_2.10.0.gemfile similarity index 68% rename from gemfiles/faraday_2.3.0.gemfile rename to gemfiles/faraday_2.10.0.gemfile index a791996..951bc58 100644 --- a/gemfiles/faraday_2.3.0.gemfile +++ b/gemfiles/faraday_2.10.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "faraday", "~> 2.3.0", require: false +gem "faraday", "~> 2.10.0", require: false gemspec path: "../" diff --git a/gemfiles/faraday_2.1.0.gemfile b/gemfiles/faraday_2.8.0.gemfile similarity index 68% rename from gemfiles/faraday_2.1.0.gemfile rename to gemfiles/faraday_2.8.0.gemfile index 1f3a2a5..a5c460f 100644 --- a/gemfiles/faraday_2.1.0.gemfile +++ b/gemfiles/faraday_2.8.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "faraday", "~> 2.1.0", require: false +gem "faraday", "~> 2.8.0", require: false gemspec path: "../" diff --git a/gemfiles/faraday_2.2.0.gemfile b/gemfiles/faraday_2.9.0.gemfile similarity index 68% rename from gemfiles/faraday_2.2.0.gemfile rename to gemfiles/faraday_2.9.0.gemfile index c3160cb..da2c02d 100644 --- a/gemfiles/faraday_2.2.0.gemfile +++ b/gemfiles/faraday_2.9.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "faraday", "~> 2.2.0", require: false +gem "faraday", "~> 2.9.0", require: false gemspec path: "../" diff --git a/gemfiles/jwt_2.3.0.gemfile b/gemfiles/jwt_2.6.0.gemfile similarity index 84% rename from gemfiles/jwt_2.3.0.gemfile rename to gemfiles/jwt_2.6.0.gemfile index d2de1c9..5cdd4cd 100644 --- a/gemfiles/jwt_2.3.0.gemfile +++ b/gemfiles/jwt_2.6.0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "faraday", require: false -gem "jwt", "~> 2.3.0" +gem "jwt", "~> 2.6.0" gemspec path: "../" diff --git a/gemfiles/jwt_2.4.0.gemfile b/gemfiles/jwt_2.7.0.gemfile similarity index 84% rename from gemfiles/jwt_2.4.0.gemfile rename to gemfiles/jwt_2.7.0.gemfile index 60d83a1..3461689 100644 --- a/gemfiles/jwt_2.4.0.gemfile +++ b/gemfiles/jwt_2.7.0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "faraday", require: false -gem "jwt", "~> 2.4.0" +gem "jwt", "~> 2.7.0" gemspec path: "../" diff --git a/gemfiles/jwt_2.2.0.gemfile b/gemfiles/jwt_2.8.0.gemfile similarity index 84% rename from gemfiles/jwt_2.2.0.gemfile rename to gemfiles/jwt_2.8.0.gemfile index 454e37d..8df1e16 100644 --- a/gemfiles/jwt_2.2.0.gemfile +++ b/gemfiles/jwt_2.8.0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "faraday", require: false -gem "jwt", "~> 2.2.0" +gem "jwt", "~> 2.8.0" gemspec path: "../" diff --git a/gemfiles/rack_2.1.0.gemfile b/gemfiles/rack_2.1.0.gemfile new file mode 100644 index 0000000..88faa5b --- /dev/null +++ b/gemfiles/rack_2.1.0.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "faraday", require: false +gem "rack", "~> 2.1.0" + +gemspec path: "../" From 70bf02e923923ae8fcc9e9b9c36eb9da8140c445 Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:30:34 +1200 Subject: [PATCH 06/10] drop support for ruby 2.4 & 2.5 --- .github/workflows/test.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 53b7d79..2f8cfcb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,18 +8,9 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3' ] + ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2', '3.3' ] gemfile: [ 'faraday_1.10.0', 'faraday_2.8.0', 'faraday_2.9.0', 'faraday_2.10.0', 'jwt_1.5.0', 'jwt_2.6.0', 'jwt_2.7.0', 'jwt_2.8.0', 'rack_2.1.0', 'rack_2.2.0', 'rack_3.0.0', 'rack_3.1.0' ] exclude: - - { ruby: '2.4', gemfile: 'faraday_2.8.0' } - - { ruby: '2.4', gemfile: 'faraday_2.9.0' } - - { ruby: '2.4', gemfile: 'faraday_2.10.0' } - - { ruby: '2.4', gemfile: 'jwt_2.6.0' } - - { ruby: '2.4', gemfile: 'jwt_2.7.0' } - - { ruby: '2.4', gemfile: 'jwt_2.8.0' } - - { ruby: '2.5', gemfile: 'faraday_2.8.0' } - - { ruby: '2.5', gemfile: 'faraday_2.9.0' } - - { ruby: '2.5', gemfile: 'faraday_2.10.0' } - { ruby: '3.0', gemfile: 'faraday_1.10.0' } - { ruby: '3.1', gemfile: 'faraday_1.10.0' } - { ruby: '3.2', gemfile: 'faraday_1.10.0' } From bb7ef8ea7b666bfea6961633481141325e6d4508 Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:36:06 +1200 Subject: [PATCH 07/10] fix compatibility issues with ruby/gems in our test matrix - faraday 2.9.0 dropped support for ruby 2.*, so we need to remove it from the test matrix - rack 2.1.0 does not work with ruby 3.3, so it has been excluded from the test matrix - faraday 1.10.3 works with ruby 3+, so we can remove the exclusion for it --- .github/workflows/test.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f8cfcb..fc2419d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ --- name: tests -on: [ push, pull_request ] +on: [push, pull_request] jobs: test: name: Test (Ruby ${{ matrix.ruby }} on ${{ matrix.gemfile }}) @@ -8,13 +8,28 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2', '3.3' ] - gemfile: [ 'faraday_1.10.0', 'faraday_2.8.0', 'faraday_2.9.0', 'faraday_2.10.0', 'jwt_1.5.0', 'jwt_2.6.0', 'jwt_2.7.0', 'jwt_2.8.0', 'rack_2.1.0', 'rack_2.2.0', 'rack_3.0.0', 'rack_3.1.0' ] + ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + gemfile: + [ + "faraday_1.10.0", + "faraday_2.8.0", + "faraday_2.9.0", + "faraday_2.10.0", + "jwt_1.5.0", + "jwt_2.6.0", + "jwt_2.7.0", + "jwt_2.8.0", + "rack_2.1.0", + "rack_2.2.0", + "rack_3.0.0", + "rack_3.1.0", + ] exclude: - - { ruby: '3.0', gemfile: 'faraday_1.10.0' } - - { ruby: '3.1', gemfile: 'faraday_1.10.0' } - - { ruby: '3.2', gemfile: 'faraday_1.10.0' } - - { ruby: '3.3', gemfile: 'faraday_1.10.0' } + - { ruby: "2.6", gemfile: "faraday_2.9.0" } + - { ruby: "2.7", gemfile: "faraday_2.9.0" } + - { ruby: "2.6", gemfile: "faraday_2.10.0" } + - { ruby: "2.7", gemfile: "faraday_2.10.0" } + - { ruby: "3.3", gemfile: "rack_2.1.0" } env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile From 9c8e26512f079a028187f4c0691b5994374bca30 Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 16:55:22 +1200 Subject: [PATCH 08/10] update changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27e4c5f..c45c774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Moved CI build to GitHub Actions ([#52]). +- Updated test matrix to test against the following gem versions, any gem versions outside of this matrix are no longer fully supported ([#58]): + - `faraday`: `~> 1.10.0`, `~> 2.8.0`, `~> 2.9.0` & `~> 2.10.0` + - `jwt`: `~> 1.5.0`, `~> 2.6.0`, `~> 2.7.0` & `~> 2.8.0` + - `rack`: `~> 2.1.0` +- Removed support for Ruby 2.4 & 2.5 ([#58]) + +### Fixed + +- Compatibility with Rack 3+ ([#58]) [#52]: https://github.com/envato/jwt_signed_request/pull/52 +[#58]: https://github.com/envato/jwt_signed_request/pull/58 ## [v3.0.0] - 2021-01-12 From 39a30f44d87cd89dfabd6508dbd49115ad5bbf90 Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 17:00:53 +1200 Subject: [PATCH 09/10] more changelog updates --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c45c774..95f6a91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,12 +14,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `jwt`: `~> 1.5.0`, `~> 2.6.0`, `~> 2.7.0` & `~> 2.8.0` - `rack`: `~> 2.1.0` - Removed support for Ruby 2.4 & 2.5 ([#58]) +- Add Ruby 3.3 ([#56]), 3.2 ([#55]) to our test matrix ### Fixed - Compatibility with Rack 3+ ([#58]) [#52]: https://github.com/envato/jwt_signed_request/pull/52 +[#55]: https://github.com/envato/jwt_signed_request/pull/55 +[#56]: https://github.com/envato/jwt_signed_request/pull/56 [#58]: https://github.com/envato/jwt_signed_request/pull/58 ## [v3.0.0] - 2021-01-12 From 9a8607610cde9112afdb218f9c7fc1fcf0ea3580 Mon Sep 17 00:00:00 2001 From: James Fairbairn Date: Wed, 10 Jul 2024 17:12:18 +1200 Subject: [PATCH 10/10] bump version to `v4.0.0` + update change log --- CHANGELOG.md | 2 ++ lib/jwt_signed_request/version.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95f6a91..be8d392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +## [v4.0.0] + ### Changed - Moved CI build to GitHub Actions ([#52]). diff --git a/lib/jwt_signed_request/version.rb b/lib/jwt_signed_request/version.rb index db36e09..1d78ef1 100644 --- a/lib/jwt_signed_request/version.rb +++ b/lib/jwt_signed_request/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module JWTSignedRequest - VERSION = '3.0.0' + VERSION = '4.0.0' end