Skip to content

Commit ac2d0c9

Browse files
committed
Merge branch 'bug/parsed-return-type' into 'main'
bug/parsed-return-type See merge request oauth-xx/oauth2!650
2 parents 2e3da41 + bfcdd89 commit ac2d0c9

Some content is hidden

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

46 files changed

+691
-364
lines changed

.github/workflows/ancient.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MRI 2.3, 2.4, 2.5 (EOL)
1+
name: MRI 2.4, 2.5 (EOL)
22

33
permissions:
44
contents: read
@@ -34,14 +34,6 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
include:
37-
# Ruby 2.3
38-
- ruby: "ruby-2.3"
39-
appraisal: "ruby-2-3"
40-
exec_cmd: "rake test"
41-
gemfile: "Appraisal.root"
42-
rubygems: "3.3.27"
43-
bundler: "2.3.27"
44-
4537
# Ruby 2.4
4638
- ruby: "ruby-2.4"
4739
appraisal: "ruby-2-4"

.github/workflows/caboose.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# THE CABOOSE IS AN ABSOLUTE WAGON
2+
name: MRI 2.3 X Hashie WAGON (EOL)
3+
4+
permissions:
5+
contents: read
6+
7+
on:
8+
push:
9+
branches:
10+
- 'main'
11+
- '*-stable'
12+
tags:
13+
- '!*' # Do not execute on tags
14+
pull_request:
15+
branches:
16+
- '*'
17+
# Allow manually triggering the workflow.
18+
workflow_dispatch:
19+
20+
# Cancels all previous workflow runs for the same branch that have not yet completed.
21+
concurrency:
22+
# The concurrency group contains the workflow name and the branch name.
23+
group: "${{ github.workflow }}-${{ github.ref }}"
24+
cancel-in-progress: true
25+
26+
jobs:
27+
test:
28+
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
29+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
30+
runs-on: ubuntu-22.04
31+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
32+
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
33+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
# Ruby 2.3
39+
- ruby: "ruby-2.3"
40+
appraisal: "ruby-2-3-hashie_v0"
41+
exec_cmd: "rake test"
42+
gemfile: "Appraisal.root"
43+
rubygems: "3.3.27"
44+
bundler: "2.3.27"
45+
46+
# Ruby 2.3
47+
- ruby: "ruby-2.3"
48+
appraisal: "ruby-2-3-hashie_v1"
49+
exec_cmd: "rake test"
50+
gemfile: "Appraisal.root"
51+
rubygems: "3.3.27"
52+
bundler: "2.3.27"
53+
54+
# Ruby 2.3
55+
- ruby: "ruby-2.3"
56+
appraisal: "ruby-2-3-hashie_v2"
57+
exec_cmd: "rake test"
58+
gemfile: "Appraisal.root"
59+
rubygems: "3.3.27"
60+
bundler: "2.3.27"
61+
62+
# Ruby 2.3
63+
- ruby: "ruby-2.3"
64+
appraisal: "ruby-2-3-hashie_v3"
65+
exec_cmd: "rake test"
66+
gemfile: "Appraisal.root"
67+
rubygems: "3.3.27"
68+
bundler: "2.3.27"
69+
70+
# Ruby 2.3
71+
- ruby: "ruby-2.3"
72+
appraisal: "ruby-2-3-hashie_v4"
73+
exec_cmd: "rake test"
74+
gemfile: "Appraisal.root"
75+
rubygems: "3.3.27"
76+
bundler: "2.3.27"
77+
78+
# Ruby 2.3
79+
- ruby: "ruby-2.3"
80+
appraisal: "ruby-2-3-hashie_v5"
81+
exec_cmd: "rake test"
82+
gemfile: "Appraisal.root"
83+
rubygems: "3.3.27"
84+
bundler: "2.3.27"
85+
86+
steps:
87+
- name: Checkout
88+
uses: actions/checkout@v4
89+
90+
- name: Setup Ruby & RubyGems
91+
uses: ruby/setup-ruby@v1
92+
with:
93+
ruby-version: ${{ matrix.ruby }}
94+
rubygems: ${{ matrix.rubygems }}
95+
bundler: ${{ matrix.bundler }}
96+
bundler-cache: false
97+
98+
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
99+
# We need to do this first to get appraisal installed.
100+
# NOTE: This does not use the primary Gemfile at all.
101+
- name: Install Root Appraisal
102+
run: bundle > /dev/null 2>&1
103+
- name: Appraisal for ${{ matrix.appraisal }}
104+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle > /dev/null 2>&1
105+
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
106+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.rubocop.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,8 @@ Style/TrailingCommaInHashLiteral:
7979
EnforcedStyleForMultiline: comma
8080

