From eedb25acbfc2b8881210934aee7bf9da7da4c36b Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Wed, 21 May 2025 09:40:25 +0700 Subject: [PATCH 01/11] =?UTF-8?q?=F0=9F=8E=A8=20Alphabetize=20requires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/spec_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 949225bd..0a242d73 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,13 +4,13 @@ ENV["RACK_ENV"] = "test" # Third Party Libraries -require "rspec/stubbed_env" -require "silent_stream" require "addressable/uri" -require "rspec/pending_for" require "rspec/block_is_expected" -require "version_gem/ruby" +require "rspec/pending_for" +require "rspec/stubbed_env" +require "silent_stream" require "version_gem/rspec" +require "version_gem/ruby" # Extensions require_relative "ext/backports" From bee827049d4a7a8ca70a8b2ea0cabbfed4a1711c Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 05:08:42 +0700 Subject: [PATCH 02/11] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20snaky=5Fhash=20v2.0.?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 22 ++++++++++++---------- oauth2.gemspec | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index efb19018..f08b86d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ PATH logger (~> 1.2) multi_xml (~> 0.5) rack (>= 1.2, < 4) - snaky_hash (~> 2.0) + snaky_hash (~> 2.0, >= 2.0.2) version_gem (>= 1.1.8, < 3) GEM @@ -83,6 +83,7 @@ GEM dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) + erb (5.0.1) faraday (2.13.1) faraday-net_http (>= 2.0, < 3.5) json @@ -92,7 +93,7 @@ GEM gem_bench (2.0.5) bundler (>= 1.14) version_gem (~> 1.1, >= 1.1.4) - hashie (0.4.0) + hashie (5.0.0) io-console (0.8.0) irb (1.15.2) pp (>= 0.6.0) @@ -101,7 +102,7 @@ GEM json (2.12.0) jwt (3.0.0.beta1) base64 - kettle-soup-cover (1.0.6) + kettle-soup-cover (1.0.9) simplecov (~> 0.22) simplecov-cobertura (~> 2.1) simplecov-console (~> 0.9, >= 0.9.1) @@ -140,10 +141,11 @@ GEM stringio public_suffix (6.0.2) racc (1.8.1) - rack (3.1.14) + rack (3.1.15) rainbow (3.1.1) rake (13.2.1) - rdoc (6.13.1) + rdoc (6.14.0) + erb psych (>= 4.0.0) reek (6.5.0) dry-schema (~> 1.13) @@ -175,7 +177,7 @@ GEM ruby_version (~> 1.0) rspec-stubbed_env (1.0.2) rspec-support (3.13.3) - rubocop (1.75.6) + rubocop (1.75.7) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -249,9 +251,9 @@ GEM simplecov-rcov (0.3.7) simplecov (>= 0.4.1) simplecov_json_formatter (0.1.4) - snaky_hash (2.0.1) - hashie - version_gem (~> 1.1, >= 1.1.1) + snaky_hash (2.0.2) + hashie (>= 0.1.0, < 6) + version_gem (>= 1.1.8, < 3) standard (1.50.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) @@ -284,7 +286,7 @@ GEM yard (0.9.37) yard-relative_markdown_links (0.5.0) nokogiri (>= 1.14.3, < 2) - zeitwerk (2.7.2) + zeitwerk (2.7.3) PLATFORMS x86_64-darwin-21 diff --git a/oauth2.gemspec b/oauth2.gemspec index f3e13c7f..6b8d7ec4 100644 --- a/oauth2.gemspec +++ b/oauth2.gemspec @@ -131,7 +131,7 @@ Thanks, |7eter l-|. l3oling spec.add_dependency("logger", "~> 1.2") # Ruby >= 0 spec.add_dependency("multi_xml", "~> 0.5") # Ruby >= 0 spec.add_dependency("rack", [">= 1.2", "< 4"]) # Ruby >= 0 - spec.add_dependency("snaky_hash", "~> 2.0") # Ruby >= 2.2 + spec.add_dependency("snaky_hash", "~> 2.0", ">= 2.0.2") # Ruby >= 2.2 spec.add_dependency("version_gem", ">= 1.1.8", "< 3") # Ruby >= 2.2 spec.add_development_dependency("addressable", "~> 2.8", ">= 2.8.7") # ruby >= 2.2 From 79ada49dc9d57edf95c170492082f0e8fb513e35 Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 05:38:21 +0700 Subject: [PATCH 03/11] =?UTF-8?q?=F0=9F=90=9B=20Fix=20regression=20in=20pa?= =?UTF-8?q?rsed=20return=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .rubocop_gradual.lock | 24 ++++----- README.md | 2 +- REEK | 22 ++++---- doc/OAuth2.html | 2 +- doc/OAuth2/AccessToken.html | 2 +- doc/OAuth2/Authenticator.html | 2 +- doc/OAuth2/Client.html | 2 +- doc/OAuth2/Error.html | 2 +- doc/OAuth2/FilteredAttributes.html | 2 +- .../FilteredAttributes/ClassMethods.html | 2 +- doc/OAuth2/Response.html | 20 ++++--- doc/OAuth2/Strategy.html | 2 +- doc/OAuth2/Strategy/Assertion.html | 2 +- doc/OAuth2/Strategy/AuthCode.html | 2 +- doc/OAuth2/Strategy/Base.html | 2 +- doc/OAuth2/Strategy/ClientCredentials.html | 2 +- doc/OAuth2/Strategy/Implicit.html | 2 +- doc/OAuth2/Strategy/Password.html | 2 +- doc/OAuth2/Version.html | 2 +- doc/_index.html | 2 +- doc/file.CHANGELOG.html | 2 +- doc/file.CODE_OF_CONDUCT.html | 2 +- doc/file.CONTRIBUTING.html | 2 +- doc/file.LICENSE.html | 2 +- doc/file.README.html | 2 +- doc/file.SECURITY.html | 2 +- doc/index.html | 2 +- doc/top-level-namespace.html | 2 +- lib/oauth2/response.rb | 5 +- spec/oauth2/client_spec.rb | 53 +++++++++---------- 30 files changed, 85 insertions(+), 89 deletions(-) diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index 02e508b5..e557c814 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -18,10 +18,10 @@ [9, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020], [13, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020] ], - "lib/oauth2/response.rb:4048171841": [ + "lib/oauth2/response.rb:1516229748": [ [35, 5, 204, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 996912427] ], - "oauth2.gemspec:3929706977": [ + "oauth2.gemspec:1301437182": [ [5, 23, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028] ], "spec/oauth2/access_token_spec.rb:443932125": [ @@ -41,7 +41,7 @@ [69, 15, 38, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1480816240], [79, 13, 23, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2314399065] ], - "spec/oauth2/client_spec.rb:2985507284": [ + "spec/oauth2/client_spec.rb:1455422151": [ [6, 1, 29, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/client*_spec.rb`.", 439549885], [175, 7, 492, "RSpec/NoExpectationExample: No expectation found in this example.", 1272021224], [194, 7, 592, "RSpec/NoExpectationExample: No expectation found in this example.", 3428877205], @@ -49,15 +49,15 @@ [222, 15, 20, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1276531672], [237, 15, 43, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1383956904], [252, 15, 43, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3376202107], - [830, 5, 360, "RSpec/NoExpectationExample: No expectation found in this example.", 536201463], - [839, 5, 461, "RSpec/NoExpectationExample: No expectation found in this example.", 3392600621], - [850, 5, 340, "RSpec/NoExpectationExample: No expectation found in this example.", 244592251], - [978, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886], - [982, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529], - [990, 7, 89, "RSpec/NoExpectationExample: No expectation found in this example.", 4609419], - [1078, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886], - [1082, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529], - [1162, 17, 12, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 664794325] + [827, 5, 360, "RSpec/NoExpectationExample: No expectation found in this example.", 536201463], + [836, 5, 461, "RSpec/NoExpectationExample: No expectation found in this example.", 3392600621], + [847, 5, 340, "RSpec/NoExpectationExample: No expectation found in this example.", 244592251], + [975, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886], + [979, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529], + [987, 7, 89, "RSpec/NoExpectationExample: No expectation found in this example.", 4609419], + [1075, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886], + [1079, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529], + [1159, 17, 12, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 664794325] ], "spec/oauth2/error_spec.rb:1692696277": [ [23, 1, 28, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/error*_spec.rb`.", 3385870076], diff --git a/README.md b/README.md index 5c030302..c58df99e 100644 --- a/README.md +++ b/README.md @@ -477,7 +477,7 @@ response.parsed.access_token # => "aaaaaaaa" response.parsed[:access_token] # => "aaaaaaaa" response.parsed.additional_data # => "additional" response.parsed[:additional_data] # => "additional" -response.parsed.class.name # => OAuth2::SnakyHash (subclass of Hashie::Mash::Rash, from `rash_alt` gem) +response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash gem) ``` #### What if I hate snakes and/or indifference? diff --git a/REEK b/REEK index c95a8e4b..5238fe76 100644 --- a/REEK +++ b/REEK @@ -1,9 +1,9 @@ spec/oauth2/access_token_spec.rb -- 1 warning: [292, 293]:DuplicateMethodCall: assert_initialized_token calls 'target.params' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] spec/oauth2/client_spec.rb -- 3 warnings: - [1075]:UnusedParameters: initialize has unused parameter 'client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md] - [1075]:UnusedParameters: initialize has unused parameter 'hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md] - [1211]: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] + [1072]:UnusedParameters: initialize has unused parameter 'client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md] + [1072]:UnusedParameters: initialize has unused parameter 'hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md] + [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] spec/oauth2/error_spec.rb -- 3 warnings: [10]:IrresponsibleModule: XmledString has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md] [4]:SubclassedFromCoreClass: StirredHash inherits from core class 'Hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Subclassed-From-Core-Class.md] @@ -87,15 +87,15 @@ lib/oauth2/filtered_attributes.rb -- 6 warnings: lib/oauth2/response.rb -- 12 warnings: [15]:Attribute: OAuth2::Response#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md] [51]:BooleanParameter: OAuth2::Response#initialize has boolean parameter 'snaky' [https://github.com/troessner/reek/blob/v6.5.0/docs/Boolean-Parameter.md] - [25, 39, 134]:ClassVariable: OAuth2::Response declares the class variable '@@content_types' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md] - [19, 37, 131, 134]:ClassVariable: OAuth2::Response declares the class variable '@@parsers' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md] - [103, 105]:DuplicateMethodCall: OAuth2::Response#content_type calls 'response.headers' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] - [128, 129, 130, 131]:DuplicateMethodCall: OAuth2::Response#parser calls 'options[:parse]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [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] + [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] + [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] + [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] [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] [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] [82]:ManualDispatch: OAuth2::Response#parsed manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md] - [128]:ManualDispatch: OAuth2::Response#parser manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md] - [78]:TooManyStatements: OAuth2::Response#parsed has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] + [127]:ManualDispatch: OAuth2::Response#parser manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md] + [78]:TooManyStatements: OAuth2::Response#parsed has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] [7]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md] lib/oauth2/strategy/assertion.rb -- 5 warnings: [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] @@ -125,4 +125,6 @@ lib/oauth2/version.rb -- 1 warning: [3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md] lib/oauth2.rb -- 1 warning: [27]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md] -110 total warnings +.yard_gfm_support.rb -- 1 warning: + [9, 9]:FeatureEnvy: KramdownGfmDocument#initialize refers to 'options' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md] +111 total warnings diff --git a/doc/OAuth2.html b/doc/OAuth2.html index 0a7f446d..435f29eb 100644 --- a/doc/OAuth2.html +++ b/doc/OAuth2.html @@ -326,7 +326,7 @@

diff --git a/doc/OAuth2/AccessToken.html b/doc/OAuth2/AccessToken.html index 48b039f9..8afe3a11 100644 --- a/doc/OAuth2/AccessToken.html +++ b/doc/OAuth2/AccessToken.html @@ -3051,7 +3051,7 @@

diff --git a/doc/OAuth2/Authenticator.html b/doc/OAuth2/Authenticator.html index 5ffdae85..203f83c5 100644 --- a/doc/OAuth2/Authenticator.html +++ b/doc/OAuth2/Authenticator.html @@ -631,7 +631,7 @@

diff --git a/doc/OAuth2/Client.html b/doc/OAuth2/Client.html index 14f5f2f9..d2362bf7 100644 --- a/doc/OAuth2/Client.html +++ b/doc/OAuth2/Client.html @@ -2651,7 +2651,7 @@

diff --git a/doc/OAuth2/Error.html b/doc/OAuth2/Error.html index cd22f78e..7c8c82a3 100644 --- a/doc/OAuth2/Error.html +++ b/doc/OAuth2/Error.html @@ -518,7 +518,7 @@

diff --git a/doc/OAuth2/FilteredAttributes.html b/doc/OAuth2/FilteredAttributes.html index 5753ef70..5bae1109 100644 --- a/doc/OAuth2/FilteredAttributes.html +++ b/doc/OAuth2/FilteredAttributes.html @@ -268,7 +268,7 @@

diff --git a/doc/OAuth2/FilteredAttributes/ClassMethods.html b/doc/OAuth2/FilteredAttributes/ClassMethods.html index 9fec7deb..1f6d746b 100644 --- a/doc/OAuth2/FilteredAttributes/ClassMethods.html +++ b/doc/OAuth2/FilteredAttributes/ClassMethods.html @@ -218,7 +218,7 @@

diff --git a/doc/OAuth2/Response.html b/doc/OAuth2/Response.html index 8a550ee3..ebe35500 100644 --- a/doc/OAuth2/Response.html +++ b/doc/OAuth2/Response.html @@ -824,14 +824,14 @@

 
 
+101
 102
 103
 104
-105
-106
+105 -
# File 'lib/oauth2/response.rb', line 102
+      
# File 'lib/oauth2/response.rb', line 101
 
 def content_type
   return unless response.headers
@@ -958,8 +958,7 @@ 

95 96 97 -98 -99

+98
# File 'lib/oauth2/response.rb', line 78
@@ -980,8 +979,7 @@ 

end if options[:snaky] && @parsed.is_a?(Hash) - parsed = SnakyHash::StringKeyed.new(@parsed) - @parsed = parsed.to_h + @parsed = SnakyHash::StringKeyed.new(@parsed) end @parsed @@ -1058,6 +1056,7 @@

 
 
+123
 124
 125
 126
@@ -1068,11 +1067,10 @@ 

131 132 133 -134 -135

+134

-
# File 'lib/oauth2/response.rb', line 124
+      
# File 'lib/oauth2/response.rb', line 123
 
 def parser
   return @parser if defined?(@parser)
@@ -1136,7 +1134,7 @@ 

diff --git a/doc/OAuth2/Strategy.html b/doc/OAuth2/Strategy.html index e929d487..afe51801 100644 --- a/doc/OAuth2/Strategy.html +++ b/doc/OAuth2/Strategy.html @@ -107,7 +107,7 @@

Defined Under Namespace

diff --git a/doc/OAuth2/Strategy/Assertion.html b/doc/OAuth2/Strategy/Assertion.html index f1a244d3..fa3e86f2 100644 --- a/doc/OAuth2/Strategy/Assertion.html +++ b/doc/OAuth2/Strategy/Assertion.html @@ -481,7 +481,7 @@

diff --git a/doc/OAuth2/Strategy/AuthCode.html b/doc/OAuth2/Strategy/AuthCode.html index 6ee434df..f9f72043 100644 --- a/doc/OAuth2/Strategy/AuthCode.html +++ b/doc/OAuth2/Strategy/AuthCode.html @@ -469,7 +469,7 @@

diff --git a/doc/OAuth2/Strategy/Base.html b/doc/OAuth2/Strategy/Base.html index 77ac32f7..58b54f46 100644 --- a/doc/OAuth2/Strategy/Base.html +++ b/doc/OAuth2/Strategy/Base.html @@ -195,7 +195,7 @@

diff --git a/doc/OAuth2/Strategy/ClientCredentials.html b/doc/OAuth2/Strategy/ClientCredentials.html index 31abd6f7..61c7a5ba 100644 --- a/doc/OAuth2/Strategy/ClientCredentials.html +++ b/doc/OAuth2/Strategy/ClientCredentials.html @@ -343,7 +343,7 @@

diff --git a/doc/OAuth2/Strategy/Implicit.html b/doc/OAuth2/Strategy/Implicit.html index a51602e2..b600ad4b 100644 --- a/doc/OAuth2/Strategy/Implicit.html +++ b/doc/OAuth2/Strategy/Implicit.html @@ -410,7 +410,7 @@

