Skip to content

Commit b1433e4

Browse files
committed
✨ snaky_hash_klass
1 parent e2b4e80 commit b1433e4

28 files changed

+98
-60
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
2222
- Incorrect documentation related to silencing warnings (@pboling)
2323
### Security
2424

25+
## [2.0.11] - 2025-05-22
26+
- TAG: [v2.0.11][2.0.11t]
27+
- COVERAGE: 100.00% -- 516/516 lines in 14 files
28+
- BRANCH COVERAGE: 100.00% -- 170/170 branches in 14 files
29+
- 79.05% documented
30+
### Added
31+
- More documentation
32+
### Changed
33+
- Upgraded to snaky_hash v2.0.2
34+
- Provides solution for serialization issues
35+
### Fixed
36+
- [gh650](https://github.com/oauth-xx/oauth2/pull/650) - Regression in return type of `OAuth2::Response#parsed`
37+
2538
## [2.0.10] - 2025-05-17
2639
- TAG: [v2.0.10][2.0.10t]
2740
- COVERAGE: 100.00% -- 518/518 lines in 14 files

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## 🔐 OAuth2
1111

12-
[![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]
12+
[![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] [![QLTY Maintainability][🔑-mnti♻️]][🔑cc-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] [![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]
1313

1414
---
1515

@@ -145,7 +145,7 @@ One of these might be what you are looking for:
145145
| Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎10-j-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎10-j-wf] [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
146146
| Works with Truffle Ruby | [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] [![Truffle Ruby HEAD Compat][💎truby-headi]][🚎3-hd-wf] |
147147
| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎4-lg-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎6-s-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] |
148-
| 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] |
148+
| Works with MRI Ruby 2 | [![Ruby 2.3 Compat][💎ruby-2.3i]][🚎13-cbs-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] |
149149
| 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] |
150150
| 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] |
151151
| 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] |
@@ -328,19 +328,17 @@ For more see [SECURITY.md][🔐security].
328328

329329
## What is new for v2.0?
330330

331-
- Officially support Ruby versions >= 2.7
332-
- Unofficially support Ruby versions >= 2.5
333-
- Incidentally support Ruby versions >= 2.2
331+
- Works with Ruby versions >= 2.2
334332
- Drop support for the expired MAC Draft (all versions)
335333
- Support IETF rfc7523 JWT Bearer Tokens
336334
- Support IETF rfc7231 Relative Location in Redirect
337335
- Support IETF rfc6749 Don't set oauth params when nil
338336
- Support IETF rfc7009 Token Revocation (since v2.0.10)
339337
- Support [OIDC 1.0 Private Key JWT](https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication); based on the OAuth JWT assertion specification [(RFC 7523)](https://tools.ietf.org/html/rfc7523)
340338
- Support new formats, including from [jsonapi.org](http://jsonapi.org/format/): `application/vdn.api+json`, `application/vnd.collection+json`, `application/hal+json`, `application/problem+json`
341-
- Adds new option to `OAuth2::Client#get_token`:
339+
- Adds option to `OAuth2::Client#get_token`:
342340
- `:access_token_class` (`AccessToken`); user specified class to use for all calls to `get_token`
343-
- Adds new option to `OAuth2::AccessToken#initialize`:
341+
- Adds option to `OAuth2::AccessToken#initialize`:
344342
- `:expires_latency` (`nil`); number of seconds by which AccessToken validity will be reduced to offset latency
345343
- By default, keys are transformed to snake case.
346344
- Original keys will still work as previously, in most scenarios, thanks to [snaky_hash][snaky_hash] gem.
@@ -487,16 +485,16 @@ response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash g
487485

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

490-
There are two ways to do this.
488+
There are two ways to do this, and the second option recommended.
489+
490+
1. Globally configure `SnakyHash::StringKeyed` to use the serializer. Put this in your code somewhere reasonable (like an initializer for Rails):
491491

492-
1. Global: put this in your code somewhere reasonable (like an initializer for Rails):
493492
```ruby
494493
SnakyHash::StringKeyed.class_eval do
495494
extend SnakyHash::Serializer
496495
end
497496
```
498497

499-
2.
500498

501499
#### What if I hate snakes and/or indifference?
502500

@@ -510,7 +508,7 @@ response.parsed.class.name # => Hash (just, regular old Hash)
510508
```
511509

512510
<details>
513-
<summary>Debugging</summary>
511+
<summary>Debugging & Logging</summary>
514512

515513
Set an environment variable as per usual (e.g. with [dotenv](https://github.com/bkeepers/dotenv)).
516514

@@ -887,7 +885,7 @@ or one of the others at the head of this README.
887885
[📌gitmoji]:https://gitmoji.dev
888886
[📌gitmoji-img]:https://img.shields.io/badge/gitmoji_commits-%20😜%20😍-34495e.svg?style=flat-square
889887
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
890-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.518-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
888+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.516-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
891889
[🔐security]: SECURITY.md
892890
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
893891
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year

doc/OAuth2.html

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

328328
<div id="footer">
329-
Generated on Thu May 22 10:13:43 2025 by
329+
Generated on Thu May 22 10:28:34 2025 by
330330
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
331331
0.9.37 (ruby-3.4.3).
332332
</div>

doc/OAuth2/AccessToken.html

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

30713071
<div id="footer">
3072-
Generated on Thu May 22 10:13:43 2025 by
3072+
Generated on Thu May 22 10:28:34 2025 by
30733073
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
30743074
0.9.37 (ruby-3.4.3).
30753075
</div>

doc/OAuth2/Authenticator.html

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

633633
<div id="footer">
634-
Generated on Thu May 22 10:13:43 2025 by
634+
Generated on Thu May 22 10:28:34 2025 by
635635
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
636636
0.9.37 (ruby-3.4.3).
637637
</div>

doc/OAuth2/Client.html

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

26532653
<div id="footer">
2654-
Generated on Thu May 22 10:13:43 2025 by
2654+
Generated on Thu May 22 10:28:34 2025 by
26552655
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
26562656
0.9.37 (ruby-3.4.3).
26572657
</div>

doc/OAuth2/Error.html

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

520520
<div id="footer">
521-
Generated on Thu May 22 10:13:43 2025 by
521+
Generated on Thu May 22 10:28:34 2025 by
522522
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
523523
0.9.37 (ruby-3.4.3).
524524
</div>

doc/OAuth2/FilteredAttributes.html

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

270270
<div id="footer">
271-
Generated on Thu May 22 10:13:43 2025 by
271+
Generated on Thu May 22 10:28:34 2025 by
272272
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
273273
0.9.37 (ruby-3.4.3).
274274
</div>

doc/OAuth2/FilteredAttributes/ClassMethods.html

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

220220
<div id="footer">
221-
Generated on Thu May 22 10:13:43 2025 by
221+
Generated on Thu May 22 10:28:34 2025 by
222222
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
223223
0.9.37 (ruby-3.4.3).
224224
</div>

doc/OAuth2/Response.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ <h3 class="signature " id="status-instance_method">
11341134
</div>
11351135

11361136
<div id="footer">
1137-
Generated on Thu May 22 10:13:43 2025 by
1137+
Generated on Thu May 22 10:28:34 2025 by
11381138
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
11391139
0.9.37 (ruby-3.4.3).
11401140
</div>

0 commit comments

Comments
 (0)