Skip to content

Commit 5bd712a

Browse files
committed
Add more JWT supported versions
1 parent e3e74a5 commit 5bd712a

7 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jobs:
1919
"jwt_2.6.0",
2020
"jwt_2.7.0",
2121
"jwt_2.8.0",
22+
"jwt_2.9.0",
23+
"jwt_2.10.0",
24+
"jwt_3.0.0",
25+
"jwt_3.1.0",
2226
"rack_2.1.0",
2327
"rack_2.2.0",
2428
"rack_3.0.0",

Appraisals

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
2.6.0
88
2.7.0
99
2.8.0
10+
2.9.0
11+
2.10.0
12+
3.0.0
13+
3.1.0
1014
].each do |jwt_version|
1115
appraise "jwt-#{jwt_version}" do
1216
gem 'jwt', "~> #{jwt_version}"

gemfiles/jwt_2.10.0.gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "faraday", require: false
6+
gem "jwt", "~> 2.10.0"
7+
8+
gemspec path: "../"

gemfiles/jwt_2.9.0.gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "faraday", require: false
6+
gem "jwt", "~> 2.9.0"
7+
8+
gemspec path: "../"

gemfiles/jwt_3.0.0.gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "faraday", require: false
6+
gem "jwt", "~> 3.0.0"
7+
8+
gemspec path: "../"

gemfiles/jwt_3.1.0.gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "faraday", require: false
6+
gem "jwt", "~> 3.1.0"
7+
8+
gemspec path: "../"

spec/jwt_signed_request/verify_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,16 @@
205205
end
206206
end
207207

208+
context 'and using JWT version 3.x.x' do
209+
before do
210+
stub_const("JWT::VERSION::MAJOR", 3)
211+
end
212+
213+
it 'raises an a MissingAlgorithmError' do
214+
expect { verify_request }.to raise_error(JWTSignedRequest::MissingAlgorithmError)
215+
end
216+
end
217+
208218
context 'and using JWT version 1.x.x' do
209219
before do
210220
stub_const("JWT::VERSION::MAJOR", 1)

0 commit comments

Comments
 (0)