diff --git a/doc/OAuth2/Strategy/Password.html b/doc/OAuth2/Strategy/Password.html index 5fce714a..c3e30d22 100644 --- a/doc/OAuth2/Strategy/Password.html +++ b/doc/OAuth2/Strategy/Password.html @@ -364,7 +364,7 @@

diff --git a/doc/OAuth2/Version.html b/doc/OAuth2/Version.html index 24d4cf30..6f553a88 100644 --- a/doc/OAuth2/Version.html +++ b/doc/OAuth2/Version.html @@ -111,7 +111,7 @@

diff --git a/doc/_index.html b/doc/_index.html index 81769448..541c36bc 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -300,7 +300,7 @@

Namespace Listing A-Z

diff --git a/doc/file.CHANGELOG.html b/doc/file.CHANGELOG.html index 5fe2746f..1113489c 100644 --- a/doc/file.CHANGELOG.html +++ b/doc/file.CHANGELOG.html @@ -773,7 +773,7 @@

diff --git a/doc/file.CODE_OF_CONDUCT.html b/doc/file.CODE_OF_CONDUCT.html index 712b78e4..5781bf53 100644 --- a/doc/file.CODE_OF_CONDUCT.html +++ b/doc/file.CODE_OF_CONDUCT.html @@ -192,7 +192,7 @@

Attribution

diff --git a/doc/file.CONTRIBUTING.html b/doc/file.CONTRIBUTING.html index 62395fa3..8ac909f4 100644 --- a/doc/file.CONTRIBUTING.html +++ b/doc/file.CONTRIBUTING.html @@ -195,7 +195,7 @@

To release a new version:

diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index 0e0118bc..6e9936f3 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -60,7 +60,7 @@
MIT License

Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
diff --git a/doc/file.README.html b/doc/file.README.html index 6a28b213..deb4dc97 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -957,7 +957,7 @@

🤑 One more thing

diff --git a/doc/file.SECURITY.html b/doc/file.SECURITY.html index 76df6ca8..c879d7c3 100644 --- a/doc/file.SECURITY.html +++ b/doc/file.SECURITY.html @@ -110,7 +110,7 @@

OAuth2 for Enterprise

diff --git a/doc/index.html b/doc/index.html index f3453b28..b8e40e78 100644 --- a/doc/index.html +++ b/doc/index.html @@ -957,7 +957,7 @@

🤑 One more thing

diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 9a66113c..f7c1afe8 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -100,7 +100,7 @@

Defined Under Namespace

