diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index 1ff2a0f8..6bf6e50c 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -21,11 +21,11 @@ "lib/oauth2/response.rb:2054901929": [ [53, 5, 204, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 996912427] ], - "spec/oauth2/access_token_spec.rb:373808463": [ + "spec/oauth2/access_token_spec.rb:3464059918": [ [3, 1, 34, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/access_token*_spec.rb`.", 1972107547], - [809, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088], - [879, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639], - [883, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967] + [824, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088], + [894, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639], + [898, 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/CHANGELOG.md b/CHANGELOG.md index 47c1a7e8..a52a91f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Please file a bug if you notice a violation of semantic versioning. ## [Unreleased] ### Added +- [gh!671][gh!671] - Complete documentation example for Instagram by @pboling - .env.local.example for contributor happiness - note lack of builds for JRuby 9.2, 9.3 & Truffleruby 22.3, 23.0 - [actions/runner - issues/2347][GHA-continue-on-error-ui] @@ -25,7 +26,7 @@ Please file a bug if you notice a violation of semantic versioning. - [gh!670][gh!670] - AccessToken: verb-dependent token transmission mode by @mrj - e.g., Instagram GET=:query, POST/DELETE=:header ### Changed -- [gh!669][gh!669] - Upgrade to kettle-dev v1.1.9 +- [gh!669][gh!669] - Upgrade to kettle-dev v1.1.9 by @pboling ### Deprecated ### Removed ### Fixed @@ -35,6 +36,7 @@ Please file a bug if you notice a violation of semantic versioning. [gh!669]: https://github.com/ruby-oauth/oauth2/pull/669 [gh!670]: https://github.com/ruby-oauth/oauth2/pull/670 +[gh!671]: https://github.com/ruby-oauth/oauth2/pull/671 [GHA-continue-on-error-ui]: https://github.com/actions/runner/issues/2347 [GHA-allow-failure]: https://github.com/orgs/community/discussions/15452 diff --git a/README.md b/README.md index b9b30a76..d69fc2f5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ โญ๏ธ including OAuth 2.1 draft spec & OpenID Connect (OIDC) -[![Version][๐Ÿ‘ฝversioni]][๐Ÿ‘ฝversion] [![GitHub tag (latest SemVer)][โ›ณ๏ธtag-img]][โ›ณ๏ธtag] [![License: MIT][๐Ÿ“„license-img]][๐Ÿ“„license-ref] [![Downloads Rank][๐Ÿ‘ฝdl-ranki]][๐Ÿ‘ฝdl-rank] [![Open Source Helpers][๐Ÿ‘ฝoss-helpi]][๐Ÿ‘ฝoss-help] [![CodeCov Test Coverage][๐Ÿ”‘codecovi]][๐Ÿ”‘codecov] [![Coveralls Test Coverage][๐Ÿ”‘coveralls-img]][๐Ÿ”‘coveralls] [![QLTY Test Coverage][๐Ÿ”‘qlty-covi]][๐Ÿ”‘qlty-cov] [![QLTY Maintainability][๐Ÿ”‘qlty-mnti]][๐Ÿ”‘qlty-mnt] [![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] [![Deps Locked][๐ŸšŽ13-๐Ÿ”’๏ธ-wfi]][๐ŸšŽ13-๐Ÿ”’๏ธ-wf] [![Deps Unlocked][๐ŸšŽ14-๐Ÿ”“๏ธ-wfi]][๐ŸšŽ14-๐Ÿ”“๏ธ-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] [![GitHub tag (latest SemVer)][โ›ณ๏ธtag-img]][โ›ณ๏ธtag] [![License: MIT][๐Ÿ“„license-img]][๐Ÿ“„license-ref] [![Downloads Rank][๐Ÿ‘ฝdl-ranki]][๐Ÿ‘ฝdl-rank] [![Open Source Helpers][๐Ÿ‘ฝoss-helpi]][๐Ÿ‘ฝoss-help] [![Coveralls Test Coverage][๐Ÿ”‘coveralls-img]][๐Ÿ”‘coveralls] [![QLTY Test Coverage][๐Ÿ”‘qlty-covi]][๐Ÿ”‘qlty-cov] [![QLTY Maintainability][๐Ÿ”‘qlty-mnti]][๐Ÿ”‘qlty-mnt] [![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] [![Deps Locked][๐ŸšŽ13-๐Ÿ”’๏ธ-wfi]][๐ŸšŽ13-๐Ÿ”’๏ธ-wf] [![Deps Unlocked][๐ŸšŽ14-๐Ÿ”“๏ธ-wfi]][๐ŸšŽ14-๐Ÿ”“๏ธ-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] If โ˜๏ธ `ci_badges.map(&:color).detect { it != "green"}` [let me know][๐Ÿ–ผ๏ธgaltzo-discord], as I may have missed the [discord notification][๐Ÿ–ผ๏ธgaltzo-discord]. diff --git a/spec/oauth2/access_token_spec.rb b/spec/oauth2/access_token_spec.rb index c23b7e35..2234b2cd 100644 --- a/spec/oauth2/access_token_spec.rb +++ b/spec/oauth2/access_token_spec.rb @@ -429,6 +429,21 @@ def assert_initialized_token(target) expect(subject.__send__(verb, "/token/#{mode.call(verb)}").body).to include(token) end end + + context "when invalid" do + subject(:invalid_target) { target.__send__(http_verb, "/token/#{mode.call(http_verb)}") } + + let(:http_verb) { :get } + let(:mode) do + lambda do |_verb| + "foobar" + end + end + + it "correctly handles an invalid mode by raising an error" do + block_is_expected.to raise_error("invalid :mode option of foobar") + end + end end context "with client.options[:raise_errors] = false" do