8181
Gemspec/DependencyVersion:
82-
Enabled: false
82+
Enabled: false
83+
84+
Lint/LiteralInInterpolation:
85+
Exclude:
86+
- 'spec/**/*.rb'

.rubocop_gradual.lock

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"lib/oauth2.rb:65351186": [
77
[38, 11, 7, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 651502127]
88
],
9-
"lib/oauth2/access_token.rb:3471244990": [
10-
[49, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513],
11-
[55, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513]
9+
"lib/oauth2/access_token.rb:558937598": [
10+
[64, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513],
11+
[70, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513]
1212
],
1313
"lib/oauth2/authenticator.rb:63639854": [
1414
[42, 5, 113, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 734523108]
@@ -18,21 +18,17 @@
1818
[9, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020],
1919
[13, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020]
2020
],
21-
"lib/oauth2/response.rb:4048171841": [
21+
"lib/oauth2/response.rb:2808363818": [
2222
[35, 5, 204, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 996912427]
2323
],
24-
"oauth2.gemspec:3929706977": [
24+
"oauth2.gemspec:1301437182": [
2525
[5, 23, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028]
2626
],
27-
"spec/oauth2/access_token_spec.rb:443932125": [
27+
"spec/oauth2/access_token_spec.rb:1202129469": [
2828
[3, 1, 34, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/access_token*_spec.rb`.", 1972107547],
29-
[392, 142, 40, "Lint/LiteralInInterpolation: Literal interpolation detected.", 4210228387],
30-
[400, 142, 40, "Lint/LiteralInInterpolation: Literal interpolation detected.", 4210228387],
31-
[606, 142, 20, "Lint/LiteralInInterpolation: Literal interpolation detected.", 304063511],
32-
[632, 142, 20, "Lint/LiteralInInterpolation: Literal interpolation detected.", 304063511],
33-
[781, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088],
34-
[851, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639],
35-
[855, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967]
29+
[789, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088],
30+
[859, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639],
31+
[863, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967]
3632
],
3733
"spec/oauth2/authenticator_spec.rb:853320290": [
3834
[3, 1, 36, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/authenticator*_spec.rb`.", 819808017],
@@ -41,23 +37,23 @@
4137
[69, 15, 38, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1480816240],
4238
[79, 13, 23, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2314399065]
4339
],
44-
"spec/oauth2/client_spec.rb:2985507284": [
40+
"spec/oauth2/client_spec.rb:1455422151": [
4541
[6, 1, 29, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/client*_spec.rb`.", 439549885],
4642
[175, 7, 492, "RSpec/NoExpectationExample: No expectation found in this example.", 1272021224],
4743
[194, 7, 592, "RSpec/NoExpectationExample: No expectation found in this example.", 3428877205],
4844
[207, 15, 20, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2320605227],
4945
[222, 15, 20, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1276531672],
5046
[237, 15, 43, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1383956904],
5147
[252, 15, 43, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3376202107],
52-
[830, 5, 360, "RSpec/NoExpectationExample: No expectation found in this example.", 536201463],
53-
[839, 5, 461, "RSpec/NoExpectationExample: No expectation found in this example.", 3392600621],
54-
[850, 5, 340, "RSpec/NoExpectationExample: No expectation found in this example.", 244592251],
55-
[978, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886],
56-
[982, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529],
57-
[990, 7, 89, "RSpec/NoExpectationExample: No expectation found in this example.", 4609419],
58-
[1078, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886],
59-
[1082, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529],
60-
[1162, 17, 12, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 664794325]
48+
[827, 5, 360, "RSpec/NoExpectationExample: No expectation found in this example.", 536201463],
49+
[836, 5, 461, "RSpec/NoExpectationExample: No expectation found in this example.", 3392600621],
50+
[847, 5, 340, "RSpec/NoExpectationExample: No expectation found in this example.", 244592251],
51+
[975, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886],
52+
[979, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529],
53+
[987, 7, 89, "RSpec/NoExpectationExample: No expectation found in this example.", 4609419],
54+
[1075, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886],
55+
[1079, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529],
56+
[1159, 17, 12, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 664794325]
6157
],
6258
"spec/oauth2/error_spec.rb:1692696277": [
6359
[23, 1, 28, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/error*_spec.rb`.", 3385870076],

.rubocop_rspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ RSpec/DescribeClass:
2727
- 'spec/examples/*'
2828

2929
RSpec/MultipleMemoizedHelpers:
30-
Enabled: false
30+
Enabled: false

Appraisals

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ appraise "current" do
3535
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
3636
end
3737

38-
appraise "ruby-2-3" do
38+
appraise "ruby-2-3-hashie_v0" do
3939
eval_gemfile "modular/faraday_v0.gemfile"
4040
eval_gemfile "modular/hashie_v0.gemfile"
4141
eval_gemfile "modular/jwt_v1.gemfile"
@@ -45,6 +45,56 @@ appraise "ruby-2-3" do
4545
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
4646
end
4747

48+
appraise "ruby-2-3-hashie_v1" do
49+
eval_gemfile "modular/faraday_v0.gemfile"
50+
eval_gemfile "modular/hashie_v1.gemfile"
51+
eval_gemfile "modular/jwt_v1.gemfile"
52+
eval_gemfile "modular/logger_v1_2.gemfile"
53+
eval_gemfile "modular/multi_xml_v0_5.gemfile"
54+
eval_gemfile "modular/rack_v1_2.gemfile"
55+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
56+
end
57+
58+
appraise "ruby-2-3-hashie_v2" do
59+
eval_gemfile "modular/faraday_v0.gemfile"
60+
eval_gemfile "modular/hashie_v2.gemfile"
61+
eval_gemfile "modular/jwt_v1.gemfile"
62+
eval_gemfile "modular/logger_v1_2.gemfile"
63+
eval_gemfile "modular/multi_xml_v0_5.gemfile"
64+
eval_gemfile "modular/rack_v1_2.gemfile"
65+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
66+
end
67+
68+
appraise "ruby-2-3-hashie_v3" do
69+
eval_gemfile "modular/faraday_v0.gemfile"
70+
eval_gemfile "modular/hashie_v3.gemfile"
71+
eval_gemfile "modular/jwt_v1.gemfile"
72+
eval_gemfile "modular/logger_v1_2.gemfile"
73+
eval_gemfile "modular/multi_xml_v0_5.gemfile"
74+
eval_gemfile "modular/rack_v1_2.gemfile"
75+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
76+
end
77+
78+
appraise "ruby-2-3-hashie_v4" do
79+
eval_gemfile "modular/faraday_v0.gemfile"
80+
eval_gemfile "modular/hashie_v4.gemfile"
81+
eval_gemfile "modular/jwt_v1.gemfile"
82+
eval_gemfile "modular/logger_v1_2.gemfile"
83+
eval_gemfile "modular/multi_xml_v0_5.gemfile"
84+
eval_gemfile "modular/rack_v1_2.gemfile"
85+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
86+
end
87+
88+
appraise "ruby-2-3-hashie_v5" do
89+
eval_gemfile "modular/faraday_v0.gemfile"
90+
eval_gemfile "modular/hashie_v5.gemfile"
91+
eval_gemfile "modular/jwt_v1.gemfile"
92+
eval_gemfile "modular/logger_v1_2.gemfile"
93+
eval_gemfile "modular/multi_xml_v0_5.gemfile"
94+
eval_gemfile "modular/rack_v1_2.gemfile"
95+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
96+
end
97+
4898
appraise "ruby-2-4" do
4999
eval_gemfile "modular/faraday_v1.gemfile"
50100
eval_gemfile "modular/hashie_v1.gemfile"

Gemfile.lock

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PATH
2929
logger (~> 1.2)
3030
multi_xml (~> 0.5)
3131
rack (>= 1.2, < 4)
32-
snaky_hash (~> 2.0)
32+
snaky_hash (~> 2.0, >= 2.0.2)
3333
version_gem (>= 1.1.8, < 3)
3434

3535
GEM
@@ -83,6 +83,7 @@ GEM
8383
dry-inflector (~> 1.0)
8484
dry-logic (~> 1.4)
8585
zeitwerk (~> 2.6)
86+
erb (5.0.1)
8687
faraday (2.13.1)
8788
faraday-net_http (>= 2.0, < 3.5)
8889
json
@@ -92,7 +93,7 @@ GEM
9293
gem_bench (2.0.5)
9394
bundler (>= 1.14)
9495
version_gem (~> 1.1, >= 1.1.4)
95-
hashie (0.4.0)
96+
hashie (5.0.0)
9697
io-console (0.8.0)
9798
irb (1.15.2)
9899
pp (>= 0.6.0)
@@ -101,7 +102,7 @@ GEM
101102
json (2.12.0)
102103
jwt (3.0.0.beta1)
103104
base64
104-
kettle-soup-cover (1.0.6)
105+
kettle-soup-cover (1.0.9)
105106
simplecov (~> 0.22)
106107
simplecov-cobertura (~> 2.1)
107108
simplecov-console (~> 0.9, >= 0.9.1)
@@ -140,10 +141,11 @@ GEM
140141
stringio
141142
public_suffix (6.0.2)
142143
racc (1.8.1)
143-
rack (3.1.14)
144+
rack (3.1.15)
144145
rainbow (3.1.1)
145146
rake (13.2.1)
146-
rdoc (6.13.1)
147+
rdoc (6.14.0)
148+
erb
147149
psych (>= 4.0.0)
148150
reek (6.5.0)
149151
dry-schema (~> 1.13)
@@ -175,7 +177,7 @@ GEM
175177
ruby_version (~> 1.0)
176178
rspec-stubbed_env (1.0.2)
177179
rspec-support (3.13.3)
178-
rubocop (1.75.6)
180+
rubocop (1.75.7)
179181
json (~> 2.3)
180182
language_server-protocol (~> 3.17.0.2)
181183
lint_roller (~> 1.1.0)
@@ -249,9 +251,9 @@ GEM
249251
simplecov-rcov (0.3.7)
250252
simplecov (>= 0.4.1)
251253
simplecov_json_formatter (0.1.4)
252-
snaky_hash (2.0.1)
253-
hashie
254-
version_gem (~> 1.1, >= 1.1.1)
254+
snaky_hash (2.0.2)
255+
hashie (>= 0.1.0, < 6)
256+
version_gem (>= 1.1.8, < 3)
255257
standard (1.50.0)
256258
language_server-protocol (~> 3.17.0.2)
257259
lint_roller (~> 1.0)
@@ -284,7 +286,7 @@ GEM
284286
yard (0.9.37)
285287
yard-relative_markdown_links (0.5.0)
286288
nokogiri (>= 1.14.3, < 2)
287-
zeitwerk (2.7.2)
289+
zeitwerk (2.7.3)
288290

289291
PLATFORMS
290292
x86_64-darwin-21

0 commit comments

Comments
 (0)