diff --git a/lib/oauth2/response.rb b/lib/oauth2/response.rb index fb3cf7ce..fe03cd43 100644 --- a/lib/oauth2/response.rb +++ b/lib/oauth2/response.rb @@ -73,7 +73,7 @@ def body # The {#response} {#body} as parsed by {#parser}. # - # @return [Object] As returned by {#parser} if it is #call-able. + # @return [Object, SnakyHash::StringKeyed] As returned by {#parser} if #call-able; snaky hash if options[:snaky]. # @return [nil] If the {#parser} is not #call-able. def parsed return @parsed if defined?(@parsed) @@ -91,8 +91,7 @@ def parsed end if options[:snaky] && @parsed.is_a?(Hash) - parsed = SnakyHash::StringKeyed.new(@parsed) - @parsed = parsed.to_h + @parsed = SnakyHash::StringKeyed.new(@parsed) end @parsed diff --git a/spec/oauth2/client_spec.rb b/spec/oauth2/client_spec.rb index 3ecdd63f..abe17787 100644 --- a/spec/oauth2/client_spec.rb +++ b/spec/oauth2/client_spec.rb @@ -610,7 +610,6 @@ expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) end end @@ -628,7 +627,6 @@ expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) end context "with alternate token named" do @@ -640,7 +638,6 @@ expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) end it "returns a snake-cased key" do @@ -662,13 +659,15 @@ expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) end it "returns a configured AccessToken" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") - expect(token.response.parsed.to_h).to eq("accessToken" => "the-token") + parsed_h = token.response.parsed.to_h + expect(parsed_h).to eq("accessToken" => "the-token") + expect(parsed_h).to be_a(Hash) + expect(parsed_h).not_to be_a(SnakyHash::StringKeyed) end end @@ -678,7 +677,10 @@ it "returns a configured AccessToken" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") - expect(token.response.parsed.to_h).to eq("accessToken" => "the-token") + parsed_h = token.response.parsed.to_h + expect(parsed_h).to eq("accessToken" => "the-token") + expect(parsed_h).to be_a(Hash) + expect(parsed_h).not_to be_a(SnakyHash::StringKeyed) end it "parsed is a Hash" do @@ -686,7 +688,6 @@ expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) end context "with alternate token name" do @@ -698,13 +699,15 @@ expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) end it "returns a snake-cased key" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") - expect(token.response.parsed.to_h).to eq("bananaFace" => "the-token") + parsed_h = token.response.parsed.to_h + expect(parsed_h).to eq("bananaFace" => "the-token") + expect(parsed_h).to be_a(Hash) + expect(parsed_h).not_to be_a(SnakyHash::StringKeyed) end end end @@ -718,12 +721,11 @@ context "with token_name" do let(:access_token_opts) { {token_name: "access_token"} } - it "parsed is a Hash" do + it "parsed is a SnakyHash::StringKeyed" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) - expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) + expect(token.response.parsed).to be_a(SnakyHash::StringKeyed) end it "returns a snake-cased key" do @@ -736,12 +738,11 @@ let(:access_token_opts) { {token_name: "banana_face"} } let(:response_body) { JSON.dump("banana_face" => "the-token") } - it "parsed is a Hash" do + it "parsed is a SnakyHash::StringKeyed" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) - expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) + expect(token.response.parsed).to be_a(SnakyHash::StringKeyed) end it "returns a snake-cased key" do @@ -759,12 +760,11 @@ expect(token.response.parsed.to_h).to eq("access_token" => "the-token") end - it "parsed is a Hash" do + it "parsed is a SnakyHash::StringKeyed" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) - expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) + expect(token.response.parsed).to be_a(SnakyHash::StringKeyed) end end end @@ -775,12 +775,11 @@ context "with token_name" do let(:access_token_opts) { {token_name: "accessToken"} } - it "parsed is a Hash, but no token since snaky changed key" do + it "parsed is a SnakyHash::StringKeyed, and token is found" do expect(token).to be_a OAuth2::AccessToken - expect(token.token).to eq("") + expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) - expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) + expect(token.response.parsed).to be_a(SnakyHash::StringKeyed) end it "returns a snake-cased key" do @@ -792,12 +791,11 @@ let(:access_token_opts) { {token_name: "banana_butter_cake"} } let(:response_body) { JSON.dump("banana-butterCake" => "the-token") } - it "parsed is a Hash" do + it "parsed is a SnakyHash::StringKeyed" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) - expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) + expect(token.response.parsed).to be_a(SnakyHash::StringKeyed) end it "returns a snake-cased key" do @@ -809,12 +807,11 @@ end context "without token_name" do - it "parsed is a Hash" do + it "parsed is a SnakyHash::StringKeyed" do expect(token).to be_a OAuth2::AccessToken expect(token.token).to eq("the-token") expect(token.response.parsed).to be_a(Hash) - expect(token.response.parsed).not_to be_a(SnakyHash::StringKeyed) - expect(token.response.parsed).not_to be_a(SnakyHash::SymbolKeyed) + expect(token.response.parsed).to be_a(SnakyHash::StringKeyed) end it "returns a snake-cased key" do From 86c8d5ea9d99f470b16f870473988cf2d4c06642 Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 08:07:49 +0700 Subject: [PATCH 04/11] =?UTF-8?q?=F0=9F=90=9B=20Fix=20bug=20when=20running?= =?UTF-8?q?=20Hashie=20v0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New caboose workflow is an absolute wagon --- .github/workflows/ancient.yml | 10 +- .github/workflows/caboose.yml | 106 ++++++++++++++++++ Appraisals | 52 ++++++++- README.md | 22 +++- gemfiles/audit.gemfile | 2 +- gemfiles/coverage.gemfile | 2 +- gemfiles/current.gemfile | 2 +- gemfiles/current_runtime_heads.gemfile | 2 +- gemfiles/head.gemfile | 2 +- gemfiles/omnibus.gemfile | 2 +- ...2_3.gemfile => ruby_2_3_hashie_v0.gemfile} | 2 +- gemfiles/ruby_2_3_hashie_v1.gemfile | 17 +++ gemfiles/ruby_2_3_hashie_v2.gemfile | 17 +++ gemfiles/ruby_2_3_hashie_v3.gemfile | 17 +++ gemfiles/ruby_2_3_hashie_v4.gemfile | 17 +++ gemfiles/ruby_2_3_hashie_v5.gemfile | 17 +++ gemfiles/ruby_2_4.gemfile | 2 +- gemfiles/ruby_2_5.gemfile | 2 +- gemfiles/ruby_2_6.gemfile | 2 +- gemfiles/ruby_2_7.gemfile | 2 +- gemfiles/ruby_3_0.gemfile | 2 +- gemfiles/ruby_3_1.gemfile | 2 +- gemfiles/ruby_3_2.gemfile | 2 +- gemfiles/ruby_3_3.gemfile | 2 +- gemfiles/style.gemfile | 2 +- gemfiles/vanilla.gemfile | 2 +- lib/oauth2/access_token.rb | 8 +- 27 files changed, 288 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/caboose.yml rename gemfiles/{ruby_2_3.gemfile => ruby_2_3_hashie_v0.gemfile} (93%) create mode 100644 gemfiles/ruby_2_3_hashie_v1.gemfile create mode 100644 gemfiles/ruby_2_3_hashie_v2.gemfile create mode 100644 gemfiles/ruby_2_3_hashie_v3.gemfile create mode 100644 gemfiles/ruby_2_3_hashie_v4.gemfile create mode 100644 gemfiles/ruby_2_3_hashie_v5.gemfile diff --git a/.github/workflows/ancient.yml b/.github/workflows/ancient.yml index 8771e589..1ee86098 100644 --- a/.github/workflows/ancient.yml +++ b/.github/workflows/ancient.yml @@ -1,4 +1,4 @@ -name: MRI 2.3, 2.4, 2.5 (EOL) +name: MRI 2.4, 2.5 (EOL) permissions: contents: read @@ -34,14 +34,6 @@ jobs: fail-fast: false matrix: include: - # Ruby 2.3 - - ruby: "ruby-2.3" - appraisal: "ruby-2-3" - exec_cmd: "rake test" - gemfile: "Appraisal.root" - rubygems: "3.3.27" - bundler: "2.3.27" - # Ruby 2.4 - ruby: "ruby-2.4" appraisal: "ruby-2-4" diff --git a/.github/workflows/caboose.yml b/.github/workflows/caboose.yml new file mode 100644 index 00000000..02a381d2 --- /dev/null +++ b/.github/workflows/caboose.yml @@ -0,0 +1,106 @@ +# THE CABOOSE IS AN ABSOLUTE WAGON +name: MRI 2.3 X Hashie WAGON (EOL) + +permissions: + contents: read + +on: + push: + branches: + - 'main' + - '*-stable' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-22.04 + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + fail-fast: false + matrix: + include: + # Ruby 2.3 + - ruby: "ruby-2.3" + appraisal: "ruby-2-3-hashie_v0" + exec_cmd: "rake test" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + # Ruby 2.3 + - ruby: "ruby-2.3" + appraisal: "ruby-2-3-hashie_v1" + exec_cmd: "rake test" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + # Ruby 2.3 + - ruby: "ruby-2.3" + appraisal: "ruby-2-3-hashie_v2" + exec_cmd: "rake test" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + # Ruby 2.3 + - ruby: "ruby-2.3" + appraisal: "ruby-2-3-hashie_v3" + exec_cmd: "rake test" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + # Ruby 2.3 + - ruby: "ruby-2.3" + appraisal: "ruby-2-3-hashie_v4" + exec_cmd: "rake test" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + # Ruby 2.3 + - ruby: "ruby-2.3" + appraisal: "ruby-2-3-hashie_v5" + exec_cmd: "rake test" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the primary Gemfile at all. + - name: Install Root Appraisal + run: bundle > /dev/null 2>&1 + - name: Appraisal for ${{ matrix.appraisal }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle > /dev/null 2>&1 + - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} diff --git a/Appraisals b/Appraisals index 9adc4170..adbae164 100644 --- a/Appraisals +++ b/Appraisals @@ -35,7 +35,7 @@ appraise "current" do remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch end -appraise "ruby-2-3" do +appraise "ruby-2-3-hashie_v0" do eval_gemfile "modular/faraday_v0.gemfile" eval_gemfile "modular/hashie_v0.gemfile" eval_gemfile "modular/jwt_v1.gemfile" @@ -45,6 +45,56 @@ appraise "ruby-2-3" do remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch end +appraise "ruby-2-3-hashie_v1" do + eval_gemfile "modular/faraday_v0.gemfile" + eval_gemfile "modular/hashie_v1.gemfile" + eval_gemfile "modular/jwt_v1.gemfile" + eval_gemfile "modular/logger_v1_2.gemfile" + eval_gemfile "modular/multi_xml_v0_5.gemfile" + eval_gemfile "modular/rack_v1_2.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +appraise "ruby-2-3-hashie_v2" do + eval_gemfile "modular/faraday_v0.gemfile" + eval_gemfile "modular/hashie_v2.gemfile" + eval_gemfile "modular/jwt_v1.gemfile" + eval_gemfile "modular/logger_v1_2.gemfile" + eval_gemfile "modular/multi_xml_v0_5.gemfile" + eval_gemfile "modular/rack_v1_2.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +appraise "ruby-2-3-hashie_v3" do + eval_gemfile "modular/faraday_v0.gemfile" + eval_gemfile "modular/hashie_v3.gemfile" + eval_gemfile "modular/jwt_v1.gemfile" + eval_gemfile "modular/logger_v1_2.gemfile" + eval_gemfile "modular/multi_xml_v0_5.gemfile" + eval_gemfile "modular/rack_v1_2.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +appraise "ruby-2-3-hashie_v4" do + eval_gemfile "modular/faraday_v0.gemfile" + eval_gemfile "modular/hashie_v4.gemfile" + eval_gemfile "modular/jwt_v1.gemfile" + eval_gemfile "modular/logger_v1_2.gemfile" + eval_gemfile "modular/multi_xml_v0_5.gemfile" + eval_gemfile "modular/rack_v1_2.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +appraise "ruby-2-3-hashie_v5" do + eval_gemfile "modular/faraday_v0.gemfile" + eval_gemfile "modular/hashie_v5.gemfile" + eval_gemfile "modular/jwt_v1.gemfile" + eval_gemfile "modular/logger_v1_2.gemfile" + eval_gemfile "modular/multi_xml_v0_5.gemfile" + eval_gemfile "modular/rack_v1_2.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + appraise "ruby-2-4" do eval_gemfile "modular/faraday_v1.gemfile" eval_gemfile "modular/hashie_v1.gemfile" diff --git a/README.md b/README.md index c58df99e..058cf303 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## 🔐 OAuth2 -[![Version][👽versioni]][👽version] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![Depfu][🔑depfui♻️]][🔑depfu] [![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls] [![QLTY Test Coverage][🔑qlty-covi♻️]][🔑qlty-cov] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL] +[![Version][👽versioni]][👽version] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![Depfu][🔑depfui♻️]][🔑depfu] [![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls] [![QLTY Test Coverage][🔑qlty-covi♻️]][🔑qlty-cov] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Caboose is an absolute WAGON][🚎13-cbs-wfi]][🚎13-cbs-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL] --- @@ -164,6 +164,7 @@ One of these might be what you are looking for: | Version | Release Date | CHANGELOG | README | |---------|--------------|---------------------------------------|---------------------------------| +| 2.0.11 | 2025-05-21 | [v2.0.11 CHANGELOG][2.0.11-changelog] | [v2.0.10 README][2.0.11-readme] | | 2.0.10 | 2025-05-17 | [v2.0.10 CHANGELOG][2.0.10-changelog] | [v2.0.10 README][2.0.10-readme] | | 2.0.9 | 2022-09-16 | [v2.0.9 CHANGELOG][2.0.9-changelog] | [v2.0.9 README][2.0.9-readme] | | 2.0.8 | 2022-09-01 | [v2.0.8 CHANGELOG][2.0.8-changelog] | [v2.0.8 README][2.0.8-readme] | @@ -177,6 +178,7 @@ One of these might be what you are looking for: | 2.0.0 | 2022-06-21 | [v2.0.0 CHANGELOG][2.0.0-changelog] | [v2.0.0 README][2.0.0-readme] | +[2.0.11-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2011---2025-05-21 [2.0.10-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2010---2025-05-17 [2.0.9-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#209---2022-09-16 [2.0.8-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#208---2022-09-01 @@ -189,6 +191,7 @@ One of these might be what you are looking for: [2.0.1-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#201---2022-06-22 [2.0.0-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#200---2022-06-21 +[2.0.10-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.11/README.md [2.0.10-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.10/README.md [2.0.9-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.9/README.md [2.0.8-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.8/README.md @@ -480,6 +483,21 @@ response.parsed[:additional_data] # => "additional" response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash gem) ``` +#### Serialization + +As of v2.0.11, if you need to serialize the parsed result, you can! + +There are two ways to do this. + +1. Global: put this in your code somewhere reasonable (like an initializer for Rails): +```ruby +SnakyHash::StringKeyed.class_eval do + extend SnakyHash::Serializer +end +``` + +2. + #### What if I hate snakes and/or indifference? ```ruby @@ -811,6 +829,8 @@ or one of the others at the head of this README. [🚎11-c-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/current.yml/badge.svg [🚎12-crh-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/current-runtime-heads.yml [🚎12-crh-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/current-runtime-heads.yml/badge.svg +[🚎13-cbs-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/caboose.yml +[🚎13-cbs-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/caboose.yml/badge.svg [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay [⛳liberapay]: https://liberapay.com/pboling/donate [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github diff --git a/gemfiles/audit.gemfile b/gemfiles/audit.gemfile index 173a1e36..51d2169c 100644 --- a/gemfiles/audit.gemfile +++ b/gemfiles/audit.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/audit.gemfile") diff --git a/gemfiles/coverage.gemfile b/gemfiles/coverage.gemfile index 6b348995..89a57ce0 100644 --- a/gemfiles/coverage.gemfile +++ b/gemfiles/coverage.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/coverage.gemfile") diff --git a/gemfiles/current.gemfile b/gemfiles/current.gemfile index c4f47527..05f8012c 100644 --- a/gemfiles/current.gemfile +++ b/gemfiles/current.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/current_runtime_heads.gemfile b/gemfiles/current_runtime_heads.gemfile index fc9c120d..74ea868d 100644 --- a/gemfiles/current_runtime_heads.gemfile +++ b/gemfiles/current_runtime_heads.gemfile @@ -5,6 +5,6 @@ source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/runtime_heads.gemfile") diff --git a/gemfiles/head.gemfile b/gemfiles/head.gemfile index fc9c120d..74ea868d 100644 --- a/gemfiles/head.gemfile +++ b/gemfiles/head.gemfile @@ -5,6 +5,6 @@ source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/runtime_heads.gemfile") diff --git a/gemfiles/omnibus.gemfile b/gemfiles/omnibus.gemfile index 57cc634c..168d34cc 100644 --- a/gemfiles/omnibus.gemfile +++ b/gemfiles/omnibus.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/audit.gemfile") diff --git a/gemfiles/ruby_2_3.gemfile b/gemfiles/ruby_2_3_hashie_v0.gemfile similarity index 93% rename from gemfiles/ruby_2_3.gemfile rename to gemfiles/ruby_2_3_hashie_v0.gemfile index 00bcdb3e..088d2f1d 100644 --- a/gemfiles/ruby_2_3.gemfile +++ b/gemfiles/ruby_2_3_hashie_v0.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v0.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v1.gemfile b/gemfiles/ruby_2_3_hashie_v1.gemfile new file mode 100644 index 00000000..7a4ef09a --- /dev/null +++ b/gemfiles/ruby_2_3_hashie_v1.gemfile @@ -0,0 +1,17 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gemspec :path => "../" + +eval_gemfile("modular/faraday_v0.gemfile") + +eval_gemfile("modular/hashie_v1.gemfile") + +eval_gemfile("modular/jwt_v1.gemfile") + +eval_gemfile("modular/logger_v1_2.gemfile") + +eval_gemfile("modular/multi_xml_v0_5.gemfile") + +eval_gemfile("modular/rack_v1_2.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v2.gemfile b/gemfiles/ruby_2_3_hashie_v2.gemfile new file mode 100644 index 00000000..ce43494c --- /dev/null +++ b/gemfiles/ruby_2_3_hashie_v2.gemfile @@ -0,0 +1,17 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gemspec :path => "../" + +eval_gemfile("modular/faraday_v0.gemfile") + +eval_gemfile("modular/hashie_v2.gemfile") + +eval_gemfile("modular/jwt_v1.gemfile") + +eval_gemfile("modular/logger_v1_2.gemfile") + +eval_gemfile("modular/multi_xml_v0_5.gemfile") + +eval_gemfile("modular/rack_v1_2.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v3.gemfile b/gemfiles/ruby_2_3_hashie_v3.gemfile new file mode 100644 index 00000000..3e4f6152 --- /dev/null +++ b/gemfiles/ruby_2_3_hashie_v3.gemfile @@ -0,0 +1,17 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gemspec :path => "../" + +eval_gemfile("modular/faraday_v0.gemfile") + +eval_gemfile("modular/hashie_v3.gemfile") + +eval_gemfile("modular/jwt_v1.gemfile") + +eval_gemfile("modular/logger_v1_2.gemfile") + +eval_gemfile("modular/multi_xml_v0_5.gemfile") + +eval_gemfile("modular/rack_v1_2.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v4.gemfile b/gemfiles/ruby_2_3_hashie_v4.gemfile new file mode 100644 index 00000000..a3f2c430 --- /dev/null +++ b/gemfiles/ruby_2_3_hashie_v4.gemfile @@ -0,0 +1,17 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gemspec :path => "../" + +eval_gemfile("modular/faraday_v0.gemfile") + +eval_gemfile("modular/hashie_v4.gemfile") + +eval_gemfile("modular/jwt_v1.gemfile") + +eval_gemfile("modular/logger_v1_2.gemfile") + +eval_gemfile("modular/multi_xml_v0_5.gemfile") + +eval_gemfile("modular/rack_v1_2.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v5.gemfile b/gemfiles/ruby_2_3_hashie_v5.gemfile new file mode 100644 index 00000000..db80674b --- /dev/null +++ b/gemfiles/ruby_2_3_hashie_v5.gemfile @@ -0,0 +1,17 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gemspec :path => "../" + +eval_gemfile("modular/faraday_v0.gemfile") + +eval_gemfile("modular/hashie_v5.gemfile") + +eval_gemfile("modular/jwt_v1.gemfile") + +eval_gemfile("modular/logger_v1_2.gemfile") + +eval_gemfile("modular/multi_xml_v0_5.gemfile") + +eval_gemfile("modular/rack_v1_2.gemfile") diff --git a/gemfiles/ruby_2_4.gemfile b/gemfiles/ruby_2_4.gemfile index e8c2f7b6..c15b04f9 100644 --- a/gemfiles/ruby_2_4.gemfile +++ b/gemfiles/ruby_2_4.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v1.gemfile") diff --git a/gemfiles/ruby_2_5.gemfile b/gemfiles/ruby_2_5.gemfile index 039fdb5a..cca5f0e8 100644 --- a/gemfiles/ruby_2_5.gemfile +++ b/gemfiles/ruby_2_5.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v1.gemfile") diff --git a/gemfiles/ruby_2_6.gemfile b/gemfiles/ruby_2_6.gemfile index 77a7e508..6e332186 100644 --- a/gemfiles/ruby_2_6.gemfile +++ b/gemfiles/ruby_2_6.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_2_7.gemfile b/gemfiles/ruby_2_7.gemfile index 5d304af5..b38394a3 100644 --- a/gemfiles/ruby_2_7.gemfile +++ b/gemfiles/ruby_2_7.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_0.gemfile b/gemfiles/ruby_3_0.gemfile index 36974019..6c46b863 100644 --- a/gemfiles/ruby_3_0.gemfile +++ b/gemfiles/ruby_3_0.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_1.gemfile b/gemfiles/ruby_3_1.gemfile index 36974019..6c46b863 100644 --- a/gemfiles/ruby_3_1.gemfile +++ b/gemfiles/ruby_3_1.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_2.gemfile b/gemfiles/ruby_3_2.gemfile index f5b6f53d..a173c574 100644 --- a/gemfiles/ruby_3_2.gemfile +++ b/gemfiles/ruby_3_2.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_3.gemfile b/gemfiles/ruby_3_3.gemfile index f5b6f53d..a173c574 100644 --- a/gemfiles/ruby_3_3.gemfile +++ b/gemfiles/ruby_3_3.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/style.gemfile b/gemfiles/style.gemfile index f75762cf..0b9591b7 100644 --- a/gemfiles/style.gemfile +++ b/gemfiles/style.gemfile @@ -5,6 +5,6 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec path: "../" +gemspec :path => "../" eval_gemfile("modular/style.gemfile") diff --git a/gemfiles/vanilla.gemfile b/gemfiles/vanilla.gemfile index 095e6608..a55548f2 100644 --- a/gemfiles/vanilla.gemfile +++ b/gemfiles/vanilla.gemfile @@ -2,4 +2,4 @@ source "https://rubygems.org" -gemspec path: "../" +gemspec :path => "../" diff --git a/lib/oauth2/access_token.rb b/lib/oauth2/access_token.rb index da7e6987..c55228b1 100644 --- a/lib/oauth2/access_token.rb +++ b/lib/oauth2/access_token.rb @@ -54,7 +54,13 @@ def from_hash(client, hash) extra_tokens_warning(supported_keys, t_key) t_key end - token = fresh.delete(key) || "" + token = if !defined?(Hashie::VERSION) # i.e. < "1.0" + warn("snaky_hash and oauth2 will drop support for Hashie v0 in the next major version. Please upgrade to a modern Hashie.") + # There is a bug in Hashie v0, which is accounts for. + fresh.delete(key) || fresh[key] || "" + else + fresh.delete(key) || "" + end new(client, token, fresh) end From 72cbdee2cab1d72e5e2360f865e4a4041590c467 Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 08:31:13 +0700 Subject: [PATCH 05/11] =?UTF-8?q?=F0=9F=90=9B=20Hashie=20<=203.2=20did=20n?= =?UTF-8?q?ot=20require=20hashie/version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hashie < 1.1.0 didn't have a version.rb to require at all --- .rubocop_gradual.lock | 8 +- README.md | 2 +- REEK | 53 +-- doc/OAuth2.html | 2 +- doc/OAuth2/AccessToken.html | 392 +++++++++--------- doc/OAuth2/Authenticator.html | 2 +- doc/OAuth2/Client.html | 2 +- doc/OAuth2/Error.html | 2 +- doc/OAuth2/FilteredAttributes.html | 2 +- .../FilteredAttributes/ClassMethods.html | 2 +- doc/OAuth2/Response.html | 10 +- doc/OAuth2/Strategy.html | 2 +- doc/OAuth2/Strategy/Assertion.html | 2 +- doc/OAuth2/Strategy/AuthCode.html | 2 +- doc/OAuth2/Strategy/Base.html | 2 +- doc/OAuth2/Strategy/ClientCredentials.html | 2 +- doc/OAuth2/Strategy/Implicit.html | 2 +- doc/OAuth2/Strategy/Password.html | 2 +- doc/OAuth2/Version.html | 2 +- doc/_index.html | 2 +- doc/file.CHANGELOG.html | 2 +- doc/file.CODE_OF_CONDUCT.html | 2 +- doc/file.CONTRIBUTING.html | 2 +- doc/file.LICENSE.html | 2 +- doc/file.README.html | 24 +- doc/file.SECURITY.html | 2 +- doc/index.html | 24 +- doc/top-level-namespace.html | 2 +- gemfiles/audit.gemfile | 2 +- gemfiles/coverage.gemfile | 2 +- gemfiles/current.gemfile | 2 +- gemfiles/current_runtime_heads.gemfile | 2 +- gemfiles/head.gemfile | 2 +- gemfiles/omnibus.gemfile | 2 +- gemfiles/ruby_2_3_hashie_v0.gemfile | 2 +- gemfiles/ruby_2_3_hashie_v1.gemfile | 2 +- gemfiles/ruby_2_3_hashie_v2.gemfile | 2 +- gemfiles/ruby_2_3_hashie_v3.gemfile | 2 +- gemfiles/ruby_2_3_hashie_v4.gemfile | 2 +- gemfiles/ruby_2_3_hashie_v5.gemfile | 2 +- gemfiles/ruby_2_4.gemfile | 2 +- gemfiles/ruby_2_5.gemfile | 2 +- gemfiles/ruby_2_6.gemfile | 2 +- gemfiles/ruby_2_7.gemfile | 2 +- gemfiles/ruby_3_0.gemfile | 2 +- gemfiles/ruby_3_1.gemfile | 2 +- gemfiles/ruby_3_2.gemfile | 2 +- gemfiles/ruby_3_3.gemfile | 2 +- gemfiles/style.gemfile | 2 +- gemfiles/vanilla.gemfile | 2 +- lib/oauth2/access_token.rb | 32 +- 51 files changed, 352 insertions(+), 279 deletions(-) diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index e557c814..71c67acf 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -6,9 +6,9 @@ "lib/oauth2.rb:65351186": [ [38, 11, 7, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 651502127] ], - "lib/oauth2/access_token.rb:3471244990": [ - [49, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513], - [55, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513] + "lib/oauth2/access_token.rb:558937598": [ + [64, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513], + [70, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513] ], "lib/oauth2/authenticator.rb:63639854": [ [42, 5, 113, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 734523108] @@ -18,7 +18,7 @@ [9, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020], [13, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020] ], - "lib/oauth2/response.rb:1516229748": [ + "lib/oauth2/response.rb:2808363818": [ [35, 5, 204, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 996912427] ], "oauth2.gemspec:1301437182": [ diff --git a/README.md b/README.md index 058cf303..02f38290 100644 --- a/README.md +++ b/README.md @@ -496,7 +496,7 @@ SnakyHash::StringKeyed.class_eval do end ``` -2. +2. #### What if I hate snakes and/or indifference? diff --git a/REEK b/REEK index 5238fe76..f96c5ee9 100644 --- a/REEK +++ b/REEK @@ -8,31 +8,32 @@ spec/oauth2/error_spec.rb -- 3 warnings: [10]:IrresponsibleModule: XmledString has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md] [4]:SubclassedFromCoreClass: StirredHash inherits from core class 'Hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Subclassed-From-Core-Class.md] [10]:SubclassedFromCoreClass: XmledString inherits from core class 'String' [https://github.com/troessner/reek/blob/v6.5.0/docs/Subclassed-From-Core-Class.md] -lib/oauth2/access_token.rb -- 24 warnings: - [12]:Attribute: OAuth2::AccessToken#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md] - [12]:Attribute: OAuth2::AccessToken#refresh_token is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md] - [12]:Attribute: OAuth2::AccessToken#response is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md] - [302, 310, 317, 324, 331, 338]:DataClump: OAuth2::AccessToken takes parameters ['opts', 'path'] to 6 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md] - [350, 366]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'options[:mode]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] - [356, 360, 362]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'options[:param_name]' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] - [358, 359, 360, 362]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:body]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] - [352, 353]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:headers]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] - [355, 356]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:params]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] - [4]:InstanceVariableAssumption: OAuth2::AccessToken assumes too much for instance variable '@refresh_token' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md] - [4]:IrresponsibleModule: OAuth2::AccessToken has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md] - [349]:MissingSafeMethod: OAuth2::AccessToken has missing safe method 'configure_authentication!' [https://github.com/troessner/reek/blob/v6.5.0/docs/Missing-Safe-Method.md] - [125, 125]:NilCheck: OAuth2::AccessToken#initialize performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md] - [244]:NilCheck: OAuth2::AccessToken#revoke performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md] - [4]:TooManyInstanceVariables: OAuth2::AccessToken has at least 7 instance variables [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Instance-Variables.md] - [4]:TooManyMethods: OAuth2::AccessToken has at least 20 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Methods.md] - [349]:TooManyStatements: OAuth2::AccessToken#configure_authentication! has approx 8 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] - [42]:TooManyStatements: OAuth2::AccessToken#from_hash has approx 10 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] - [185]:TooManyStatements: OAuth2::AccessToken#refresh has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] - [234]:TooManyStatements: OAuth2::AccessToken#revoke has approx 13 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] - [3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md] - [281]:UncommunicativeVariableName: OAuth2::AccessToken#to_hash has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] - [281]:UncommunicativeVariableName: OAuth2::AccessToken#to_hash has the variable name 'v' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] - [370]:UtilityFunction: OAuth2::AccessToken#convert_expires_at 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] +lib/oauth2/access_token.rb -- 25 warnings: + [27]:Attribute: OAuth2::AccessToken#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md] + [27]:Attribute: OAuth2::AccessToken#refresh_token is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md] + [27]:Attribute: OAuth2::AccessToken#response is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md] + [326, 334, 341, 348, 355, 362]:DataClump: OAuth2::AccessToken takes parameters ['opts', 'path'] to 6 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md] + [374, 390]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'options[:mode]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [380, 384, 386]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'options[:param_name]' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [382, 383, 384, 386]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:body]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [376, 377]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:headers]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [379, 380]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:params]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [77, 79]:DuplicateMethodCall: OAuth2::AccessToken#from_hash calls 'fresh.delete(key)' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [19]:InstanceVariableAssumption: OAuth2::AccessToken assumes too much for instance variable '@refresh_token' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md] + [19]:IrresponsibleModule: OAuth2::AccessToken has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md] + [373]:MissingSafeMethod: OAuth2::AccessToken has missing safe method 'configure_authentication!' [https://github.com/troessner/reek/blob/v6.5.0/docs/Missing-Safe-Method.md] + [149, 149]:NilCheck: OAuth2::AccessToken#initialize performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md] + [268]:NilCheck: OAuth2::AccessToken#revoke performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md] + [19]:TooManyInstanceVariables: OAuth2::AccessToken has at least 7 instance variables [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Instance-Variables.md] + [19]:TooManyMethods: OAuth2::AccessToken has at least 20 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Methods.md] + [373]:TooManyStatements: OAuth2::AccessToken#configure_authentication! has approx 8 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] + [57]:TooManyStatements: OAuth2::AccessToken#from_hash has approx 12 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] + [209]:TooManyStatements: OAuth2::AccessToken#refresh has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] + [258]:TooManyStatements: OAuth2::AccessToken#revoke has approx 13 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] + [18]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md] + [305]:UncommunicativeVariableName: OAuth2::AccessToken#to_hash has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [305]:UncommunicativeVariableName: OAuth2::AccessToken#to_hash has the variable name 'v' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [394]:UtilityFunction: OAuth2::AccessToken#convert_expires_at 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] lib/oauth2/authenticator.rb -- 5 warnings: [68, 70]:FeatureEnvy: OAuth2::Authenticator#apply_basic_auth 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] [6]:IrresponsibleModule: OAuth2::Authenticator has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md] @@ -127,4 +128,4 @@ lib/oauth2.rb -- 1 warning: [27]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md] .yard_gfm_support.rb -- 1 warning: [9, 9]:FeatureEnvy: KramdownGfmDocument#initialize refers to 'options' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md] -111 total warnings +112 total warnings diff --git a/doc/OAuth2.html b/doc/OAuth2.html index 435f29eb..0394030e 100644 --- a/doc/OAuth2.html +++ b/doc/OAuth2.html @@ -326,7 +326,7 @@

