safety_net_attestation 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5116645ce8afe8172658cd294571bb6cef9921579f86ca8b8b8e9cb9d44620d4
4
- data.tar.gz: 9cbf7c06202bc80ffa7e2f151c354f3a89ab75048cec8b064096840ece5a68e7
3
+ metadata.gz: ccf5294078755bdf3271d763b534a8c6b30254ded3ef8ce5f775eedbec2d2f37
4
+ data.tar.gz: 9d395fda856e5e9c313195f9eaadf5fd2b79e77be7be0ba05bf0f15656ad46e7
5
5
  SHA512:
6
- metadata.gz: 359e37de75eebdf4198e79996f15ab7cc5d24e34cd664e34136b8a0d6f385729b696f541c40ca4dce14f2f2848082ef4ad4779d0a3c97386b91e291c1913339a
7
- data.tar.gz: d2467423824192b293507131a2957e512a9c412ed762c6444359d1605edfe3f3cb837ed167245994d367ba2b37774cfac112018e1a998c39298d06ef279e51bb
6
+ metadata.gz: 2a992753ec960cce99a8ae7d3715791f20da84673f69513a10d900fd96c1c01b22157ff93cc81c6c03d7539f0077a0aa283d17e5e1d82882a8de7be5e9268f1a
7
+ data.tar.gz: 3f461de22cd21aa7acb89ce70594e46da8ab9ef892555921924a3f0c30b69d07942bd557b240dd79366a397d21706991f1367c28aff4d22ed9d25f9af7d80eb4
@@ -0,0 +1,55 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: build
9
+
10
+ on: push
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-24.04
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ ruby:
19
+ - '3.4'
20
+ - '3.3'
21
+ - '3.2'
22
+ - '3.1'
23
+ - '3.0'
24
+ - '2.7'
25
+ - '2.6'
26
+ - '2.5'
27
+ - '2.4'
28
+ gemfile:
29
+ - jwt_2
30
+ - jwt_3
31
+ exclude:
32
+ - ruby: '2.4'
33
+ gemfile: jwt_3
34
+ env:
35
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
36
+ steps:
37
+ - uses: actions/checkout@v5
38
+ - run: rm Gemfile.lock
39
+
40
+ - uses: ruby/setup-ruby@v1
41
+ with:
42
+ ruby-version: ${{ matrix.ruby }}
43
+ bundler-cache: true
44
+
45
+ - run: bundle exec rake
46
+
47
+ lint:
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - uses: actions/checkout@v5
51
+ - uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: '3.4'
54
+ bundler-cache: true
55
+ - run: bundle exec rubocop
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ gemfiles/*.lock
data/.rubocop.yml CHANGED
@@ -21,7 +21,7 @@ Layout:
21
21
  Lint:
22
22
  Enabled: true
23
23
 
24
- Metrics/LineLength:
24
+ Layout/LineLength:
25
25
  Max: 120
26
26
 
27
27
  Naming:
@@ -33,9 +33,6 @@ Security:
33
33
  Style/BlockComments:
34
34
  Enabled: true
35
35
 
36
- Style/BracesAroundHashParameters:
37
- Enabled: true
38
-
39
36
  Style/CaseEquality:
40
37
  Enabled: true
41
38
 
@@ -181,10 +178,10 @@ Style/TrailingMethodEndStatement:
181
178
  Style/TrivialAccessors:
182
179
  Enabled: true
183
180
 
184
- Style/UnneededInterpolation:
181
+ Style/RedundantInterpolation:
185
182
  Enabled: true
186
183
 
187
- Style/UnneededPercentQ:
184
+ Style/RedundantPercentQ:
188
185
  Enabled: true
189
186
 
190
187
  Style/UnpackFirst:
@@ -195,3 +192,6 @@ Style/YodaCondition:
195
192
 
196
193
  Style/ZeroLengthPredicate:
197
194
  Enabled: true
195
+
196
+ Layout/BlockAlignment:
197
+ Enabled: false
data/Appraisals ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise "jwt_2" do
4
+ gem "jwt", "~> 2.0", "< 3.0"
5
+ end
6
+
7
+ appraise "jwt_3" do
8
+ gem "jwt", "~> 3.0", "< 4.0"
9
+ end
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.5.0] - 2025-09-22
10
+ ### Changed
11
+ - Update `jwt` dependency to support both v2 and v3. ([#23](https://github.com/cedarcode/safety_net_attestation/pull/7))
12
+
9
13
  ## [0.4.0] - 2019-12-29
10
14
  ### Fixed
11
15
  - Root certificate loading when this gem is used as a dependency
@@ -27,8 +31,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
31
  ### Added
28
32
  - Extracted from [webauthn-ruby](https://github.com/cedarcode/webauthn-ruby) after discussion with the maintainers. Thanks for the feedback @grzuy and @brauliomartinezlm!
29
33
 
30
- [Unreleased]: https://github.com/bdewater/safety_net_attestation/compare/v0.1.0...HEAD
31
- [0.4.0]: https://github.com/bdewater/safety_net_attestation/compare/v0.3.0...v0.4.0
32
- [0.3.0]: https://github.com/bdewater/safety_net_attestation/compare/v0.2.0...v0.3.0
33
- [0.2.0]: https://github.com/bdewater/safety_net_attestation/compare/v0.1.0...v0.2.0
34
- [0.1.0]: https://github.com/bdewater/safety_net_attestation/releases/tag/v0.1.0
34
+ [Unreleased]: https://github.com/cedarcode/safety_net_attestation/compare/v0.5.0...HEAD
35
+ [0.5.0]: https://github.com/cedarcode/safety_net_attestation/compare/v0.4.0...v0.5.0
36
+ [0.4.0]: https://github.com/cedarcode/safety_net_attestation/compare/v0.3.0...v0.4.0
37
+ [0.3.0]: https://github.com/cedarcode/safety_net_attestation/compare/v0.2.0...v0.3.0
38
+ [0.2.0]: https://github.com/cedarcode/safety_net_attestation/compare/v0.1.0...v0.2.0
39
+ [0.1.0]: https://github.com/cedarcode/safety_net_attestation/releases/tag/v0.1.0
data/Gemfile CHANGED
@@ -4,3 +4,7 @@ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in safety_net_attestation.gemspec
6
6
  gemspec
7
+
8
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0")
9
+ gem "rubocop", "~> 1.80", require: false
10
+ end
data/Gemfile.lock CHANGED
@@ -1,61 +1,105 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- safety_net_attestation (0.4.0)
5
- jwt (~> 2.0)
4
+ safety_net_attestation (0.5.0)
5
+ jwt (>= 2.0, < 4.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- ast (2.4.0)
11
- byebug (11.0.1)
12
- coderay (1.1.2)
13
- diff-lcs (1.3)
14
- jaro_winkler (1.5.4)
15
- jwt (2.2.1)
16
- method_source (0.9.2)
17
- parallel (1.19.1)
18
- parser (2.7.0.0)
19
- ast (~> 2.4.0)
20
- pry (0.12.2)
21
- coderay (~> 1.1.0)
22
- method_source (~> 0.9.0)
23
- pry-byebug (3.7.0)
24
- byebug (~> 11.0)
25
- pry (~> 0.10)
26
- rainbow (3.0.0)
27
- rspec (3.9.0)
28
- rspec-core (~> 3.9.0)
29
- rspec-expectations (~> 3.9.0)
30
- rspec-mocks (~> 3.9.0)
31
- rspec-core (3.9.0)
32
- rspec-support (~> 3.9.0)
33
- rspec-expectations (3.9.0)
10
+ appraisal (2.5.0)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.4.3)
15
+ base64 (0.3.0)
16
+ byebug (12.0.0)
17
+ coderay (1.1.3)
18
+ date (3.4.1)
19
+ diff-lcs (1.6.2)
20
+ erb (5.0.2)
21
+ io-console (0.8.1)
22
+ irb (1.15.2)
23
+ pp (>= 0.6.0)
24
+ rdoc (>= 4.0.0)
25
+ reline (>= 0.4.2)
26
+ json (2.14.1)
27
+ jwt (3.1.2)
28
+ base64
29
+ language_server-protocol (3.17.0.5)
30
+ lint_roller (1.1.0)
31
+ method_source (1.1.0)
32
+ parallel (1.27.0)
33
+ parser (3.3.9.0)
34
+ ast (~> 2.4.1)
35
+ racc
36
+ pp (0.6.2)
37
+ prettyprint
38
+ prettyprint (0.2.0)
39
+ prism (1.5.1)
40
+ pry (0.15.2)
41
+ coderay (~> 1.1)
42
+ method_source (~> 1.0)
43
+ pry-byebug (3.11.0)
44
+ byebug (~> 12.0)
45
+ pry (>= 0.13, < 0.16)
46
+ psych (5.2.6)
47
+ date
48
+ stringio
49
+ racc (1.8.1)
50
+ rainbow (3.1.1)
51
+ rake (13.3.0)
52
+ rdoc (6.14.2)
53
+ erb
54
+ psych (>= 4.0.0)
55
+ regexp_parser (2.11.3)
56
+ reline (0.6.2)
57
+ io-console (~> 0.5)
58
+ rspec (3.13.1)
59
+ rspec-core (~> 3.13.0)
60
+ rspec-expectations (~> 3.13.0)
61
+ rspec-mocks (~> 3.13.0)
62
+ rspec-core (3.13.5)
63
+ rspec-support (~> 3.13.0)
64
+ rspec-expectations (3.13.5)
34
65
  diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.9.0)
36
- rspec-mocks (3.9.0)
66
+ rspec-support (~> 3.13.0)
67
+ rspec-mocks (3.13.5)
37
68
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.9.0)
39
- rspec-support (3.9.0)
40
- rubocop (0.75.0)
41
- jaro_winkler (~> 1.5.1)
69
+ rspec-support (~> 3.13.0)
70
+ rspec-support (3.13.6)
71
+ rubocop (1.80.2)
72
+ json (~> 2.3)
73
+ language_server-protocol (~> 3.17.0.2)
74
+ lint_roller (~> 1.1.0)
42
75
  parallel (~> 1.10)
43
- parser (>= 2.6)
76
+ parser (>= 3.3.0.2)
44
77
  rainbow (>= 2.2.2, < 4.0)
78
+ regexp_parser (>= 2.9.3, < 3.0)
79
+ rubocop-ast (>= 1.46.0, < 2.0)
45
80
  ruby-progressbar (~> 1.7)
46
- unicode-display_width (>= 1.4.0, < 1.7)
47
- ruby-progressbar (1.10.1)
48
- unicode-display_width (1.6.0)
81
+ unicode-display_width (>= 2.4.0, < 4.0)
82
+ rubocop-ast (1.46.0)
83
+ parser (>= 3.3.7.2)
84
+ prism (~> 1.4)
85
+ ruby-progressbar (1.13.0)
86
+ stringio (3.1.7)
87
+ thor (1.4.0)
88
+ unicode-display_width (3.2.0)
89
+ unicode-emoji (~> 4.1)
90
+ unicode-emoji (4.1.0)
49
91
 
50
92
  PLATFORMS
51
93
  ruby
52
94
 
53
95
  DEPENDENCIES
96
+ appraisal
54
97
  bundler
98
+ irb
55
99
  pry-byebug
56
100
  rspec (~> 3.8)
57
- rubocop (= 0.75.0)
101
+ rubocop (~> 1.80)
58
102
  safety_net_attestation!
59
103
 
60
104
  BUNDLED WITH
61
- 2.1.2
105
+ 2.7.1
@@ -28,9 +28,10 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.required_ruby_version = ">= 2.3"
30
30
 
31
- spec.add_dependency "jwt", "~> 2.0"
31
+ spec.add_dependency "jwt", ">= 2.0", "< 4.0"
32
+ spec.add_development_dependency "appraisal"
32
33
  spec.add_development_dependency "bundler"
34
+ spec.add_development_dependency "irb"
33
35
  spec.add_development_dependency "pry-byebug"
34
36
  spec.add_development_dependency "rspec", "~> 3.8"
35
- spec.add_development_dependency "rubocop", "0.75.0"
36
37
  end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "jwt", "~> 2.0", "< 3.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "jwt", "~> 3.0", "< 4.0"
6
+
7
+ gemspec path: "../"
@@ -6,7 +6,7 @@ module SafetyNetAttestation
6
6
  module FixedLengthSecureCompare
7
7
  unless OpenSSL.singleton_class.method_defined?(:fixed_length_secure_compare)
8
8
  refine OpenSSL.singleton_class do
9
- def fixed_length_secure_compare(a, b) # rubocop:disable Naming/UncommunicativeMethodParamName
9
+ def fixed_length_secure_compare(a, b) # rubocop:disable Naming/MethodParameterName
10
10
  raise ArgumentError, "inputs must be of equal length" unless a.bytesize == b.bytesize
11
11
 
12
12
  # borrowed from Rack::Utils
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafetyNetAttestation
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,29 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safety_net_attestation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bart de Water
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-31 00:00:00.000000000 Z
11
+ date: 2025-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '4.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '4.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: appraisal
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: bundler
29
49
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +59,7 @@ dependencies:
39
59
  - !ruby/object:Gem::Version
40
60
  version: '0'
41
61
  - !ruby/object:Gem::Dependency
42
- name: pry-byebug
62
+ name: irb
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - ">="
@@ -53,43 +73,44 @@ dependencies:
53
73
  - !ruby/object:Gem::Version
54
74
  version: '0'
55
75
  - !ruby/object:Gem::Dependency
56
- name: rspec
76
+ name: pry-byebug
57
77
  requirement: !ruby/object:Gem::Requirement
58
78
  requirements:
59
- - - "~>"
79
+ - - ">="
60
80
  - !ruby/object:Gem::Version
61
- version: '3.8'
81
+ version: '0'
62
82
  type: :development
63
83
  prerelease: false
64
84
  version_requirements: !ruby/object:Gem::Requirement
65
85
  requirements:
66
- - - "~>"
86
+ - - ">="
67
87
  - !ruby/object:Gem::Version
68
- version: '3.8'
88
+ version: '0'
69
89
  - !ruby/object:Gem::Dependency
70
- name: rubocop
90
+ name: rspec
71
91
  requirement: !ruby/object:Gem::Requirement
72
92
  requirements:
73
- - - '='
93
+ - - "~>"
74
94
  - !ruby/object:Gem::Version
75
- version: 0.75.0
95
+ version: '3.8'
76
96
  type: :development
77
97
  prerelease: false
78
98
  version_requirements: !ruby/object:Gem::Requirement
79
99
  requirements:
80
- - - '='
100
+ - - "~>"
81
101
  - !ruby/object:Gem::Version
82
- version: 0.75.0
83
- description:
84
- email:
102
+ version: '3.8'
103
+ description:
104
+ email:
85
105
  executables: []
86
106
  extensions: []
87
107
  extra_rdoc_files: []
88
108
  files:
109
+ - ".github/workflows/ci.yml"
89
110
  - ".gitignore"
90
111
  - ".rspec"
91
112
  - ".rubocop.yml"
92
- - ".travis.yml"
113
+ - Appraisals
93
114
  - CHANGELOG.md
94
115
  - CODE_OF_CONDUCT.md
95
116
  - Gemfile
@@ -101,6 +122,8 @@ files:
101
122
  - bin/rspec
102
123
  - bin/rubocop
103
124
  - bin/setup
125
+ - gemfiles/jwt_2.gemfile
126
+ - gemfiles/jwt_3.gemfile
104
127
  - lib/safety_net_attestation.rb
105
128
  - lib/safety_net_attestation/certificates/GSR2.crt
106
129
  - lib/safety_net_attestation/certificates/GSR4.crt
@@ -120,7 +143,7 @@ metadata:
120
143
  homepage_uri: https://github.com/bdewater/safety_net_attestation
121
144
  source_code_uri: https://github.com/bdewater/safety_net_attestation
122
145
  changelog_uri: https://github.com/bdewater/safety_net_attestation/blob/master/CHANGELOG.md
123
- post_install_message:
146
+ post_install_message:
124
147
  rdoc_options: []
125
148
  require_paths:
126
149
  - lib
@@ -135,8 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
158
  - !ruby/object:Gem::Version
136
159
  version: '0'
137
160
  requirements: []
138
- rubygems_version: 3.1.2
139
- signing_key:
161
+ rubygems_version: 3.2.1
162
+ signing_key:
140
163
  specification_version: 4
141
164
  summary: SafetyNet attestation response verification
142
165
  test_files: []
data/.travis.yml DELETED
@@ -1,20 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.6.5
6
- - 2.5.7
7
- - 2.4.9
8
- - 2.3.8
9
- before_install:
10
- - gem install bundler
11
- script:
12
- - bin/rspec
13
- jobs:
14
- fast_finish: true
15
- include:
16
- - rvm: 2.6.5
17
- name: Rubocop
18
- script:
19
- - bundle info rubocop
20
- - bin/rubocop