Skip to content

Commit 70e4c19

Browse files
committed
📝 Update documentation
1 parent bb20d30 commit 70e4c19

22 files changed

+130
-79
lines changed

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ authors:
1616
identifiers:
1717
- type: url
1818
value: 'https://github.com/oauth-xx/snaky_hash'
19-
description: oath2
19+
description: snaky_hash
2020
repository-code: 'https://github.com/oauth-xx/snaky_hash'
2121
abstract: >-
2222
snaky_hash

README.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88

99
This library is similar in purpose to the HashWithIndifferentAccess that is famously used in Rails.
1010

11+
This gem is used by `oauth`, `oauth2`, and other, gems to normalize hash keys to `snake_case` and lookups,
12+
and provide a nice psuedo-object interface.
13+
14+
It can be thought of as a mashup, with upgrades, to the `Rash` (specifically the [`rash_alt`](https://github.com/shishi/rash_alt) flavor), which is a special `Mash`, made popular by the `hashie` gem, and the `serialized_hashie` [gem by krystal](https://github.com/krystal/serialized-hashie).
15+
16+
Classes that include `SnakyHash::Snake` should inherit from `Hashie::Mash`.
17+
18+
## New for v2.0.2: Serialization Support
19+
20+
The serialization support is set to `false` by default, for backwards compatibility, but may be switched to `true` in the next major release, which will be v3. Example:
21+
22+
```ruby
23+
# This class has `dump` and `load` abilities!
24+
class MyStringKeyedHash < Hashie::Mash
25+
include SnakyHash::Snake.new(
26+
key_type: :string,
27+
serializer: true,
28+
)
29+
end
30+
```
31+
1132
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
1233
|-----------------------------------------------|-------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------|
1334
| 🧪 [oauth-xx/snaky_hash on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜wiki] | 🏀 Tiny Matrix ||
@@ -69,20 +90,13 @@ and are developed in tight collaboration with the oauth and oauth2 gems.
6990
| 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] |
7091
| 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] |
7192
| 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] |
72-
| 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] |
93+
| 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] |
7394
| Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] |
74-
| 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] |
95+
| 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] |
7596
| Enterprise Support | [![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]<br/>💡Subscribe for support guarantees covering _all_ FLOSS dependencies!<br/>💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]!<br/>💡Tidelift pays maintainers to maintain the software you depend on!<br/>📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers! |
7697
| 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] |
7798
| `...` 💖 | [![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] |
7899

79-
This gem is used by the `oauth` and `oauth2` gems, and others, to normalize hash keys and lookups,
80-
and provide a nice psuedo-object interface.
81-
82-
It has its roots in the `Rash` (specifically the [`rash_alt`](https://github.com/shishi/rash_alt) flavor), which is a special `Mash`, made popular by the `hashie` gem.
83-
84-
Classes that include `SnakyHash::Snake` should inherit from `Hashie::Mash`.
85-
86100
## ✨ Installation
87101

88102
Install the gem and add to the application's Gemfile by executing:
@@ -254,26 +268,18 @@ The gem is available as open source under the terms of
254268
the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref].
255269
See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer].
256270

257-
[![FOSSA Status][fossa2-img])][fossa2]
258-
259-
[fossa2]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Fsnaky_hash?ref=badge_large
260-
[fossa2-img]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Fsnaky_hash.svg?type=large
261-
262271
### © Copyright
263272

264273
<ul>
265274
<li>
266-
2017 - 2025 Peter H. Boling, of
275+
2022, 2025 Peter H. Boling, of
267276
<a href="https://railsbling.com">
268277
RailsBling.com
269278
<picture>
270279
<img alt="Rails Bling" height="20" src="https://railsbling.com/images/logos/RailsBling-TrainLogo.svg" />
271280
</picture>
272281
</a>, and snaky_hash contributors
273282
</li>
274-
<li>
275-
Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
276-
</li>
277283
</ul>
278284