diff --git a/doc/OAuth2/AccessToken.html b/doc/OAuth2/AccessToken.html index 8afe3a11..e72f9842 100644 --- a/doc/OAuth2/AccessToken.html +++ b/doc/OAuth2/AccessToken.html @@ -1038,30 +1038,6 @@

 
 
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
 142
 143
 144
@@ -1071,10 +1047,34 @@ 

148 149 150 -151

+151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175

-
# File 'lib/oauth2/access_token.rb', line 118
+      
# File 'lib/oauth2/access_token.rb', line 142
 
 def initialize(client, token, opts = {})
   @client = client
@@ -1147,12 +1147,12 @@ 

 
 
-11
-12
-13
+26 +27 +28

-
# File 'lib/oauth2/access_token.rb', line 11
+      
# File 'lib/oauth2/access_token.rb', line 26
 
 def client
   @client
@@ -1189,12 +1189,12 @@ 

 
 
-11
-12
-13
+26 +27 +28

-
# File 'lib/oauth2/access_token.rb', line 11
+      
# File 'lib/oauth2/access_token.rb', line 26
 
 def expires_at
   @expires_at
@@ -1231,12 +1231,12 @@ 

 
 
-11
-12
-13
+26 +27 +28

-
# File 'lib/oauth2/access_token.rb', line 11
+      
# File 'lib/oauth2/access_token.rb', line 26
 
 def expires_in
   @expires_in
@@ -1273,12 +1273,12 @@ 

 
 
-11
-12
-13
+26 +27 +28

-
# File 'lib/oauth2/access_token.rb', line 11
+      
# File 'lib/oauth2/access_token.rb', line 26
 
 def expires_latency
   @expires_latency
@@ -1315,12 +1315,12 @@ 

 
 
-12
-13
-14
+27 +28 +29

-
# File 'lib/oauth2/access_token.rb', line 12
+      
# File 'lib/oauth2/access_token.rb', line 27
 
 def options
   @options
@@ -1357,12 +1357,12 @@ 

 
 
-11
-12
-13
+26 +27 +28

-
# File 'lib/oauth2/access_token.rb', line 11
+      
# File 'lib/oauth2/access_token.rb', line 26
 
 def params
   @params
@@ -1399,12 +1399,12 @@ 

 
 
-12
-13
-14
+27 +28 +29

-
# File 'lib/oauth2/access_token.rb', line 12
+      
# File 'lib/oauth2/access_token.rb', line 27
 
 def refresh_token
   @refresh_token
@@ -1441,12 +1441,12 @@ 

 
 
-12
-13
-14
+27 +28 +29

-
# File 'lib/oauth2/access_token.rb', line 12
+      
# File 'lib/oauth2/access_token.rb', line 27
 
 def response
   @response
@@ -1483,12 +1483,12 @@ 

 
 
-11
-12
-13
+26 +27 +28

-
# File 'lib/oauth2/access_token.rb', line 11
+      
# File 'lib/oauth2/access_token.rb', line 26
 
 def token
   @token
@@ -1731,27 +1731,36 @@ 

Examples:

 
 
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
 57
 58
-59
+59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83
-
# File 'lib/oauth2/access_token.rb', line 42
+      
# File 'lib/oauth2/access_token.rb', line 57
 
 def from_hash(client, hash)
   fresh = hash.dup
@@ -1768,8 +1777,17 @@ 

Examples:

extra_tokens_warning(supported_keys, t_key) t_key end - token = fresh.delete(key) || "" - new(client, token, fresh) + # :nocov: + # TODO: Get rid of this branching logic when dropping Hashie < v3.2 + token = if !defined?(Hashie::VERSION) # i.e. <= "1.1.0"; the first Hashie to ship with a VERSION constant + warn("snaky_hash and oauth2 will drop support for Hashie v0 in the next major version. Please upgrade to a modern Hashie.") + # There is a bug in Hashie v0, which is accounts for. + fresh.delete(key) || fresh[key] || "" + else + fresh.delete(key) || "" + end + # :nocov: + new(client, token, fresh) end
@@ -1852,12 +1870,12 @@

 
 
-66
-67
-68
+90 +91 +92

-
# File 'lib/oauth2/access_token.rb', line 66
+      
# File 'lib/oauth2/access_token.rb', line 90
 
 def from_kvform(client, kvform)
   from_hash(client, Rack::Utils.parse_query(kvform))
@@ -1917,12 +1935,12 @@ 

 
 
-156
-157
-158
+180 +181 +182

-
# File 'lib/oauth2/access_token.rb', line 156
+      
# File 'lib/oauth2/access_token.rb', line 180
 
 def [](key)
   @params[key]
@@ -1964,12 +1982,12 @@ 

 
 
-338
-339
-340
+362 +363 +364

-
# File 'lib/oauth2/access_token.rb', line 338
+      
# File 'lib/oauth2/access_token.rb', line 362
 
 def delete(path, opts = {}, &block)
   request(:delete, path, opts, &block)
@@ -2021,12 +2039,12 @@ 

 
 
-170
-171
-172
+194 +195 +196

-
# File 'lib/oauth2/access_token.rb', line 170
+      
# File 'lib/oauth2/access_token.rb', line 194
 
 def expired?
   expires? && (expires_at <= Time.now.to_i)
@@ -2074,12 +2092,12 @@ 

 
 
-163
-164
-165
+187 +188 +189

-
# File 'lib/oauth2/access_token.rb', line 163
+      
# File 'lib/oauth2/access_token.rb', line 187
 
 def expires?
   !!@expires_at
@@ -2121,12 +2139,12 @@ 

 
 
-310
-311
-312
+334 +335 +336

-
# File 'lib/oauth2/access_token.rb', line 310
+      
# File 'lib/oauth2/access_token.rb', line 334
 
 def get(path, opts = {}, &block)
   request(:get, path, opts, &block)
@@ -2161,12 +2179,12 @@ 

 
 
-343
-344
-345
+367 +368 +369

-
# File 'lib/oauth2/access_token.rb', line 343
+      
# File 'lib/oauth2/access_token.rb', line 367
 
 def headers
   {"Authorization" => options[:header_format] % token}
@@ -2208,12 +2226,12 @@ 

 
 
-331
-332
-333
+355 +356 +357

-
# File 'lib/oauth2/access_token.rb', line 331
+      
# File 'lib/oauth2/access_token.rb', line 355
 
 def patch(path, opts = {}, &block)
   request(:patch, path, opts, &block)
@@ -2255,12 +2273,12 @@ 

 
 
-317
-318
-319
+341 +342 +343

-
# File 'lib/oauth2/access_token.rb', line 317
+      
# File 'lib/oauth2/access_token.rb', line 341
 
 def post(path, opts = {}, &block)
   request(:post, path, opts, &block)
@@ -2302,12 +2320,12 @@ 

 
 
-324
-325
-326
+348 +349 +350

-
# File 'lib/oauth2/access_token.rb', line 324
+      
# File 'lib/oauth2/access_token.rb', line 348
 
 def put(path, opts = {}, &block)
   request(:put, path, opts, &block)
@@ -2457,23 +2475,23 @@ 

 
 
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
+209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222

-
# File 'lib/oauth2/access_token.rb', line 185
+      
# File 'lib/oauth2/access_token.rb', line 209
 
 def refresh(params = {}, access_token_opts = {}, &block)
   raise OAuth2::Error.new({error: "A refresh_token is not available"}) unless refresh_token
@@ -2679,13 +2697,13 @@ 

 
 
-302
-303
-304
-305
+326 +327 +328 +329

-
# File 'lib/oauth2/access_token.rb', line 302
+      
# File 'lib/oauth2/access_token.rb', line 326
 
 def request(verb, path, opts = {}, &block)
   configure_authentication!(opts)
@@ -2893,34 +2911,34 @@ 

 
 
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
+258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282

-
# File 'lib/oauth2/access_token.rb', line 234
+      
# File 'lib/oauth2/access_token.rb', line 258
 
 def revoke(params = {}, &block)
   token_type_hint_orig = params.delete(:token_type_hint)
@@ -3001,27 +3019,27 @@ 

 
 
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
+292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309

