Skip to content

Commit 5f5bf7f

Browse files
committed
💚 Fix CI for Ruby < 2.4.2
1 parent e9074da commit 5f5bf7f

29 files changed

+98
-65
lines changed

.rubocop_gradual.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
[375, 11, 534, "RSpec/NoExpectationExample: No expectation found in this example.", 3347340910],
6666
[391, 11, 210, "RSpec/NoExpectationExample: No expectation found in this example.", 3948582233]
6767
],
68-
"spec/oauth2/response_spec.rb:1229128056": [
68+
"spec/oauth2/response_spec.rb:2248532534": [
6969
[3, 1, 31, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/response*_spec.rb`.", 3190869319]
7070
],
7171
"spec/oauth2/strategy/assertion_spec.rb:793170256": [

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
1818
- BRANCH COVERAGE: 100.00% -- 172/172 branches in 14 files
1919
- 80.00% documented
2020
### Added
21+
- [gh651](https://github.com/oauth-xx/oauth2/pull/651) - `:snaky_hash_klass` option (@pboling)
2122
- More documentation
2223
- Codeberg as ethical mirror (@pboling)
2324
- https://codeberg.org/oauth-xx/oauth2
@@ -27,8 +28,10 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
2728
- Documentation site on GitHub Pages (@pboling)
2829
- [oauth2.galtzo.com](https://oauth2.galtzo.com)
2930
- [!649](https://gitlab.com/oauth-xx/oauth2/-/merge_requests/649) - Test compatibility with all key minor versions of Hashie v0, v1, v2, v3, v4, v5, HEAD (@pboling)
31+
- [gh651](https://github.com/oauth-xx/oauth2/pull/651) - Mock OAuth2 server for testing (@pboling)
32+
- https://github.com/navikt/mock-oauth2-server
3033
### Changed
31-
- Upgraded to snaky_hash v2.0.2 (@pboling)
34+
- [gh651](https://github.com/oauth-xx/oauth2/pull/651) - Upgraded to snaky_hash v2.0.3 (@pboling)
3235
- Provides solution for serialization issues
3336
- Updated `spec.homepage_uri` in gemspec to GitHub Pages YARD documentation site (@pboling)
3437
### Fixed

REEK

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
spec/oauth2/access_token_spec.rb -- 1 warning:
22
[300, 301]:DuplicateMethodCall: assert_initialized_token calls 'target.params' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
33
spec/oauth2/client_spec.rb -- 3 warnings:
4-
[1072]:UnusedParameters: initialize has unused parameter 'client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md]
5-
[1072]:UnusedParameters: initialize has unused parameter 'hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md]
6-
[1208]:UtilityFunction: stubbed_client doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Utility-Function.md]
4+
[1084]:UnusedParameters: initialize has unused parameter 'client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md]
5+
[1084]:UnusedParameters: initialize has unused parameter 'hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md]
6+
[1220]:UtilityFunction: stubbed_client doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Utility-Function.md]
77
spec/oauth2/error_spec.rb -- 3 warnings:
88
[10]:IrresponsibleModule: XmledString has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
99
[4]:SubclassedFromCoreClass: StirredHash inherits from core class 'Hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Subclassed-From-Core-Class.md]
@@ -43,32 +43,32 @@ lib/oauth2/authenticator.rb -- 5 warnings:
4343
lib/oauth2/client.rb -- 28 warnings:
4444
[28]:Attribute: OAuth2::Client#connection is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
4545
[27]:Attribute: OAuth2::Client#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
46-
[208, 469, 536]:DataClump: OAuth2::Client takes parameters ['access_token_opts', 'extract_access_token'] to 3 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md]
47-
[469, 492, 517, 536]:DataClump: OAuth2::Client takes parameters ['access_token_opts', 'response'] to 4 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md]
46+
[208, 485, 552]:DataClump: OAuth2::Client takes parameters ['access_token_opts', 'extract_access_token'] to 3 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md]
47+
[485, 508, 533, 552]:DataClump: OAuth2::Client takes parameters ['access_token_opts', 'response'] to 4 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md]
4848
[89, 90]:DuplicateMethodCall: OAuth2::Client#connection calls 'options[:connection_build]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
49-
[433, 433]:DuplicateMethodCall: OAuth2::Client#execute_request calls 'req_opts[:params]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
49+
[449, 449]:DuplicateMethodCall: OAuth2::Client#execute_request calls 'req_opts[:params]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
5050
[336, 337]:DuplicateMethodCall: OAuth2::Client#redirection_params calls 'options[:redirect_uri]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
5151
[152, 153, 154]:DuplicateMethodCall: OAuth2::Client#request calls 'req_opts[:redirect_count]' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
5252
[260, 261, 262]:DuplicateMethodCall: OAuth2::Client#revoke_token calls 'req_opts[:params]' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
53-
[519, 519]:FeatureEnvy: OAuth2::Client#build_access_token refers to 'access_token' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
54-
[354, 357, 363, 365, 366, 368]:FeatureEnvy: OAuth2::Client#params_to_req_opts refers to 'req_opts' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
55-
[388, 395, 395, 396, 396, 397, 397, 400]:FeatureEnvy: OAuth2::Client#parse_snaky_params_headers refers to 'params' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
53+
[535, 535]:FeatureEnvy: OAuth2::Client#build_access_token refers to 'access_token' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
54+
[366, 369, 375, 377, 378, 380]:FeatureEnvy: OAuth2::Client#params_to_req_opts refers to 'req_opts' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
55+
[403, 410, 410, 411, 411, 412, 412, 413, 413, 416]:FeatureEnvy: OAuth2::Client#parse_snaky_params_headers refers to 'params' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
5656
[16]:IrresponsibleModule: OAuth2::ConnectionError has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
5757
[17]:IrresponsibleModule: OAuth2::TimeoutError has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
58-
[519]:ManualDispatch: OAuth2::Client#build_access_token manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
58+
[535]:ManualDispatch: OAuth2::Client#build_access_token manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
5959
[20]:TooManyInstanceVariables: OAuth2::Client has at least 5 instance variables [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Instance-Variables.md]
6060
[20]:TooManyMethods: OAuth2::Client has at least 25 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Methods.md]
61-
[424]:TooManyStatements: OAuth2::Client#execute_request has approx 16 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
61+
[440]:TooManyStatements: OAuth2::Client#execute_request has approx 16 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
6262
[208]:TooManyStatements: OAuth2::Client#get_token has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
63-
[346]:TooManyStatements: OAuth2::Client#params_to_req_opts has approx 9 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
64-
[492]:TooManyStatements: OAuth2::Client#parse_response has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
65-
[387]:TooManyStatements: OAuth2::Client#parse_snaky_params_headers has approx 11 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
63+
[357]:TooManyStatements: OAuth2::Client#params_to_req_opts has approx 9 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
64+
[508]:TooManyStatements: OAuth2::Client#parse_response has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
65+
[402]:TooManyStatements: OAuth2::Client#parse_snaky_params_headers has approx 13 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
6666
[146]:TooManyStatements: OAuth2::Client#request has approx 18 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
6767
[257]:TooManyStatements: OAuth2::Client#revoke_token has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
6868
[15]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
69-
[436, 438]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'e' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
70-
[428]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
71-
[429]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'p' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
69+
[452, 454]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'e' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
70+
[444]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
71+
[445]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'p' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
7272
lib/oauth2/error.rb -- 8 warnings:
7373
[35, 35, 37, 38]:DuplicateMethodCall: OAuth2::Error#error_message calls 'opts[:error_description]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
7474
[13, 14, 15]:DuplicateMethodCall: OAuth2::Error#initialize calls 'response.parsed' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
@@ -86,17 +86,17 @@ lib/oauth2/filtered_attributes.rb -- 6 warnings:
8686
[17]:TooManyStatements: OAuth2::FilteredAttributes#inspect has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
8787
[1]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
8888
lib/oauth2/response.rb -- 12 warnings:
89-
[15]:Attribute: OAuth2::Response#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
90-
[51]:BooleanParameter: OAuth2::Response#initialize has boolean parameter 'snaky' [https://github.com/troessner/reek/blob/v6.5.0/docs/Boolean-Parameter.md]
91-
[25, 39, 133]:ClassVariable: OAuth2::Response declares the class variable '@@content_types' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md]
92-
[19, 37, 130, 133]:ClassVariable: OAuth2::Response declares the class variable '@@parsers' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md]
93-
[102, 104]:DuplicateMethodCall: OAuth2::Response#content_type calls 'response.headers' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
94-
[127, 128, 129, 130]:DuplicateMethodCall: OAuth2::Response#parser calls 'options[:parse]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
95-
[9]:InstanceVariableAssumption: OAuth2::Response assumes too much for instance variable '@parsed' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
96-
[9]:InstanceVariableAssumption: OAuth2::Response assumes too much for instance variable '@parser' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
97-
[82]:ManualDispatch: OAuth2::Response#parsed manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
98-
[127]:ManualDispatch: OAuth2::Response#parser manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
99-
[78]:TooManyStatements: OAuth2::Response#parsed has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
89+
[26]:Attribute: OAuth2::Response#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
90+
[72]:BooleanParameter: OAuth2::Response#initialize has boolean parameter 'snaky' [https://github.com/troessner/reek/blob/v6.5.0/docs/Boolean-Parameter.md]
91+
[41, 57, 162]:ClassVariable: OAuth2::Response declares the class variable '@@content_types' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md]
92+
[32, 55, 159, 162]:ClassVariable: OAuth2::Response declares the class variable '@@parsers' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md]
93+
[133, 135]:DuplicateMethodCall: OAuth2::Response#content_type calls 'response.headers' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
94+
[156, 157, 158, 159]:DuplicateMethodCall: OAuth2::Response#parser calls 'options[:parse]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
95+
[12]:InstanceVariableAssumption: OAuth2::Response assumes too much for instance variable '@parsed' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
96+
[12]:InstanceVariableAssumption: OAuth2::Response assumes too much for instance variable '@parser' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
97+
[110]:ManualDispatch: OAuth2::Response#parsed manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
98+
[156]:ManualDispatch: OAuth2::Response#parser manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
99+
[106]:TooManyStatements: OAuth2::Response#parsed has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
100100
[7]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
101101
lib/oauth2/strategy/assertion.rb -- 5 warnings:
102102
[96, 96, 98, 98]:FeatureEnvy: OAuth2::Strategy::Assertion#build_assertion refers to 'encoding_opts' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]

doc/OAuth2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ <h3 class="signature first" id="configure-class_method">
326326
</div>
327327

328328
<div id="footer">
329-
Generated on Fri May 23 11:14:08 2025 by
329+
Generated on Fri May 23 11:58:46 2025 by
330330
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
331331
0.9.37 (ruby-3.4.3).
332332
</div>

doc/OAuth2/AccessToken.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3069,7 +3069,7 @@ <h3 class="signature " id="to_hash-instance_method">
30693069
</div>
30703070

30713071
<div id="footer">
3072-
Generated on Fri May 23 11:14:09 2025 by
3072+
Generated on Fri May 23 11:58:46 2025 by
30733073
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
30743074
0.9.37 (ruby-3.4.3).
30753075
</div>

doc/OAuth2/Authenticator.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ <h3 class="signature first" id="apply-instance_method">
631631
</div>
632632

633633
<div id="footer">
634-
Generated on Fri May 23 11:14:09 2025 by
634+
Generated on Fri May 23 11:58:46 2025 by
635635
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
636636
0.9.37 (ruby-3.4.3).
637637
</div>

doc/OAuth2/Client.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2651,7 +2651,7 @@ <h3 class="signature " id="token_url-instance_method">
26512651
</div>
26522652

26532653
<div id="footer">
2654-
Generated on Fri May 23 11:14:08 2025 by
2654+
Generated on Fri May 23 11:58:46 2025 by
26552655
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
26562656
0.9.37 (ruby-3.4.3).
26572657
</div>

doc/OAuth2/Error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ <h3 class="signature " id="response-instance_method">
518518
</div>
519519

520520
<div id="footer">
521-
Generated on Fri May 23 11:14:08 2025 by
521+
Generated on Fri May 23 11:58:46 2025 by
522522
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
523523
0.9.37 (ruby-3.4.3).
524524
</div>

doc/OAuth2/FilteredAttributes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ <h3 class="signature first" id="inspect-instance_method">
268268
</div>
269269

270270
<div id="footer">
271-
Generated on Fri May 23 11:14:08 2025 by
271+
Generated on Fri May 23 11:58:46 2025 by
272272
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
273273
0.9.37 (ruby-3.4.3).
274274
</div>

doc/OAuth2/FilteredAttributes/ClassMethods.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ <h3 class="signature " id="filtered_attributes-instance_method">
218218
</div>
219219

220220
<div id="footer">
221-
Generated on Fri May 23 11:14:08 2025 by
221+
Generated on Fri May 23 11:58:46 2025 by
222222
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
223223
0.9.37 (ruby-3.4.3).
224224
</div>

0 commit comments

Comments
 (0)