Skip to content

Commit 86c8d5e

Browse files
committed
🐛 Fix bug when running Hashie v0
- New caboose workflow is an absolute wagon
1 parent 79ada49 commit 86c8d5e

27 files changed

+288
-29
lines changed

.github/workflows/ancient.yml

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

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

.github/workflows/caboose.yml

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

Appraisals

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

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

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

README.md

Lines changed: 21 additions & 1 deletion
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 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] [![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

@@ -164,6 +164,7 @@ One of these might be what you are looking for:
164164

165165
| Version | Release Date | CHANGELOG | README |
166166
|---------|--------------|---------------------------------------|---------------------------------|
167+
| 2.0.11 | 2025-05-21 | [v2.0.11 CHANGELOG][2.0.11-changelog] | [v2.0.10 README][2.0.11-readme] |
167168
| 2.0.10 | 2025-05-17 | [v2.0.10 CHANGELOG][2.0.10-changelog] | [v2.0.10 README][2.0.10-readme] |
168169
| 2.0.9 | 2022-09-16 | [v2.0.9 CHANGELOG][2.0.9-changelog] | [v2.0.9 README][2.0.9-readme] |
169170
| 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:
177178
| 2.0.0 | 2022-06-21 | [v2.0.0 CHANGELOG][2.0.0-changelog] | [v2.0.0 README][2.0.0-readme] |
178179
</details>
179180

181+
[2.0.11-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2011---2025-05-21
180182
[2.0.10-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2010---2025-05-17
181183
[2.0.9-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#209---2022-09-16
182184
[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:
189191
[2.0.1-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#201---2022-06-22
190192
[2.0.0-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#200---2022-06-21
191193

194+
[2.0.10-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.11/README.md
192195
[2.0.10-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.10/README.md
193196
[2.0.9-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.9/README.md
194197
[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"
480483
response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash gem)
481484
```
482485

486+
#### Serialization
487+
488+
As of v2.0.11, if you need to serialize the parsed result, you can!
489+
490+
There are two ways to do this.
491+
492+
1. Global: put this in your code somewhere reasonable (like an initializer for Rails):
493+
```ruby
494+
SnakyHash::StringKeyed.class_eval do
495+
extend SnakyHash::Serializer
496+
end
497+
```
498+
499+
2.
500+
483501
#### What if I hate snakes and/or indifference?
484502

485503
```ruby
@@ -811,6 +829,8 @@ or one of the others at the head of this README.
811829
[🚎11-c-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/current.yml/badge.svg
812830
[🚎12-crh-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/current-runtime-heads.yml
813831
[🚎12-crh-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/current-runtime-heads.yml/badge.svg
832+
[🚎13-cbs-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/caboose.yml
833+
[🚎13-cbs-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/caboose.yml/badge.svg
814834
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay
815835
[⛳liberapay]: https://liberapay.com/pboling/donate
816836
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github

gemfiles/audit.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "https://rubygems.org"
55
gem "mutex_m", "~> 0.2"
66
gem "stringio", "~> 3.0"
77

8-
gemspec path: "../"
8+
gemspec :path => "../"
99

1010
eval_gemfile("modular/audit.gemfile")
1111

gemfiles/coverage.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "https://rubygems.org"
55
gem "mutex_m", "~> 0.2"
66
gem "stringio", "~> 3.0"
77

8-
gemspec path: "../"
8+
gemspec :path => "../"
99

1010
eval_gemfile("modular/coverage.gemfile")
1111

gemfiles/current.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "https://rubygems.org"
55
gem "mutex_m", ">= 0.2"
66
gem "stringio", ">= 3.0"
77

8-
gemspec path: "../"
8+
gemspec :path => "../"
99

1010
eval_gemfile("modular/faraday_v2.gemfile")
1111

gemfiles/current_runtime_heads.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ source "https://rubygems.org"
55
gem "mutex_m", ">= 0.2"
66
gem "stringio", ">= 3.0"
77

8-
gemspec path: "../"
8+
gemspec :path => "../"
99

1010
eval_gemfile("modular/runtime_heads.gemfile")

gemfiles/head.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ source "https://rubygems.org"
55
gem "mutex_m", ">= 0.2"
66
gem "stringio", ">= 3.0"
77

8-
gemspec path: "../"
8+
gemspec :path => "../"
99

1010
eval_gemfile("modular/runtime_heads.gemfile")

gemfiles/omnibus.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source "https://rubygems.org"
44

5-
gemspec path: "../"
5+
gemspec :path => "../"
66

77
eval_gemfile("modular/audit.gemfile")
88

0 commit comments

Comments
 (0)