279285
## 🤑 One more thing
@@ -345,15 +351,15 @@ or one of the others at the head of this README.
345351
[👽version]: https://rubygems.org/gems/snaky_hash
346352
[👽versioni]: https://img.shields.io/gem/v/snaky_hash.svg
347353
[🔑qlty-mnt]: https://qlty.sh/gh/oauth-xx/projects/snaky_hash
348-
[🔑qlty-mnti♻️]: https://qlty.sh/badges/d3370c2c-8791-4202-9759-76f527f76005/maintainability.svg
354+
[🔑qlty-mnti♻️]: https://qlty.sh/badges/84e960b2-4ed2-4b47-9913-02c32680ec98/maintainability.svg
349355
[🔑qlty-cov]: https://qlty.sh/gh/oauth-xx/projects/snaky_hash
350-
[🔑qlty-covi♻️]: https://qlty.sh/badges/d3370c2c-8791-4202-9759-76f527f76005/test_coverage.svg
356+
[🔑qlty-covi♻️]: https://qlty.sh/badges/84e960b2-4ed2-4b47-9913-02c32680ec98/test_coverage.svg
351357
[🔑codecov]: https://codecov.io/gh/oauth-xx/snaky_hash
352-
[🔑codecovi♻️]: https://codecov.io/gh/oauth-xx/snaky_hash/graph/badge.svg?token=bNqSzNiuo2
358+
[🔑codecovi♻️]: https://codecov.io/gh/oauth-xx/snaky_hash/graph/badge.svg?token=XqaZixl4ss
353359
[🔑coveralls]: https://coveralls.io/github/oauth-xx/snaky_hash?branch=main
354360
[🔑coveralls-img]: https://coveralls.io/repos/github/oauth-xx/snaky_hash/badge.svg?branch=main
355-
[🔑depfu]: https://depfu.com/github/oauth-xx/snaky_hash?project_id=5884
356-
[🔑depfui♻️]: https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg
361+
[🔑depfu]: https://depfu.com/github/oauth-xx/snaky_hash?project_id=63073
362+
[🔑depfui♻️]: https://badges.depfu.com/badges/7019dcf43672ba8c0e77e7fdd1063398/count.svg
357363
[🖐codeQL]: https://github.com/oauth-xx/snaky_hash/security/code-scanning
358364
[🖐codeQL-img]: https://github.com/oauth-xx/snaky_hash/actions/workflows/codeql-analysis.yml/badge.svg
359365
[🚎1-an-wf]: https://github.com/oauth-xx/snaky_hash/actions/workflows/ancient.yml
@@ -423,7 +429,7 @@ or one of the others at the head of this README.
423429
[🤝cb-pulls]: https://codeberg.org/oauth-xx/snaky_hash/pulls
424430
[🤝cb-donate]: https://donate.codeberg.org/
425431
[🤝contributing]: CONTRIBUTING.md
426-
[🔑codecov-g♻️]: https://codecov.io/gh/oauth-xx/snaky_hash/graphs/tree.svg?token=bNqSzNiuo2
432+
[🔑codecov-g♻️]: https://codecov.io/gh/oauth-xx/snaky_hash/graphs/tree.svg?token=XqaZixl4ss
427433
[🖐contrib-rocks]: https://contrib.rocks
428434
[🖐contributors]: https://github.com/oauth-xx/snaky_hash/graphs/contributors
429435
[🖐contributors-img]: https://contrib.rocks/image?repo=oauth-xx/snaky_hash
@@ -456,8 +462,17 @@ or one of the others at the head of this README.
456462
[💎SHA_checksums]: https://gitlab.com/oauth-xx/snaky_hash/-/tree/main/checksums
457463
[💎rlts]: https://github.com/rubocop-lts/rubocop-lts
458464
[💎rlts-img]: https://img.shields.io/badge/code_style_%26_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white
459-
[🏘fossa]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Fsnaky_hash?ref=badge_shield
460-
[🏘fossa-img]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Fsnaky_hash.svg?type=shield
461465
[💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/
462466
[✉️discord-invite]: https://discord.gg/3qme4XHNKN
463467
[✉️discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge
468+
469+
<details>
470+
<summary>Deprecated Badges</summary>
471+
472+
CodeCov currently fails to parse the coverage upload.
473+
474+
[![CodeCov Test Coverage][🔑codecovi♻️]][🔑codecov]
475+
476+
[![Coverage Graph][🔑codecov-g♻️]][🔑codecov]
477+
478+
</details>

doc/SnakyHash.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h2>Overview</h2><div class="docstring">
123123
</div>
124124

125125
<div id="footer">
126-
Generated on Wed May 21 22:09:23 2025 by
126+
Generated on Thu May 22 00:16:01 2025 by
127127
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
128128
0.9.37 (ruby-3.4.3).
129129
</div>

doc/SnakyHash/Error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
</div>
115115

116116
<div id="footer">
117-
Generated on Wed May 21 22:09:23 2025 by
117+
Generated on Thu May 22 00:16:01 2025 by
118118
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119119
0.9.37 (ruby-3.4.3).
120120
</div>

doc/SnakyHash/Extensions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ <h3 class="signature " id="run-instance_method">
446446
</div>
447447

448448
<div id="footer">
449-
Generated on Wed May 21 22:09:23 2025 by
449+
Generated on Thu May 22 00:16:01 2025 by
450450
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
451451
0.9.37 (ruby-3.4.3).
452452
</div>

doc/SnakyHash/Serializer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ <h3 class="signature " id="load-instance_method">
316316
</div>
317317

318318
<div id="footer">
319-
Generated on Wed May 21 22:09:23 2025 by
319+
Generated on Thu May 22 00:16:01 2025 by
320320
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
321321
0.9.37 (ruby-3.4.3).
322322
</div>

doc/SnakyHash/Serializer/BackportedInstanceMethods.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ <h3 class="signature first" id="transform_values-instance_method">
190190
</div>
191191

192192
<div id="footer">
193-
Generated on Wed May 21 22:09:23 2025 by
193+
Generated on Thu May 22 00:16:01 2025 by
194194
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
195195
0.9.37 (ruby-3.4.3).
196196
</div>

doc/SnakyHash/Serializer/Modulizer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ <h3 class="signature first" id="to_extended_mod-class_method">
189189
</div>
190190

191191
<div id="footer">
192-
Generated on Wed May 21 22:09:23 2025 by
192+
Generated on Thu May 22 00:16:01 2025 by
193193
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
194194
0.9.37 (ruby-3.4.3).
195195
</div>

doc/SnakyHash/Snake.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ <h3 class="signature first" id="included-instance_method">
275275
</div>
276276

277277
<div id="footer">
278-
Generated on Wed May 21 22:09:23 2025 by
278+
Generated on Thu May 22 00:16:01 2025 by
279279
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
280280
0.9.37 (ruby-3.4.3).
281281
</div>

doc/SnakyHash/Snake/SnakyModulizer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ <h3 class="signature first" id="to_mod-class_method">
261261
</div>
262262

263263
<div id="footer">
264-
Generated on Wed May 21 22:09:23 2025 by
264+
Generated on Thu May 22 00:16:01 2025 by
265265
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
266266
0.9.37 (ruby-3.4.3).
267267
</div>

0 commit comments

Comments
 (0)