-
# File 'lib/oauth2/access_token.rb', line 268
+      
# File 'lib/oauth2/access_token.rb', line 292
 
 def to_hash
   hsh = {
@@ -3051,7 +3069,7 @@ 

diff --git a/doc/OAuth2/Authenticator.html b/doc/OAuth2/Authenticator.html index 203f83c5..5c4bffc7 100644 --- a/doc/OAuth2/Authenticator.html +++ b/doc/OAuth2/Authenticator.html @@ -631,7 +631,7 @@

diff --git a/doc/OAuth2/Client.html b/doc/OAuth2/Client.html index d2362bf7..0c583c84 100644 --- a/doc/OAuth2/Client.html +++ b/doc/OAuth2/Client.html @@ -2651,7 +2651,7 @@

diff --git a/doc/OAuth2/Error.html b/doc/OAuth2/Error.html index 7c8c82a3..71f633f0 100644 --- a/doc/OAuth2/Error.html +++ b/doc/OAuth2/Error.html @@ -518,7 +518,7 @@

diff --git a/doc/OAuth2/FilteredAttributes.html b/doc/OAuth2/FilteredAttributes.html index 5bae1109..c97721e3 100644 --- a/doc/OAuth2/FilteredAttributes.html +++ b/doc/OAuth2/FilteredAttributes.html @@ -268,7 +268,7 @@

diff --git a/doc/OAuth2/FilteredAttributes/ClassMethods.html b/doc/OAuth2/FilteredAttributes/ClassMethods.html index 1f6d746b..cd4a0dd1 100644 --- a/doc/OAuth2/FilteredAttributes/ClassMethods.html +++ b/doc/OAuth2/FilteredAttributes/ClassMethods.html @@ -218,7 +218,7 @@

diff --git a/doc/OAuth2/Response.html b/doc/OAuth2/Response.html index ebe35500..b4d52104 100644 --- a/doc/OAuth2/Response.html +++ b/doc/OAuth2/Response.html @@ -368,7 +368,7 @@

  • - #parsed ⇒ Object? + #parsed ⇒ Object, ... @@ -886,7 +886,7 @@

    - #parsedObject? + #parsedObject, ... @@ -907,12 +907,12 @@

  • - (Object) + (Object, SnakyHash::StringKeyed) — -

    As returned by #parser if it is #call-able.

    +

    As returned by #parser if #call-able; snaky hash if options[:snaky].

  • @@ -1134,7 +1134,7 @@

    diff --git a/doc/OAuth2/Strategy.html b/doc/OAuth2/Strategy.html index afe51801..3fc25e14 100644 --- a/doc/OAuth2/Strategy.html +++ b/doc/OAuth2/Strategy.html @@ -107,7 +107,7 @@

    Defined Under Namespace

    diff --git a/doc/OAuth2/Strategy/Assertion.html b/doc/OAuth2/Strategy/Assertion.html index fa3e86f2..a1d2ab0e 100644 --- a/doc/OAuth2/Strategy/Assertion.html +++ b/doc/OAuth2/Strategy/Assertion.html @@ -481,7 +481,7 @@

    diff --git a/doc/OAuth2/Strategy/AuthCode.html b/doc/OAuth2/Strategy/AuthCode.html index f9f72043..cd3b0882 100644 --- a/doc/OAuth2/Strategy/AuthCode.html +++ b/doc/OAuth2/Strategy/AuthCode.html @@ -469,7 +469,7 @@

    diff --git a/doc/OAuth2/Strategy/Base.html b/doc/OAuth2/Strategy/Base.html index 58b54f46..b9f4dd9e 100644 --- a/doc/OAuth2/Strategy/Base.html +++ b/doc/OAuth2/Strategy/Base.html @@ -195,7 +195,7 @@

    diff --git a/doc/OAuth2/Strategy/ClientCredentials.html b/doc/OAuth2/Strategy/ClientCredentials.html index 61c7a5ba..a6a50c9c 100644 --- a/doc/OAuth2/Strategy/ClientCredentials.html +++ b/doc/OAuth2/Strategy/ClientCredentials.html @@ -343,7 +343,7 @@

    diff --git a/doc/OAuth2/Strategy/Implicit.html b/doc/OAuth2/Strategy/Implicit.html index b600ad4b..4a952299 100644 --- a/doc/OAuth2/Strategy/Implicit.html +++ b/doc/OAuth2/Strategy/Implicit.html @@ -410,7 +410,7 @@

    diff --git a/doc/OAuth2/Strategy/Password.html b/doc/OAuth2/Strategy/Password.html index c3e30d22..fbc36d12 100644 --- a/doc/OAuth2/Strategy/Password.html +++ b/doc/OAuth2/Strategy/Password.html @@ -364,7 +364,7 @@

    diff --git a/doc/OAuth2/Version.html b/doc/OAuth2/Version.html index 6f553a88..35ae85bb 100644 --- a/doc/OAuth2/Version.html +++ b/doc/OAuth2/Version.html @@ -111,7 +111,7 @@

    diff --git a/doc/_index.html b/doc/_index.html index 541c36bc..bf789e33 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -300,7 +300,7 @@

    Namespace Listing A-Z

    diff --git a/doc/file.CHANGELOG.html b/doc/file.CHANGELOG.html index 1113489c..25507420 100644 --- a/doc/file.CHANGELOG.html +++ b/doc/file.CHANGELOG.html @@ -773,7 +773,7 @@

    diff --git a/doc/file.CODE_OF_CONDUCT.html b/doc/file.CODE_OF_CONDUCT.html index 5781bf53..7fc0d9e3 100644 --- a/doc/file.CODE_OF_CONDUCT.html +++ b/doc/file.CODE_OF_CONDUCT.html @@ -192,7 +192,7 @@

    Attribution

    diff --git a/doc/file.CONTRIBUTING.html b/doc/file.CONTRIBUTING.html index 8ac909f4..fcb606bc 100644 --- a/doc/file.CONTRIBUTING.html +++ b/doc/file.CONTRIBUTING.html @@ -195,7 +195,7 @@

    To release a new version:

    diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index 6e9936f3..8b4d1df0 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -60,7 +60,7 @@
    MIT License

    Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
    Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    diff --git a/doc/file.README.html b/doc/file.README.html index deb4dc97..3a15e387 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -68,7 +68,7 @@

    🔐 OAuth2

    -

    Version License: MIT Downloads Rank Open Source Helpers Depfu Coveralls Test Coverage QLTY Test Coverage CI Heads CI Runtime Dependencies @ HEAD CI Current CI Truffle Ruby CI JRuby CI Supported CI Legacy CI Unsupported CI Ancient CI Test Coverage CI Style CodeQL

    +

    Version License: MIT Downloads Rank Open Source Helpers Depfu Coveralls Test Coverage QLTY Test Coverage CI Heads CI Runtime Dependencies @ HEAD CI Current CI Truffle Ruby CI JRuby CI Supported CI Legacy CI Unsupported CI Ancient CI Caboose is an absolute WAGON CI Test Coverage CI Style CodeQL


    @@ -387,6 +387,7 @@

    Version 2.0.x

    | Version | Release Date | CHANGELOG | README | |---------|--------------|---------------------------------------|---------------------------------| +| 2.0.11 | 2025-05-21 | [v2.0.11 CHANGELOG][2.0.11-changelog] | [v2.0.10 README][2.0.11-readme] | | 2.0.10 | 2025-05-17 | [v2.0.10 CHANGELOG][2.0.10-changelog] | [v2.0.10 README][2.0.10-readme] | | 2.0.9 | 2022-09-16 | [v2.0.9 CHANGELOG][2.0.9-changelog] | [v2.0.9 README][2.0.9-readme] | | 2.0.8 | 2022-09-01 | [v2.0.8 CHANGELOG][2.0.8-changelog] | [v2.0.8 README][2.0.8-readme] | @@ -694,9 +695,26 @@

    snake_case and indi response.parsed[:access_token] # => "aaaaaaaa" response.parsed.additional_data # => "additional" response.parsed[:additional_data] # => "additional" -response.parsed.class.name # => OAuth2::SnakyHash (subclass of Hashie::Mash::Rash, from `rash_alt` gem) +response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash gem)

  • +

    Serialization

    + +

    As of v2.0.11, if you need to serialize the parsed result, you can!

    + +

    There are two ways to do this.

    + +
      +
    1. Global: put this in your code somewhere reasonable (like an initializer for Rails): +
      SnakyHash::StringKeyed.class_eval do
      +  extend SnakyHash::Serializer
      +end
      +
      +
    2. +
    + +

    2.

    +

    What if I hate snakes and/or indifference?

    response = access.get("/api/resource", params: {"query_foo" => "bar"}, snaky: false)
    @@ -957,7 +975,7 @@ 

    🤑 One more thing

    diff --git a/doc/file.SECURITY.html b/doc/file.SECURITY.html index c879d7c3..1e399d4d 100644 --- a/doc/file.SECURITY.html +++ b/doc/file.SECURITY.html @@ -110,7 +110,7 @@

    OAuth2 for Enterprise

    diff --git a/doc/index.html b/doc/index.html index b8e40e78..c7e2e70c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -68,7 +68,7 @@

    🔐 OAuth2

    -

    Version License: MIT Downloads Rank Open Source Helpers Depfu Coveralls Test Coverage QLTY Test Coverage CI Heads CI Runtime Dependencies @ HEAD CI Current CI Truffle Ruby CI JRuby CI Supported CI Legacy CI Unsupported CI Ancient CI Test Coverage CI Style CodeQL

    +

    Version License: MIT Downloads Rank Open Source Helpers Depfu Coveralls Test Coverage QLTY Test Coverage CI Heads CI Runtime Dependencies @ HEAD CI Current CI Truffle Ruby CI JRuby CI Supported CI Legacy CI Unsupported CI Ancient CI Caboose is an absolute WAGON CI Test Coverage CI Style CodeQL


    @@ -387,6 +387,7 @@

    Version 2.0.x

    | Version | Release Date | CHANGELOG | README | |---------|--------------|---------------------------------------|---------------------------------| +| 2.0.11 | 2025-05-21 | [v2.0.11 CHANGELOG][2.0.11-changelog] | [v2.0.10 README][2.0.11-readme] | | 2.0.10 | 2025-05-17 | [v2.0.10 CHANGELOG][2.0.10-changelog] | [v2.0.10 README][2.0.10-readme] | | 2.0.9 | 2022-09-16 | [v2.0.9 CHANGELOG][2.0.9-changelog] | [v2.0.9 README][2.0.9-readme] | | 2.0.8 | 2022-09-01 | [v2.0.8 CHANGELOG][2.0.8-changelog] | [v2.0.8 README][2.0.8-readme] | @@ -694,9 +695,26 @@

    snake_case and indi response.parsed[:access_token] # => "aaaaaaaa" response.parsed.additional_data # => "additional" response.parsed[:additional_data] # => "additional" -response.parsed.class.name # => OAuth2::SnakyHash (subclass of Hashie::Mash::Rash, from `rash_alt` gem) +response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash gem)

    +

    Serialization

    + +

    As of v2.0.11, if you need to serialize the parsed result, you can!

    + +

    There are two ways to do this.

    + +
      +
    1. Global: put this in your code somewhere reasonable (like an initializer for Rails): +
      SnakyHash::StringKeyed.class_eval do
      +  extend SnakyHash::Serializer
      +end
      +
      +
    2. +
    + +

    2.

    +

    What if I hate snakes and/or indifference?

    response = access.get("/api/resource", params: {"query_foo" => "bar"}, snaky: false)
    @@ -957,7 +975,7 @@ 

    🤑 One more thing

    diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index f7c1afe8..2665d63d 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -100,7 +100,7 @@

    Defined Under Namespace

    diff --git a/gemfiles/audit.gemfile b/gemfiles/audit.gemfile index 51d2169c..173a1e36 100644 --- a/gemfiles/audit.gemfile +++ b/gemfiles/audit.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/audit.gemfile") diff --git a/gemfiles/coverage.gemfile b/gemfiles/coverage.gemfile index 89a57ce0..6b348995 100644 --- a/gemfiles/coverage.gemfile +++ b/gemfiles/coverage.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/coverage.gemfile") diff --git a/gemfiles/current.gemfile b/gemfiles/current.gemfile index 05f8012c..c4f47527 100644 --- a/gemfiles/current.gemfile +++ b/gemfiles/current.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/current_runtime_heads.gemfile b/gemfiles/current_runtime_heads.gemfile index 74ea868d..fc9c120d 100644 --- a/gemfiles/current_runtime_heads.gemfile +++ b/gemfiles/current_runtime_heads.gemfile @@ -5,6 +5,6 @@ source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/runtime_heads.gemfile") diff --git a/gemfiles/head.gemfile b/gemfiles/head.gemfile index 74ea868d..fc9c120d 100644 --- a/gemfiles/head.gemfile +++ b/gemfiles/head.gemfile @@ -5,6 +5,6 @@ source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/runtime_heads.gemfile") diff --git a/gemfiles/omnibus.gemfile b/gemfiles/omnibus.gemfile index 168d34cc..57cc634c 100644 --- a/gemfiles/omnibus.gemfile +++ b/gemfiles/omnibus.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/audit.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v0.gemfile b/gemfiles/ruby_2_3_hashie_v0.gemfile index 088d2f1d..00bcdb3e 100644 --- a/gemfiles/ruby_2_3_hashie_v0.gemfile +++ b/gemfiles/ruby_2_3_hashie_v0.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v0.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v1.gemfile b/gemfiles/ruby_2_3_hashie_v1.gemfile index 7a4ef09a..ecfeea8d 100644 --- a/gemfiles/ruby_2_3_hashie_v1.gemfile +++ b/gemfiles/ruby_2_3_hashie_v1.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v0.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v2.gemfile b/gemfiles/ruby_2_3_hashie_v2.gemfile index ce43494c..4fe61c42 100644 --- a/gemfiles/ruby_2_3_hashie_v2.gemfile +++ b/gemfiles/ruby_2_3_hashie_v2.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v0.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v3.gemfile b/gemfiles/ruby_2_3_hashie_v3.gemfile index 3e4f6152..25e9dd99 100644 --- a/gemfiles/ruby_2_3_hashie_v3.gemfile +++ b/gemfiles/ruby_2_3_hashie_v3.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v0.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v4.gemfile b/gemfiles/ruby_2_3_hashie_v4.gemfile index a3f2c430..e6890a6e 100644 --- a/gemfiles/ruby_2_3_hashie_v4.gemfile +++ b/gemfiles/ruby_2_3_hashie_v4.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v0.gemfile") diff --git a/gemfiles/ruby_2_3_hashie_v5.gemfile b/gemfiles/ruby_2_3_hashie_v5.gemfile index db80674b..ca626232 100644 --- a/gemfiles/ruby_2_3_hashie_v5.gemfile +++ b/gemfiles/ruby_2_3_hashie_v5.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v0.gemfile") diff --git a/gemfiles/ruby_2_4.gemfile b/gemfiles/ruby_2_4.gemfile index c15b04f9..e8c2f7b6 100644 --- a/gemfiles/ruby_2_4.gemfile +++ b/gemfiles/ruby_2_4.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v1.gemfile") diff --git a/gemfiles/ruby_2_5.gemfile b/gemfiles/ruby_2_5.gemfile index cca5f0e8..039fdb5a 100644 --- a/gemfiles/ruby_2_5.gemfile +++ b/gemfiles/ruby_2_5.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v1.gemfile") diff --git a/gemfiles/ruby_2_6.gemfile b/gemfiles/ruby_2_6.gemfile index 6e332186..77a7e508 100644 --- a/gemfiles/ruby_2_6.gemfile +++ b/gemfiles/ruby_2_6.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_2_7.gemfile b/gemfiles/ruby_2_7.gemfile index b38394a3..5d304af5 100644 --- a/gemfiles/ruby_2_7.gemfile +++ b/gemfiles/ruby_2_7.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_0.gemfile b/gemfiles/ruby_3_0.gemfile index 6c46b863..36974019 100644 --- a/gemfiles/ruby_3_0.gemfile +++ b/gemfiles/ruby_3_0.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_1.gemfile b/gemfiles/ruby_3_1.gemfile index 6c46b863..36974019 100644 --- a/gemfiles/ruby_3_1.gemfile +++ b/gemfiles/ruby_3_1.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_2.gemfile b/gemfiles/ruby_3_2.gemfile index a173c574..f5b6f53d 100644 --- a/gemfiles/ruby_3_2.gemfile +++ b/gemfiles/ruby_3_2.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/ruby_3_3.gemfile b/gemfiles/ruby_3_3.gemfile index a173c574..f5b6f53d 100644 --- a/gemfiles/ruby_3_3.gemfile +++ b/gemfiles/ruby_3_3.gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/faraday_v2.gemfile") diff --git a/gemfiles/style.gemfile b/gemfiles/style.gemfile index 0b9591b7..f75762cf 100644 --- a/gemfiles/style.gemfile +++ b/gemfiles/style.gemfile @@ -5,6 +5,6 @@ source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" -gemspec :path => "../" +gemspec path: "../" eval_gemfile("modular/style.gemfile") diff --git a/gemfiles/vanilla.gemfile b/gemfiles/vanilla.gemfile index a55548f2..095e6608 100644 --- a/gemfiles/vanilla.gemfile +++ b/gemfiles/vanilla.gemfile @@ -2,4 +2,4 @@ source "https://rubygems.org" -gemspec :path => "../" +gemspec path: "../" diff --git a/lib/oauth2/access_token.rb b/lib/oauth2/access_token.rb index c55228b1..c5607392 100644 --- a/lib/oauth2/access_token.rb +++ b/lib/oauth2/access_token.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# :nocov: +begin + # The first version of hashie that has a version file was 1.1.0 + # The first version of hashie that required the version file at runtime was 3.2.0 + # If it has already been loaded then this is very low cost, as Kernel.require uses maintains a cache + # If this it hasn't this will work to get it loaded, and then we will be able to use + # defined?(Hashie::Version) + # as a test. + # TODO: get rid this mess when we drop Hashie < 3.2, as Hashie will self-load its version then + require "hashie/version" +rescue LoadError + nil +end +# :nocov: + module OAuth2 class AccessToken # rubocop:disable Metrics/ClassLength TOKEN_KEYS_STR = %w[access_token id_token token accessToken idToken].freeze @@ -54,13 +69,16 @@ def from_hash(client, hash) extra_tokens_warning(supported_keys, t_key) t_key end - token = if !defined?(Hashie::VERSION) # i.e. < "1.0" - warn("snaky_hash and oauth2 will drop support for Hashie v0 in the next major version. Please upgrade to a modern Hashie.") - # There is a bug in Hashie v0, which is accounts for. - fresh.delete(key) || fresh[key] || "" - else - fresh.delete(key) || "" - end + # :nocov: + # TODO: Get rid of this branching logic when dropping Hashie < v3.2 + token = if !defined?(Hashie::VERSION) # i.e. <= "1.1.0"; the first Hashie to ship with a VERSION constant + warn("snaky_hash and oauth2 will drop support for Hashie v0 in the next major version. Please upgrade to a modern Hashie.") + # There is a bug in Hashie v0, which is accounts for. + fresh.delete(key) || fresh[key] || "" + else + fresh.delete(key) || "" + end + # :nocov: new(client, token, fresh) end From 493edf3e43b5e950f4f33ac65b60a5aa1359dd71 Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 09:18:00 +0700 Subject: [PATCH 06/11] =?UTF-8?q?=F0=9F=92=9A=20skip=20output=20tests=20wh?= =?UTF-8?q?en=20Hashie::VERSION=20not=20defined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - because our warning output will mess up the test --- .rubocop_gradual.lock | 12 ++++-------- doc/OAuth2.html | 2 +- doc/OAuth2/AccessToken.html | 2 +- doc/OAuth2/Authenticator.html | 2 +- doc/OAuth2/Client.html | 2 +- doc/OAuth2/Error.html | 2 +- doc/OAuth2/FilteredAttributes.html | 2 +- doc/OAuth2/FilteredAttributes/ClassMethods.html | 2 +- doc/OAuth2/Response.html | 2 +- doc/OAuth2/Strategy.html | 2 +- doc/OAuth2/Strategy/Assertion.html | 2 +- doc/OAuth2/Strategy/AuthCode.html | 2 +- doc/OAuth2/Strategy/Base.html | 2 +- doc/OAuth2/Strategy/ClientCredentials.html | 2 +- doc/OAuth2/Strategy/Implicit.html | 2 +- doc/OAuth2/Strategy/Password.html | 2 +- doc/OAuth2/Version.html | 2 +- doc/_index.html | 2 +- doc/file.CHANGELOG.html | 2 +- doc/file.CODE_OF_CONDUCT.html | 2 +- doc/file.CONTRIBUTING.html | 2 +- doc/file.LICENSE.html | 2 +- doc/file.README.html | 2 +- doc/file.SECURITY.html | 2 +- doc/index.html | 2 +- doc/top-level-namespace.html | 2 +- spec/oauth2/access_token_spec.rb | 16 ++++++++++++---- 27 files changed, 41 insertions(+), 37 deletions(-) diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index 71c67acf..00b8732b 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -24,15 +24,11 @@ "oauth2.gemspec:1301437182": [ [5, 23, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028] ], - "spec/oauth2/access_token_spec.rb:443932125": [ + "spec/oauth2/access_token_spec.rb:1552001085": [ [3, 1, 34, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/access_token*_spec.rb`.", 1972107547], - [392, 142, 40, "Lint/LiteralInInterpolation: Literal interpolation detected.", 4210228387], - [400, 142, 40, "Lint/LiteralInInterpolation: Literal interpolation detected.", 4210228387], - [606, 142, 20, "Lint/LiteralInInterpolation: Literal interpolation detected.", 304063511], - [632, 142, 20, "Lint/LiteralInInterpolation: Literal interpolation detected.", 304063511], - [781, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088], - [851, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639], - [855, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967] + [789, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088], + [859, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639], + [863, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967] ], "spec/oauth2/authenticator_spec.rb:853320290": [ [3, 1, 36, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/authenticator*_spec.rb`.", 819808017], diff --git a/doc/OAuth2.html b/doc/OAuth2.html index 0394030e..e867e791 100644 --- a/doc/OAuth2.html +++ b/doc/OAuth2.html @@ -326,7 +326,7 @@

    diff --git a/doc/OAuth2/AccessToken.html b/doc/OAuth2/AccessToken.html index e72f9842..7d6f5266 100644 --- a/doc/OAuth2/AccessToken.html +++ b/doc/OAuth2/AccessToken.html @@ -3069,7 +3069,7 @@

    diff --git a/doc/OAuth2/Authenticator.html b/doc/OAuth2/Authenticator.html index 5c4bffc7..a8b75fb5 100644 --- a/doc/OAuth2/Authenticator.html +++ b/doc/OAuth2/Authenticator.html @@ -631,7 +631,7 @@

    diff --git a/doc/OAuth2/Client.html b/doc/OAuth2/Client.html index 0c583c84..75bdfebe 100644 --- a/doc/OAuth2/Client.html +++ b/doc/OAuth2/Client.html @@ -2651,7 +2651,7 @@

    diff --git a/doc/OAuth2/Error.html b/doc/OAuth2/Error.html index 71f633f0..21044bae 100644 --- a/doc/OAuth2/Error.html +++ b/doc/OAuth2/Error.html @@ -518,7 +518,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes.html b/doc/OAuth2/FilteredAttributes.html index c97721e3..f1707ed1 100644 --- a/doc/OAuth2/FilteredAttributes.html +++ b/doc/OAuth2/FilteredAttributes.html @@ -268,7 +268,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes/ClassMethods.html b/doc/OAuth2/FilteredAttributes/ClassMethods.html index cd4a0dd1..2dcc1449 100644 --- a/doc/OAuth2/FilteredAttributes/ClassMethods.html +++ b/doc/OAuth2/FilteredAttributes/ClassMethods.html @@ -218,7 +218,7 @@

    diff --git a/doc/OAuth2/Response.html b/doc/OAuth2/Response.html index b4d52104..9e117187 100644 --- a/doc/OAuth2/Response.html +++ b/doc/OAuth2/Response.html @@ -1134,7 +1134,7 @@

    diff --git a/doc/OAuth2/Strategy.html b/doc/OAuth2/Strategy.html index 3fc25e14..d1428e53 100644 --- a/doc/OAuth2/Strategy.html +++ b/doc/OAuth2/Strategy.html @@ -107,7 +107,7 @@

    Defined Under Namespace

    diff --git a/doc/OAuth2/Strategy/Assertion.html b/doc/OAuth2/Strategy/Assertion.html index a1d2ab0e..f109af6f 100644 --- a/doc/OAuth2/Strategy/Assertion.html +++ b/doc/OAuth2/Strategy/Assertion.html @@ -481,7 +481,7 @@

    diff --git a/doc/OAuth2/Strategy/AuthCode.html b/doc/OAuth2/Strategy/AuthCode.html index cd3b0882..9d095fc2 100644 --- a/doc/OAuth2/Strategy/AuthCode.html +++ b/doc/OAuth2/Strategy/AuthCode.html @@ -469,7 +469,7 @@

    diff --git a/doc/OAuth2/Strategy/Base.html b/doc/OAuth2/Strategy/Base.html index b9f4dd9e..8aef699b 100644 --- a/doc/OAuth2/Strategy/Base.html +++ b/doc/OAuth2/Strategy/Base.html @@ -195,7 +195,7 @@

    diff --git a/doc/OAuth2/Strategy/ClientCredentials.html b/doc/OAuth2/Strategy/ClientCredentials.html index a6a50c9c..b6f736a5 100644 --- a/doc/OAuth2/Strategy/ClientCredentials.html +++ b/doc/OAuth2/Strategy/ClientCredentials.html @@ -343,7 +343,7 @@

    diff --git a/doc/OAuth2/Strategy/Implicit.html b/doc/OAuth2/Strategy/Implicit.html index 4a952299..3baacc91 100644 --- a/doc/OAuth2/Strategy/Implicit.html +++ b/doc/OAuth2/Strategy/Implicit.html @@ -410,7 +410,7 @@

    diff --git a/doc/OAuth2/Strategy/Password.html b/doc/OAuth2/Strategy/Password.html index fbc36d12..b753ad13 100644 --- a/doc/OAuth2/Strategy/Password.html +++ b/doc/OAuth2/Strategy/Password.html @@ -364,7 +364,7 @@

    diff --git a/doc/OAuth2/Version.html b/doc/OAuth2/Version.html index 35ae85bb..0dd5a428 100644 --- a/doc/OAuth2/Version.html +++ b/doc/OAuth2/Version.html @@ -111,7 +111,7 @@

    diff --git a/doc/_index.html b/doc/_index.html index bf789e33..5438fc9f 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -300,7 +300,7 @@

    Namespace Listing A-Z

    diff --git a/doc/file.CHANGELOG.html b/doc/file.CHANGELOG.html index 25507420..f56f1373 100644 --- a/doc/file.CHANGELOG.html +++ b/doc/file.CHANGELOG.html @@ -773,7 +773,7 @@

    diff --git a/doc/file.CODE_OF_CONDUCT.html b/doc/file.CODE_OF_CONDUCT.html index 7fc0d9e3..52bf98f9 100644 --- a/doc/file.CODE_OF_CONDUCT.html +++ b/doc/file.CODE_OF_CONDUCT.html @@ -192,7 +192,7 @@

    Attribution

    diff --git a/doc/file.CONTRIBUTING.html b/doc/file.CONTRIBUTING.html index fcb606bc..7ab33c84 100644 --- a/doc/file.CONTRIBUTING.html +++ b/doc/file.CONTRIBUTING.html @@ -195,7 +195,7 @@

    To release a new version:

    diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index 8b4d1df0..2a8c0474 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -60,7 +60,7 @@
    MIT License

    Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
    Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    diff --git a/doc/file.README.html b/doc/file.README.html index 3a15e387..7fffadef 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/file.SECURITY.html b/doc/file.SECURITY.html index 1e399d4d..473880ad 100644 --- a/doc/file.SECURITY.html +++ b/doc/file.SECURITY.html @@ -110,7 +110,7 @@

    OAuth2 for Enterprise

    diff --git a/doc/index.html b/doc/index.html index c7e2e70c..6f576a4d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 2665d63d..a42cfe32 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -100,7 +100,7 @@

    Defined Under Namespace

    diff --git a/spec/oauth2/access_token_spec.rb b/spec/oauth2/access_token_spec.rb index b9186888..87da6494 100644 --- a/spec/oauth2/access_token_spec.rb +++ b/spec/oauth2/access_token_spec.rb @@ -61,6 +61,7 @@ end it "warns on STDERR" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) msg = <<-MSG.lstrip OAuth2::AccessToken.from_hash: `hash` contained more than one 'token' key ([:access_token, :id_token]); using :access_token. MSG @@ -90,6 +91,7 @@ end it "does not warn on STDERR" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) expect(printed).to eq("") end end @@ -111,6 +113,7 @@ end it "does not warn on STDERR" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) expect(printed).to eq("") end end @@ -140,6 +143,7 @@ end it "warns on STDERR and selects the correct key" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) msg = <<-MSG.lstrip OAuth2::AccessToken.from_hash: `hash` contained more than one 'token' key ([:access_token, :id_token]); using :access_token. MSG @@ -180,6 +184,7 @@ let(:options) { {raise_errors: false} } it "warns on STDERR" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) msg = <<-MSG.lstrip OAuth2::AccessToken has no token MSG @@ -206,6 +211,7 @@ end it "does not warn when token is found" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) expect(printed).to eq("") end end @@ -240,6 +246,7 @@ end it "warns when no token is found" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) expect(printed.each_line.to_a).to eq([ "\n", "OAuth2::AccessToken#from_hash key mismatch.\n", @@ -266,6 +273,7 @@ end it "does not warn when no token is found" do + skip("Warning output we spit on Hashie without VERSION constant makes this test invalid") unless defined?(Hashie::VERSION) expect(printed.each_line.to_a).to eq([]) end end @@ -389,7 +397,7 @@ def assert_initialized_token(target) let(:token) { "" } it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{mode: :this_is_bad, raise_errors: true}}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:mode=>:this_is_bad, :raise_errors=>true}"}.to_s) end end @@ -397,7 +405,7 @@ def assert_initialized_token(target) let(:token) { nil } it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{mode: :this_is_bad, raise_errors: true}}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:mode=>:this_is_bad, :raise_errors=>true}"}.to_s) end end end @@ -603,7 +611,7 @@ def assert_initialized_token(target) context "when there is no refresh_token" do it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{raise_errors: true}}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:raise_errors=>true}"}.to_s) end end @@ -629,7 +637,7 @@ def assert_initialized_token(target) context "when there is no refresh_token" do it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{raise_errors: true}}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:raise_errors=>true}"}.to_s) end end From 4490fd85e0e688c2ca2105ca19173d9ebc4b7575 Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 09:24:52 +0700 Subject: [PATCH 07/11] =?UTF-8?q?=F0=9F=92=9A=20Make=20tests=20more=20dete?= =?UTF-8?q?rministic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/OAuth2.html | 2 +- doc/OAuth2/AccessToken.html | 2 +- doc/OAuth2/Authenticator.html | 2 +- doc/OAuth2/Client.html | 2 +- doc/OAuth2/Error.html | 2 +- doc/OAuth2/FilteredAttributes.html | 2 +- doc/OAuth2/FilteredAttributes/ClassMethods.html | 2 +- doc/OAuth2/Response.html | 2 +- doc/OAuth2/Strategy.html | 2 +- doc/OAuth2/Strategy/Assertion.html | 2 +- doc/OAuth2/Strategy/AuthCode.html | 2 +- doc/OAuth2/Strategy/Base.html | 2 +- doc/OAuth2/Strategy/ClientCredentials.html | 2 +- doc/OAuth2/Strategy/Implicit.html | 2 +- doc/OAuth2/Strategy/Password.html | 2 +- doc/OAuth2/Version.html | 2 +- doc/_index.html | 2 +- doc/file.CHANGELOG.html | 2 +- doc/file.CODE_OF_CONDUCT.html | 2 +- doc/file.CONTRIBUTING.html | 2 +- doc/file.LICENSE.html | 2 +- doc/file.README.html | 2 +- doc/file.SECURITY.html | 2 +- doc/index.html | 2 +- doc/top-level-namespace.html | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/OAuth2.html b/doc/OAuth2.html index e867e791..957b5f49 100644 --- a/doc/OAuth2.html +++ b/doc/OAuth2.html @@ -326,7 +326,7 @@

    diff --git a/doc/OAuth2/AccessToken.html b/doc/OAuth2/AccessToken.html index 7d6f5266..cb45818e 100644 --- a/doc/OAuth2/AccessToken.html +++ b/doc/OAuth2/AccessToken.html @@ -3069,7 +3069,7 @@

    diff --git a/doc/OAuth2/Authenticator.html b/doc/OAuth2/Authenticator.html index a8b75fb5..824f45e6 100644 --- a/doc/OAuth2/Authenticator.html +++ b/doc/OAuth2/Authenticator.html @@ -631,7 +631,7 @@

    diff --git a/doc/OAuth2/Client.html b/doc/OAuth2/Client.html index 75bdfebe..cbabd727 100644 --- a/doc/OAuth2/Client.html +++ b/doc/OAuth2/Client.html @@ -2651,7 +2651,7 @@

    diff --git a/doc/OAuth2/Error.html b/doc/OAuth2/Error.html index 21044bae..c0668efc 100644 --- a/doc/OAuth2/Error.html +++ b/doc/OAuth2/Error.html @@ -518,7 +518,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes.html b/doc/OAuth2/FilteredAttributes.html index f1707ed1..1f1b3307 100644 --- a/doc/OAuth2/FilteredAttributes.html +++ b/doc/OAuth2/FilteredAttributes.html @@ -268,7 +268,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes/ClassMethods.html b/doc/OAuth2/FilteredAttributes/ClassMethods.html index 2dcc1449..7c7630ee 100644 --- a/doc/OAuth2/FilteredAttributes/ClassMethods.html +++ b/doc/OAuth2/FilteredAttributes/ClassMethods.html @@ -218,7 +218,7 @@

    diff --git a/doc/OAuth2/Response.html b/doc/OAuth2/Response.html index 9e117187..167efe03 100644 --- a/doc/OAuth2/Response.html +++ b/doc/OAuth2/Response.html @@ -1134,7 +1134,7 @@

    diff --git a/doc/OAuth2/Strategy.html b/doc/OAuth2/Strategy.html index d1428e53..e438c17d 100644 --- a/doc/OAuth2/Strategy.html +++ b/doc/OAuth2/Strategy.html @@ -107,7 +107,7 @@

    Defined Under Namespace

    diff --git a/doc/OAuth2/Strategy/Assertion.html b/doc/OAuth2/Strategy/Assertion.html index f109af6f..0403be21 100644 --- a/doc/OAuth2/Strategy/Assertion.html +++ b/doc/OAuth2/Strategy/Assertion.html @@ -481,7 +481,7 @@

    diff --git a/doc/OAuth2/Strategy/AuthCode.html b/doc/OAuth2/Strategy/AuthCode.html index 9d095fc2..0361c3fa 100644 --- a/doc/OAuth2/Strategy/AuthCode.html +++ b/doc/OAuth2/Strategy/AuthCode.html @@ -469,7 +469,7 @@

    diff --git a/doc/OAuth2/Strategy/Base.html b/doc/OAuth2/Strategy/Base.html index 8aef699b..8b67fd81 100644 --- a/doc/OAuth2/Strategy/Base.html +++ b/doc/OAuth2/Strategy/Base.html @@ -195,7 +195,7 @@

    diff --git a/doc/OAuth2/Strategy/ClientCredentials.html b/doc/OAuth2/Strategy/ClientCredentials.html index b6f736a5..da8d7540 100644 --- a/doc/OAuth2/Strategy/ClientCredentials.html +++ b/doc/OAuth2/Strategy/ClientCredentials.html @@ -343,7 +343,7 @@

    diff --git a/doc/OAuth2/Strategy/Implicit.html b/doc/OAuth2/Strategy/Implicit.html index 3baacc91..2803ee4c 100644 --- a/doc/OAuth2/Strategy/Implicit.html +++ b/doc/OAuth2/Strategy/Implicit.html @@ -410,7 +410,7 @@

    diff --git a/doc/OAuth2/Strategy/Password.html b/doc/OAuth2/Strategy/Password.html index b753ad13..f180e9f2 100644 --- a/doc/OAuth2/Strategy/Password.html +++ b/doc/OAuth2/Strategy/Password.html @@ -364,7 +364,7 @@

    diff --git a/doc/OAuth2/Version.html b/doc/OAuth2/Version.html index 0dd5a428..f5d06fcb 100644 --- a/doc/OAuth2/Version.html +++ b/doc/OAuth2/Version.html @@ -111,7 +111,7 @@

    diff --git a/doc/_index.html b/doc/_index.html index 5438fc9f..22168e3c 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -300,7 +300,7 @@

    Namespace Listing A-Z

    diff --git a/doc/file.CHANGELOG.html b/doc/file.CHANGELOG.html index f56f1373..9977e471 100644 --- a/doc/file.CHANGELOG.html +++ b/doc/file.CHANGELOG.html @@ -773,7 +773,7 @@

    diff --git a/doc/file.CODE_OF_CONDUCT.html b/doc/file.CODE_OF_CONDUCT.html index 52bf98f9..8137c2fb 100644 --- a/doc/file.CODE_OF_CONDUCT.html +++ b/doc/file.CODE_OF_CONDUCT.html @@ -192,7 +192,7 @@

    Attribution

    diff --git a/doc/file.CONTRIBUTING.html b/doc/file.CONTRIBUTING.html index 7ab33c84..2ce1c019 100644 --- a/doc/file.CONTRIBUTING.html +++ b/doc/file.CONTRIBUTING.html @@ -195,7 +195,7 @@

    To release a new version:

    diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index 2a8c0474..3c014ff3 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -60,7 +60,7 @@
    MIT License

    Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
    Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    diff --git a/doc/file.README.html b/doc/file.README.html index 7fffadef..039d3648 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/file.SECURITY.html b/doc/file.SECURITY.html index 473880ad..99da3627 100644 --- a/doc/file.SECURITY.html +++ b/doc/file.SECURITY.html @@ -110,7 +110,7 @@

    OAuth2 for Enterprise

    diff --git a/doc/index.html b/doc/index.html index 6f576a4d..8f6569be 100644 --- a/doc/index.html +++ b/doc/index.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index a42cfe32..fde8836d 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -100,7 +100,7 @@

    Defined Under Namespace

    From fbd5b182ec7f1d7edf2d2dfad3a8336698ed787d Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 09:33:57 +0700 Subject: [PATCH 08/11] =?UTF-8?q?=F0=9F=92=9A=20Fixes=20for=20discrepancie?= =?UTF-8?q?s=20in=20Hash=20printing=20between=20variant=20versions=20of=20?= =?UTF-8?q?Ruby?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/OAuth2.html | 2 +- doc/OAuth2/AccessToken.html | 2 +- doc/OAuth2/Authenticator.html | 2 +- doc/OAuth2/Client.html | 2 +- doc/OAuth2/Error.html | 2 +- doc/OAuth2/FilteredAttributes.html | 2 +- doc/OAuth2/FilteredAttributes/ClassMethods.html | 2 +- doc/OAuth2/Response.html | 2 +- doc/OAuth2/Strategy.html | 2 +- doc/OAuth2/Strategy/Assertion.html | 2 +- doc/OAuth2/Strategy/AuthCode.html | 2 +- doc/OAuth2/Strategy/Base.html | 2 +- doc/OAuth2/Strategy/ClientCredentials.html | 2 +- doc/OAuth2/Strategy/Implicit.html | 2 +- doc/OAuth2/Strategy/Password.html | 2 +- doc/OAuth2/Version.html | 2 +- doc/_index.html | 2 +- doc/file.CHANGELOG.html | 2 +- doc/file.CODE_OF_CONDUCT.html | 2 +- doc/file.CONTRIBUTING.html | 2 +- doc/file.LICENSE.html | 2 +- doc/file.README.html | 2 +- doc/file.SECURITY.html | 2 +- doc/index.html | 2 +- doc/top-level-namespace.html | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/OAuth2.html b/doc/OAuth2.html index 957b5f49..3c9a581f 100644 --- a/doc/OAuth2.html +++ b/doc/OAuth2.html @@ -326,7 +326,7 @@

    diff --git a/doc/OAuth2/AccessToken.html b/doc/OAuth2/AccessToken.html index cb45818e..315ae851 100644 --- a/doc/OAuth2/AccessToken.html +++ b/doc/OAuth2/AccessToken.html @@ -3069,7 +3069,7 @@

    diff --git a/doc/OAuth2/Authenticator.html b/doc/OAuth2/Authenticator.html index 824f45e6..56ca667c 100644 --- a/doc/OAuth2/Authenticator.html +++ b/doc/OAuth2/Authenticator.html @@ -631,7 +631,7 @@

    diff --git a/doc/OAuth2/Client.html b/doc/OAuth2/Client.html index cbabd727..6d770c81 100644 --- a/doc/OAuth2/Client.html +++ b/doc/OAuth2/Client.html @@ -2651,7 +2651,7 @@

    diff --git a/doc/OAuth2/Error.html b/doc/OAuth2/Error.html index c0668efc..fe5df15d 100644 --- a/doc/OAuth2/Error.html +++ b/doc/OAuth2/Error.html @@ -518,7 +518,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes.html b/doc/OAuth2/FilteredAttributes.html index 1f1b3307..1a7ac88a 100644 --- a/doc/OAuth2/FilteredAttributes.html +++ b/doc/OAuth2/FilteredAttributes.html @@ -268,7 +268,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes/ClassMethods.html b/doc/OAuth2/FilteredAttributes/ClassMethods.html index 7c7630ee..e27f46b6 100644 --- a/doc/OAuth2/FilteredAttributes/ClassMethods.html +++ b/doc/OAuth2/FilteredAttributes/ClassMethods.html @@ -218,7 +218,7 @@

    diff --git a/doc/OAuth2/Response.html b/doc/OAuth2/Response.html index 167efe03..3afa84e5 100644 --- a/doc/OAuth2/Response.html +++ b/doc/OAuth2/Response.html @@ -1134,7 +1134,7 @@

    diff --git a/doc/OAuth2/Strategy.html b/doc/OAuth2/Strategy.html index e438c17d..c543ea3e 100644 --- a/doc/OAuth2/Strategy.html +++ b/doc/OAuth2/Strategy.html @@ -107,7 +107,7 @@

    Defined Under Namespace

    diff --git a/doc/OAuth2/Strategy/Assertion.html b/doc/OAuth2/Strategy/Assertion.html index 0403be21..cce5b918 100644 --- a/doc/OAuth2/Strategy/Assertion.html +++ b/doc/OAuth2/Strategy/Assertion.html @@ -481,7 +481,7 @@

    diff --git a/doc/OAuth2/Strategy/AuthCode.html b/doc/OAuth2/Strategy/AuthCode.html index 0361c3fa..d56ca793 100644 --- a/doc/OAuth2/Strategy/AuthCode.html +++ b/doc/OAuth2/Strategy/AuthCode.html @@ -469,7 +469,7 @@

    diff --git a/doc/OAuth2/Strategy/Base.html b/doc/OAuth2/Strategy/Base.html index 8b67fd81..6805feff 100644 --- a/doc/OAuth2/Strategy/Base.html +++ b/doc/OAuth2/Strategy/Base.html @@ -195,7 +195,7 @@

    diff --git a/doc/OAuth2/Strategy/ClientCredentials.html b/doc/OAuth2/Strategy/ClientCredentials.html index da8d7540..c798e767 100644 --- a/doc/OAuth2/Strategy/ClientCredentials.html +++ b/doc/OAuth2/Strategy/ClientCredentials.html @@ -343,7 +343,7 @@

    diff --git a/doc/OAuth2/Strategy/Implicit.html b/doc/OAuth2/Strategy/Implicit.html index 2803ee4c..22344427 100644 --- a/doc/OAuth2/Strategy/Implicit.html +++ b/doc/OAuth2/Strategy/Implicit.html @@ -410,7 +410,7 @@

    diff --git a/doc/OAuth2/Strategy/Password.html b/doc/OAuth2/Strategy/Password.html index f180e9f2..fd4b8385 100644 --- a/doc/OAuth2/Strategy/Password.html +++ b/doc/OAuth2/Strategy/Password.html @@ -364,7 +364,7 @@

    diff --git a/doc/OAuth2/Version.html b/doc/OAuth2/Version.html index f5d06fcb..49a28767 100644 --- a/doc/OAuth2/Version.html +++ b/doc/OAuth2/Version.html @@ -111,7 +111,7 @@

    diff --git a/doc/_index.html b/doc/_index.html index 22168e3c..24e69d61 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -300,7 +300,7 @@

    Namespace Listing A-Z

    diff --git a/doc/file.CHANGELOG.html b/doc/file.CHANGELOG.html index 9977e471..77c345fc 100644 --- a/doc/file.CHANGELOG.html +++ b/doc/file.CHANGELOG.html @@ -773,7 +773,7 @@

    diff --git a/doc/file.CODE_OF_CONDUCT.html b/doc/file.CODE_OF_CONDUCT.html index 8137c2fb..2123bd2c 100644 --- a/doc/file.CODE_OF_CONDUCT.html +++ b/doc/file.CODE_OF_CONDUCT.html @@ -192,7 +192,7 @@

    Attribution

    diff --git a/doc/file.CONTRIBUTING.html b/doc/file.CONTRIBUTING.html index 2ce1c019..255e1e20 100644 --- a/doc/file.CONTRIBUTING.html +++ b/doc/file.CONTRIBUTING.html @@ -195,7 +195,7 @@

    To release a new version:

    diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index 3c014ff3..83220f61 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -60,7 +60,7 @@
    MIT License

    Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
    Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    diff --git a/doc/file.README.html b/doc/file.README.html index 039d3648..e25c3c79 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/file.SECURITY.html b/doc/file.SECURITY.html index 99da3627..ca8a2d5a 100644 --- a/doc/file.SECURITY.html +++ b/doc/file.SECURITY.html @@ -110,7 +110,7 @@

    OAuth2 for Enterprise

    diff --git a/doc/index.html b/doc/index.html index 8f6569be..872265fd 100644 --- a/doc/index.html +++ b/doc/index.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index fde8836d..818d859d 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -100,7 +100,7 @@

    Defined Under Namespace

    From 361050e45d77e84def3afe2282336cfc97e13cbb Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 09:57:13 +0700 Subject: [PATCH 09/11] =?UTF-8?q?=F0=9F=92=9A=20Fixes=20for=20discrepancie?= =?UTF-8?q?s=20in=20Hash=20printing=20between=20variant=20versions=20of=20?= =?UTF-8?q?Ruby?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Prevent RuboCop Lint/LiteralInInterpolation from breaking specs --- .rubocop.yml | 6 +++++- .rubocop_gradual.lock | 2 +- .rubocop_rspec.yml | 2 +- REEK | 2 +- doc/OAuth2.html | 2 +- doc/OAuth2/AccessToken.html | 2 +- doc/OAuth2/Authenticator.html | 2 +- doc/OAuth2/Client.html | 2 +- doc/OAuth2/Error.html | 2 +- doc/OAuth2/FilteredAttributes.html | 2 +- doc/OAuth2/FilteredAttributes/ClassMethods.html | 2 +- doc/OAuth2/Response.html | 2 +- doc/OAuth2/Strategy.html | 2 +- doc/OAuth2/Strategy/Assertion.html | 2 +- doc/OAuth2/Strategy/AuthCode.html | 2 +- doc/OAuth2/Strategy/Base.html | 2 +- doc/OAuth2/Strategy/ClientCredentials.html | 2 +- doc/OAuth2/Strategy/Implicit.html | 2 +- doc/OAuth2/Strategy/Password.html | 2 +- doc/OAuth2/Version.html | 2 +- doc/_index.html | 2 +- doc/file.CHANGELOG.html | 2 +- doc/file.CODE_OF_CONDUCT.html | 2 +- doc/file.CONTRIBUTING.html | 2 +- doc/file.LICENSE.html | 2 +- doc/file.README.html | 2 +- doc/file.SECURITY.html | 2 +- doc/index.html | 2 +- doc/top-level-namespace.html | 2 +- spec/oauth2/access_token_spec.rb | 8 ++++---- 30 files changed, 37 insertions(+), 33 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f56e4770..87b58541 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -79,4 +79,8 @@ Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma Gemspec/DependencyVersion: - Enabled: false \ No newline at end of file + Enabled: false + +Lint/LiteralInInterpolation: + Exclude: + - 'spec/**/*.rb' \ No newline at end of file diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index 00b8732b..43be1b50 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -24,7 +24,7 @@ "oauth2.gemspec:1301437182": [ [5, 23, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028] ], - "spec/oauth2/access_token_spec.rb:1552001085": [ + "spec/oauth2/access_token_spec.rb:1202129469": [ [3, 1, 34, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/access_token*_spec.rb`.", 1972107547], [789, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088], [859, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639], diff --git a/.rubocop_rspec.yml b/.rubocop_rspec.yml index a5147665..df5911b2 100644 --- a/.rubocop_rspec.yml +++ b/.rubocop_rspec.yml @@ -27,4 +27,4 @@ RSpec/DescribeClass: - 'spec/examples/*' RSpec/MultipleMemoizedHelpers: - Enabled: false \ No newline at end of file + Enabled: false diff --git a/REEK b/REEK index f96c5ee9..b6f33d5c 100644 --- a/REEK +++ b/REEK @@ -1,5 +1,5 @@ spec/oauth2/access_token_spec.rb -- 1 warning: - [292, 293]:DuplicateMethodCall: assert_initialized_token calls 'target.params' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [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] spec/oauth2/client_spec.rb -- 3 warnings: [1072]:UnusedParameters: initialize has unused parameter 'client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md] [1072]:UnusedParameters: initialize has unused parameter 'hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md] diff --git a/doc/OAuth2.html b/doc/OAuth2.html index 3c9a581f..9d5886d8 100644 --- a/doc/OAuth2.html +++ b/doc/OAuth2.html @@ -326,7 +326,7 @@

    diff --git a/doc/OAuth2/AccessToken.html b/doc/OAuth2/AccessToken.html index 315ae851..b559b747 100644 --- a/doc/OAuth2/AccessToken.html +++ b/doc/OAuth2/AccessToken.html @@ -3069,7 +3069,7 @@

    diff --git a/doc/OAuth2/Authenticator.html b/doc/OAuth2/Authenticator.html index 56ca667c..8bc6e7cc 100644 --- a/doc/OAuth2/Authenticator.html +++ b/doc/OAuth2/Authenticator.html @@ -631,7 +631,7 @@

    diff --git a/doc/OAuth2/Client.html b/doc/OAuth2/Client.html index 6d770c81..94243584 100644 --- a/doc/OAuth2/Client.html +++ b/doc/OAuth2/Client.html @@ -2651,7 +2651,7 @@

    diff --git a/doc/OAuth2/Error.html b/doc/OAuth2/Error.html index fe5df15d..0d89222e 100644 --- a/doc/OAuth2/Error.html +++ b/doc/OAuth2/Error.html @@ -518,7 +518,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes.html b/doc/OAuth2/FilteredAttributes.html index 1a7ac88a..6696cf47 100644 --- a/doc/OAuth2/FilteredAttributes.html +++ b/doc/OAuth2/FilteredAttributes.html @@ -268,7 +268,7 @@

    diff --git a/doc/OAuth2/FilteredAttributes/ClassMethods.html b/doc/OAuth2/FilteredAttributes/ClassMethods.html index e27f46b6..0817d533 100644 --- a/doc/OAuth2/FilteredAttributes/ClassMethods.html +++ b/doc/OAuth2/FilteredAttributes/ClassMethods.html @@ -218,7 +218,7 @@

    diff --git a/doc/OAuth2/Response.html b/doc/OAuth2/Response.html index 3afa84e5..2e7c0a1a 100644 --- a/doc/OAuth2/Response.html +++ b/doc/OAuth2/Response.html @@ -1134,7 +1134,7 @@

    diff --git a/doc/OAuth2/Strategy.html b/doc/OAuth2/Strategy.html index c543ea3e..6b636c69 100644 --- a/doc/OAuth2/Strategy.html +++ b/doc/OAuth2/Strategy.html @@ -107,7 +107,7 @@

    Defined Under Namespace

    diff --git a/doc/OAuth2/Strategy/Assertion.html b/doc/OAuth2/Strategy/Assertion.html index cce5b918..df9fa5d7 100644 --- a/doc/OAuth2/Strategy/Assertion.html +++ b/doc/OAuth2/Strategy/Assertion.html @@ -481,7 +481,7 @@

    diff --git a/doc/OAuth2/Strategy/AuthCode.html b/doc/OAuth2/Strategy/AuthCode.html index d56ca793..f0dfcc46 100644 --- a/doc/OAuth2/Strategy/AuthCode.html +++ b/doc/OAuth2/Strategy/AuthCode.html @@ -469,7 +469,7 @@

    diff --git a/doc/OAuth2/Strategy/Base.html b/doc/OAuth2/Strategy/Base.html index 6805feff..e759fac1 100644 --- a/doc/OAuth2/Strategy/Base.html +++ b/doc/OAuth2/Strategy/Base.html @@ -195,7 +195,7 @@

    diff --git a/doc/OAuth2/Strategy/ClientCredentials.html b/doc/OAuth2/Strategy/ClientCredentials.html index c798e767..524e9393 100644 --- a/doc/OAuth2/Strategy/ClientCredentials.html +++ b/doc/OAuth2/Strategy/ClientCredentials.html @@ -343,7 +343,7 @@

    diff --git a/doc/OAuth2/Strategy/Implicit.html b/doc/OAuth2/Strategy/Implicit.html index 22344427..027b9c25 100644 --- a/doc/OAuth2/Strategy/Implicit.html +++ b/doc/OAuth2/Strategy/Implicit.html @@ -410,7 +410,7 @@

    diff --git a/doc/OAuth2/Strategy/Password.html b/doc/OAuth2/Strategy/Password.html index fd4b8385..d505b8be 100644 --- a/doc/OAuth2/Strategy/Password.html +++ b/doc/OAuth2/Strategy/Password.html @@ -364,7 +364,7 @@

    diff --git a/doc/OAuth2/Version.html b/doc/OAuth2/Version.html index 49a28767..b5524122 100644 --- a/doc/OAuth2/Version.html +++ b/doc/OAuth2/Version.html @@ -111,7 +111,7 @@

    diff --git a/doc/_index.html b/doc/_index.html index 24e69d61..06458ffd 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -300,7 +300,7 @@

    Namespace Listing A-Z

    diff --git a/doc/file.CHANGELOG.html b/doc/file.CHANGELOG.html index 77c345fc..539d9e4d 100644 --- a/doc/file.CHANGELOG.html +++ b/doc/file.CHANGELOG.html @@ -773,7 +773,7 @@

    diff --git a/doc/file.CODE_OF_CONDUCT.html b/doc/file.CODE_OF_CONDUCT.html index 2123bd2c..21dd5a26 100644 --- a/doc/file.CODE_OF_CONDUCT.html +++ b/doc/file.CODE_OF_CONDUCT.html @@ -192,7 +192,7 @@

    Attribution

    diff --git a/doc/file.CONTRIBUTING.html b/doc/file.CONTRIBUTING.html index 255e1e20..4ce77f6d 100644 --- a/doc/file.CONTRIBUTING.html +++ b/doc/file.CONTRIBUTING.html @@ -195,7 +195,7 @@

    To release a new version:

    diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index 83220f61..ac4aeb8a 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -60,7 +60,7 @@
    MIT License

    Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
    Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    diff --git a/doc/file.README.html b/doc/file.README.html index e25c3c79..80064422 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/file.SECURITY.html b/doc/file.SECURITY.html index ca8a2d5a..5e9ccefd 100644 --- a/doc/file.SECURITY.html +++ b/doc/file.SECURITY.html @@ -110,7 +110,7 @@

    OAuth2 for Enterprise

    diff --git a/doc/index.html b/doc/index.html index 872265fd..d1b46494 100644 --- a/doc/index.html +++ b/doc/index.html @@ -975,7 +975,7 @@

    🤑 One more thing

    diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 818d859d..a89f9e6f 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -100,7 +100,7 @@

    Defined Under Namespace

    diff --git a/spec/oauth2/access_token_spec.rb b/spec/oauth2/access_token_spec.rb index 87da6494..2c032e4d 100644 --- a/spec/oauth2/access_token_spec.rb +++ b/spec/oauth2/access_token_spec.rb @@ -397,7 +397,7 @@ def assert_initialized_token(target) let(:token) { "" } it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:mode=>:this_is_bad, :raise_errors=>true}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{mode: :this_is_bad, raise_errors: true}}"}.to_s) end end @@ -405,7 +405,7 @@ def assert_initialized_token(target) let(:token) { nil } it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:mode=>:this_is_bad, :raise_errors=>true}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{mode: :this_is_bad, raise_errors: true}}"}.to_s) end end end @@ -611,7 +611,7 @@ def assert_initialized_token(target) context "when there is no refresh_token" do it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:raise_errors=>true}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{raise_errors: true}}"}.to_s) end end @@ -637,7 +637,7 @@ def assert_initialized_token(target) context "when there is no refresh_token" do it "raises on initialize" do - block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: {:raise_errors=>true}"}.to_s) + block_is_expected.to raise_error(OAuth2::Error, {error: "OAuth2::AccessToken has no token", error_description: "Options are: #{{raise_errors: true}}"}.to_s) end end From ab42b7877462a12e6b6759b93c5c2112ed6ae0dd Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 10:14:10 +0700 Subject: [PATCH 10/11] =?UTF-8?q?=F0=9F=94=A5=20FOSSA=20is=20a=20trash=20s?= =?UTF-8?q?ervice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 ++------- doc/OAuth2.html | 2 +- doc/OAuth2/AccessToken.html | 2 +- doc/OAuth2/Authenticator.html | 2 +- doc/OAuth2/Client.html | 2 +- doc/OAuth2/Error.html | 2 +- doc/OAuth2/FilteredAttributes.html | 2 +- doc/OAuth2/FilteredAttributes/ClassMethods.html | 2 +- doc/OAuth2/Response.html | 2 +- doc/OAuth2/Strategy.html | 2 +- doc/OAuth2/Strategy/Assertion.html | 2 +- doc/OAuth2/Strategy/AuthCode.html | 2 +- doc/OAuth2/Strategy/Base.html | 2 +- doc/OAuth2/Strategy/ClientCredentials.html | 2 +- doc/OAuth2/Strategy/Implicit.html | 2 +- doc/OAuth2/Strategy/Password.html | 2 +- doc/OAuth2/Version.html | 2 +- doc/_index.html | 2 +- doc/file.CHANGELOG.html | 2 +- doc/file.CODE_OF_CONDUCT.html | 2 +- doc/file.CONTRIBUTING.html | 2 +- doc/file.LICENSE.html | 2 +- doc/file.README.html | 6 ++---- doc/file.SECURITY.html | 2 +- doc/index.html | 6 ++---- doc/top-level-namespace.html | 2 +- 26 files changed, 29 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 02f38290..3b1607ca 100644 --- a/README.md +++ b/README.md @@ -148,9 +148,9 @@ One of these might be what you are looking for: | Works with MRI Ruby 2 | [![Ruby 2.3 Compat][💎ruby-2.3i]][🚎1-an-wf] [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎1-an-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎1-an-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎7-us-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎7-us-wf] | | Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] | | Documentation | [![Discussion][⛳gg-discussions-img]][⛳gg-discussions] [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![HEAD on RubyDoc.info][📜docs-head-rd-img]][🚎yard-head] [![BDFL Blog][🚂bdfl-blog-img]][🚂bdfl-blog] [![Wiki][📜wiki-img]][📜wiki] | -| Compliance | [![License: MIT][📄license-img]][📄license-ref] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] [![FOSSA][🏘fossa-img]][🏘fossa] | +| Compliance | [![License: MIT][📄license-img]][📄license-ref] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] | | Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] | -| Support | [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite] [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork] [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor] | +| Support | [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite] [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork] [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor] | | Enterprise Support | [![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]
    💡Subscribe for support guarantees covering _all_ FLOSS dependencies!
    💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]!
    💡Tidelift pays maintainers to maintain the software you depend on!
    📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers! | | Comrade BDFL 🎖️ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖🦋bluesky-img]][💖🦋bluesky] [![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact] [![My technical writing][💖💁🏼‍♂️devto-img]][💖💁🏼‍♂️devto] | | `...` 💖 | [![Find Me on WellFound:][💖✌️wellfound-img]][💖✌️wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][💖🌳linktree-img]][💖🌳linktree] [![More About Me][💖💁🏼‍♂️aboutme-img]][💖💁🏼‍♂️aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [🧪][💖🧪lab] | @@ -703,11 +703,6 @@ The gem is available as open source under the terms of the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref]. See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer]. -[![FOSSA Status][fossa2-img]][fossa2] - -[fossa2]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2?ref=badge_large -[fossa2-img]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2.svg?type=large - ### © Copyright
      diff --git a/doc/OAuth2.html b/doc/OAuth2.html index 9d5886d8..269f3588 100644 --- a/doc/OAuth2.html +++ b/doc/OAuth2.html @@ -326,7 +326,7 @@

      diff --git a/doc/OAuth2/AccessToken.html b/doc/OAuth2/AccessToken.html index b559b747..5648430b 100644 --- a/doc/OAuth2/AccessToken.html +++ b/doc/OAuth2/AccessToken.html @@ -3069,7 +3069,7 @@

      diff --git a/doc/OAuth2/Authenticator.html b/doc/OAuth2/Authenticator.html index 8bc6e7cc..53d768b8 100644 --- a/doc/OAuth2/Authenticator.html +++ b/doc/OAuth2/Authenticator.html @@ -631,7 +631,7 @@

      diff --git a/doc/OAuth2/Client.html b/doc/OAuth2/Client.html index 94243584..c94105f6 100644 --- a/doc/OAuth2/Client.html +++ b/doc/OAuth2/Client.html @@ -2651,7 +2651,7 @@

      diff --git a/doc/OAuth2/Error.html b/doc/OAuth2/Error.html index 0d89222e..bb717c6a 100644 --- a/doc/OAuth2/Error.html +++ b/doc/OAuth2/Error.html @@ -518,7 +518,7 @@

      diff --git a/doc/OAuth2/FilteredAttributes.html b/doc/OAuth2/FilteredAttributes.html index 6696cf47..71336486 100644 --- a/doc/OAuth2/FilteredAttributes.html +++ b/doc/OAuth2/FilteredAttributes.html @@ -268,7 +268,7 @@

      diff --git a/doc/OAuth2/FilteredAttributes/ClassMethods.html b/doc/OAuth2/FilteredAttributes/ClassMethods.html index 0817d533..fbb49460 100644 --- a/doc/OAuth2/FilteredAttributes/ClassMethods.html +++ b/doc/OAuth2/FilteredAttributes/ClassMethods.html @@ -218,7 +218,7 @@

      diff --git a/doc/OAuth2/Response.html b/doc/OAuth2/Response.html index 2e7c0a1a..fe27e27d 100644 --- a/doc/OAuth2/Response.html +++ b/doc/OAuth2/Response.html @@ -1134,7 +1134,7 @@

      diff --git a/doc/OAuth2/Strategy.html b/doc/OAuth2/Strategy.html index 6b636c69..e81809eb 100644 --- a/doc/OAuth2/Strategy.html +++ b/doc/OAuth2/Strategy.html @@ -107,7 +107,7 @@

      Defined Under Namespace

      diff --git a/doc/OAuth2/Strategy/Assertion.html b/doc/OAuth2/Strategy/Assertion.html index df9fa5d7..19d57804 100644 --- a/doc/OAuth2/Strategy/Assertion.html +++ b/doc/OAuth2/Strategy/Assertion.html @@ -481,7 +481,7 @@

      diff --git a/doc/OAuth2/Strategy/AuthCode.html b/doc/OAuth2/Strategy/AuthCode.html index f0dfcc46..dfa7cc0a 100644 --- a/doc/OAuth2/Strategy/AuthCode.html +++ b/doc/OAuth2/Strategy/AuthCode.html @@ -469,7 +469,7 @@

      diff --git a/doc/OAuth2/Strategy/Base.html b/doc/OAuth2/Strategy/Base.html index e759fac1..c8516ebe 100644 --- a/doc/OAuth2/Strategy/Base.html +++ b/doc/OAuth2/Strategy/Base.html @@ -195,7 +195,7 @@

      diff --git a/doc/OAuth2/Strategy/ClientCredentials.html b/doc/OAuth2/Strategy/ClientCredentials.html index 524e9393..9c19ce0c 100644 --- a/doc/OAuth2/Strategy/ClientCredentials.html +++ b/doc/OAuth2/Strategy/ClientCredentials.html @@ -343,7 +343,7 @@

      diff --git a/doc/OAuth2/Strategy/Implicit.html b/doc/OAuth2/Strategy/Implicit.html index 027b9c25..fd85df31 100644 --- a/doc/OAuth2/Strategy/Implicit.html +++ b/doc/OAuth2/Strategy/Implicit.html @@ -410,7 +410,7 @@

      diff --git a/doc/OAuth2/Strategy/Password.html b/doc/OAuth2/Strategy/Password.html index d505b8be..41751289 100644 --- a/doc/OAuth2/Strategy/Password.html +++ b/doc/OAuth2/Strategy/Password.html @@ -364,7 +364,7 @@

      diff --git a/doc/OAuth2/Version.html b/doc/OAuth2/Version.html index b5524122..7f0f9662 100644 --- a/doc/OAuth2/Version.html +++ b/doc/OAuth2/Version.html @@ -111,7 +111,7 @@

      diff --git a/doc/_index.html b/doc/_index.html index 06458ffd..6dc6d351 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -300,7 +300,7 @@

      Namespace Listing A-Z

      diff --git a/doc/file.CHANGELOG.html b/doc/file.CHANGELOG.html index 539d9e4d..59a898cd 100644 --- a/doc/file.CHANGELOG.html +++ b/doc/file.CHANGELOG.html @@ -773,7 +773,7 @@

      diff --git a/doc/file.CODE_OF_CONDUCT.html b/doc/file.CODE_OF_CONDUCT.html index 21dd5a26..5f7374ba 100644 --- a/doc/file.CODE_OF_CONDUCT.html +++ b/doc/file.CODE_OF_CONDUCT.html @@ -192,7 +192,7 @@

      Attribution

      diff --git a/doc/file.CONTRIBUTING.html b/doc/file.CONTRIBUTING.html index 4ce77f6d..6e6dd4a3 100644 --- a/doc/file.CONTRIBUTING.html +++ b/doc/file.CONTRIBUTING.html @@ -195,7 +195,7 @@

      To release a new version:

      diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index ac4aeb8a..0567285a 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -60,7 +60,7 @@
      MIT License

      Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
      Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors

      Permission is hereby granted, free of charge, to any person obtaining a copy
      of this software and associated documentation files (the "Software"), to deal
      in the Software without restriction, including without limitation the rights
      to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
      copies of the Software, and to permit persons to whom the Software is
      furnished to do so, subject to the following conditions:

      The above copyright notice and this permission notice shall be included in all
      copies or substantial portions of the Software.

      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
      AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
      SOFTWARE.
      diff --git a/doc/file.README.html b/doc/file.README.html index 80064422..2259f860 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -342,7 +342,7 @@

      💡 Info you can shake a stick at

      Compliance -License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0 FOSSA +License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0 @@ -923,8 +923,6 @@

      📄 License

      the MIT License License: MIT.
      See LICENSE.txt for the official Copyright Notice.

      -

      FOSSA Status

      -
        @@ -975,7 +973,7 @@

        🤑 One more thing

        diff --git a/doc/file.SECURITY.html b/doc/file.SECURITY.html index 5e9ccefd..a3f453b4 100644 --- a/doc/file.SECURITY.html +++ b/doc/file.SECURITY.html @@ -110,7 +110,7 @@

        OAuth2 for Enterprise

        diff --git a/doc/index.html b/doc/index.html index d1b46494..fe06b210 100644 --- a/doc/index.html +++ b/doc/index.html @@ -342,7 +342,7 @@

        💡 Info you can shake a stick at

        Compliance -License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0 FOSSA +License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0 @@ -923,8 +923,6 @@

        📄 License

        the MIT License License: MIT.
        See LICENSE.txt for the official Copyright Notice.

        -

        FOSSA Status

        -
          @@ -975,7 +973,7 @@

          🤑 One more thing

          diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index a89f9e6f..eb9808e4 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -100,7 +100,7 @@

          Defined Under Namespace

          From bfcdd89337e132bbecec6e5aa334738606b770c2 Mon Sep 17 00:00:00 2001 From: "Peter H. Boling" Date: Thu, 22 May 2025 10:18:52 +0700 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=94=A5=20FOSSA=20is=20a=20trash=20s?= =?UTF-8?q?ervice,=20still?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 3b1607ca..b19cd064 100644 --- a/README.md +++ b/README.md @@ -902,8 +902,6 @@ or one of the others at the head of this README. [💎SHA_checksums]: https://gitlab.com/oauth-xx/oauth2/-/tree/main/checksums [💎rlts]: https://github.com/rubocop-lts/rubocop-lts [💎rlts-img]: https://img.shields.io/badge/code_style_%26_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white -[🏘fossa]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2?ref=badge_shield -[🏘fossa-img]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2.svg?type=shield [💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/ [✉️discord-invite]: https://discord.gg/3qme4XHNKN [✉️discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge