snaky_hash 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +19 -1
- data/CODE_OF_CONDUCT.md +74 -25
- data/CONTRIBUTING.md +131 -12
- data/LICENSE.txt +1 -1
- data/README.md +523 -17
- data/SECURITY.md +2 -1
- data/lib/snaky_hash/extensions.rb +57 -0
- data/lib/snaky_hash/serializer.rb +177 -0
- data/lib/snaky_hash/snake.rb +92 -47
- data/lib/snaky_hash/string_keyed.rb +9 -1
- data/lib/snaky_hash/symbol_keyed.rb +9 -1
- data/lib/snaky_hash/version.rb +7 -1
- data/lib/snaky_hash.rb +25 -1
- data.tar.gz.sig +0 -0
- metadata +124 -54
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d15358e100316a4b2347ab0b1a55b2e16f87ee69991b0579328b049b8b04abf
|
4
|
+
data.tar.gz: 5030164f28379f7d237da28aab846aa9ce1cfb55f308e257bb3cb38246da1f36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34d715bf7deb832a4ce4f04338d3cff147547d979bc42d56e8258a0975265296ec5550035581181e94d2a9b7af1afbf9de27db476b8229cec5d5c18e43b51e7
|
7
|
+
data.tar.gz: fa3e81dd83544e92d1bfe7174e34d8d6cec4d4f20d39d84bc82bf16b9852155e962d58058ff7aa312f32f3d97a7d3857367aa61892912811bd25de94982ab825
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,22 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
10
10
|
### Fixed
|
11
11
|
### Removed
|
12
12
|
|
13
|
+
## [2.0.2] - 2025-05-21 ([tag][2.0.2t])
|
14
|
+
- COVERAGE: 100.00% -- 119/119 lines in 7 files
|
15
|
+
- BRANCH COVERAGE: 100.00% -- 35/35 branches in 7 files
|
16
|
+
- 100.00% documented
|
17
|
+
### Added
|
18
|
+
- Gem is signed by 20-year cert (@pboling)
|
19
|
+
- Expires 2045-04-29
|
20
|
+
- Gemspec metadata updates (@pboling)
|
21
|
+
- Documentation updates (@pboling)
|
22
|
+
- CI covering all code, and all key versions of runtime dependencies (@pboling)
|
23
|
+
- Including Hashie v0, v1, v2, v3, v4, v5, and HEAD
|
24
|
+
- [gh2](https://github.com/oauth-xx/snaky_hash/pull/2) - Serializer option (@pboling)
|
25
|
+
- [gh3](https://github.com/oauth-xx/snaky_hash/pull/3) - Serializer Extensions (@pboling)
|
26
|
+
- Documentation site at [snaky-hash.galtzo.com](https://snaky-hash.galtzo.com) (@pboling)
|
27
|
+
- 100% documented! (@pboling)
|
28
|
+
|
13
29
|
## [2.0.1] - 2022-09-23 ([tag][2.0.1t])
|
14
30
|
### Added
|
15
31
|
- Certificate for signing gem releases (@pboling)
|
@@ -42,7 +58,9 @@ end
|
|
42
58
|
### Added
|
43
59
|
- Initial release
|
44
60
|
|
45
|
-
[Unreleased]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v2.0.
|
61
|
+
[Unreleased]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v2.0.2...main
|
62
|
+
[2.0.21]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v2.0.1...v2.0.2
|
63
|
+
[2.0.2t]: https://gitlab.com/oauth-xx/snaky_hash/-/releases/tag/v2.0.2
|
46
64
|
[2.0.1]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v2.0.0...v2.0.1
|
47
65
|
[2.0.1t]: https://gitlab.com/oauth-xx/snaky_hash/-/releases/tag/v2.0.1
|
48
66
|
[2.0.0]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v1.0.1...v2.0.0
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,20 +1,30 @@
|
|
1
|
+
|
1
2
|
# Contributor Covenant Code of Conduct
|
2
3
|
|
3
4
|
## Our Pledge
|
4
5
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
We as members, contributors, and leaders pledge to make participation in our
|
7
|
+
community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
9
|
+
identity and expression, level of experience, education, socio-economic status,
|
10
|
+
nationality, personal appearance, race, religion, or sexual identity
|
11
|
+
and orientation.
|
6
12
|
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
14
|
+
diverse, inclusive, and healthy community.
|
8
15
|
|
9
16
|
## Our Standards
|
10
17
|
|
11
|
-
Examples of behavior that contributes to a positive environment for our
|
18
|
+
Examples of behavior that contributes to a positive environment for our
|
19
|
+
community include:
|
12
20
|
|
13
21
|
* Demonstrating empathy and kindness toward other people
|
14
22
|
* Being respectful of differing opinions, viewpoints, and experiences
|
15
23
|
* Giving and gracefully accepting constructive feedback
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
17
|
-
|
24
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
25
|
+
and learning from the experience
|
26
|
+
* Focusing on what is best not just for us as individuals, but for the
|
27
|
+
overall community
|
18
28
|
|
19
29
|
Examples of unacceptable behavior include:
|
20
30
|
|
@@ -29,56 +39,95 @@ Examples of unacceptable behavior include:
|
|
29
39
|
|
30
40
|
## Enforcement Responsibilities
|
31
41
|
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
43
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
44
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
45
|
+
or harmful.
|
33
46
|
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
48
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
49
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
50
|
+
decisions when appropriate.
|
35
51
|
|
36
52
|
## Scope
|
37
53
|
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
55
|
+
an individual is officially representing the community in public spaces.
|
56
|
+
Examples of representing our community include using an official e-mail address,
|
57
|
+
posting via an official social media account, or acting as an appointed
|
58
|
+
representative at an online or offline event.
|
39
59
|
|
40
60
|
## Enforcement
|
41
61
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
63
|
+
reported to the community leaders responsible for enforcement at
|
64
|
+
[INSERT CONTACT METHOD].
|
65
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
43
66
|
|
44
|
-
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
All community leaders are obligated to respect the privacy and security of the
|
68
|
+
reporter of any incident.
|
45
69
|
|
46
70
|
## Enforcement Guidelines
|
47
71
|
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
72
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
73
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
49
74
|
|
50
75
|
### 1. Correction
|
51
76
|
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
78
|
+
unprofessional or unwelcome in the community.
|
53
79
|
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing
|
80
|
+
**Consequence**: A private, written warning from community leaders, providing
|
81
|
+
clarity around the nature of the violation and an explanation of why the
|
82
|
+
behavior was inappropriate. A public apology may be requested.
|
55
83
|
|
56
84
|
### 2. Warning
|
57
85
|
|
58
|
-
**Community Impact**: A violation through a single incident or series
|
86
|
+
**Community Impact**: A violation through a single incident or series
|
87
|
+
of actions.
|
59
88
|
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
89
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
90
|
+
interaction with the people involved, including unsolicited interaction with
|
91
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
92
|
+
includes avoiding interactions in community spaces as well as external channels
|
93
|
+
like social media. Violating these terms may lead to a temporary or
|
94
|
+
permanent ban.
|
61
95
|
|
62
96
|
### 3. Temporary Ban
|
63
97
|
|
64
|
-
**Community Impact**: A serious violation of community standards, including
|
98
|
+
**Community Impact**: A serious violation of community standards, including
|
99
|
+
sustained inappropriate behavior.
|
65
100
|
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
101
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
102
|
+
communication with the community for a specified period of time. No public or
|
103
|
+
private interaction with the people involved, including unsolicited interaction
|
104
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
105
|
+
Violating these terms may lead to a permanent ban.
|
67
106
|
|
68
107
|
### 4. Permanent Ban
|
69
108
|
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
109
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
110
|
+
standards, including sustained inappropriate behavior, harassment of an
|
111
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
71
112
|
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
113
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
114
|
+
the community.
|
73
115
|
|
74
116
|
## Attribution
|
75
117
|
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
77
|
-
available at
|
78
|
-
|
79
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
118
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
119
|
+
version 2.0, available at
|
120
|
+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
80
121
|
|
81
|
-
|
122
|
+
Community Impact Guidelines were inspired by
|
123
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
82
124
|
|
83
125
|
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available
|
126
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
127
|
+
at [https://www.contributor-covenant.org/translations][translations].
|
128
|
+
|
129
|
+
[homepage]: https://www.contributor-covenant.org
|
130
|
+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
131
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
132
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
133
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/CONTRIBUTING.md
CHANGED
@@ -1,20 +1,139 @@
|
|
1
1
|
## Contributing
|
2
2
|
|
3
|
-
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/snaky_hash
|
4
|
-
intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
-
the [code of conduct][conduct].
|
3
|
+
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/snaky_hash][🚎src-main]
|
4
|
+
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
+
the [code of conduct][🤝conduct].
|
6
6
|
|
7
|
-
To submit a patch, please fork the project and create a patch with
|
8
|
-
|
9
|
-
|
7
|
+
To submit a patch, please fork the project and create a patch with tests.
|
8
|
+
Once you're happy with it send a pull request.
|
9
|
+
|
10
|
+
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
|
11
|
+
|
12
|
+
## You can help!
|
13
|
+
|
14
|
+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
|
15
|
+
|
16
|
+
Simply follow these instructions:
|
17
|
+
|
18
|
+
1. Fork the repository
|
19
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
20
|
+
3. Make some fixes.
|
21
|
+
4. Commit your changes (`git commit -am 'Added some feature'`)
|
22
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
23
|
+
6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
|
24
|
+
7. Create new Pull Request.
|
25
|
+
|
26
|
+
## Appraisals
|
27
|
+
|
28
|
+
From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
|
29
|
+
They are created and updated with the commands:
|
30
|
+
|
31
|
+
NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
|
32
|
+
|
33
|
+
Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
|
34
|
+
|
35
|
+
```shell
|
36
|
+
BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
|
37
|
+
BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
|
38
|
+
bundle exec rake rubocop_gradual:autocorrect
|
39
|
+
```
|
40
|
+
|
41
|
+
When adding an appraisal to CI check the [runner tool cache][🏃♂️runner-tool-cache] to see which runner to use.
|
42
|
+
|
43
|
+
## The Reek List
|
44
|
+
|
45
|
+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
|
46
|
+
|
47
|
+
To refresh the `reek` list:
|
48
|
+
|
49
|
+
```bash
|
50
|
+
bundle exec reek > REEK
|
51
|
+
```
|
52
|
+
|
53
|
+
## Run Tests
|
54
|
+
|
55
|
+
To run all tests
|
56
|
+
|
57
|
+
```bash
|
58
|
+
bundle exec rake test
|
59
|
+
```
|
60
|
+
|
61
|
+
## Lint It
|
62
|
+
|
63
|
+
Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
|
64
|
+
|
65
|
+
```bash
|
66
|
+
bundle exec rake
|
67
|
+
```
|
68
|
+
|
69
|
+
Or just run the linter.
|
70
|
+
|
71
|
+
```bash
|
72
|
+
bundle exec rake rubocop_gradual:autocorrect
|
73
|
+
```
|
10
74
|
|
11
75
|
## Contributors
|
12
76
|
|
13
|
-
|
77
|
+
Your picture could be here!
|
78
|
+
|
79
|
+
[![Contributors][🖐contributors-img]][🖐contributors]
|
80
|
+
|
81
|
+
Made with [contributors-img][🖐contrib-rocks].
|
82
|
+
|
83
|
+
Also see GitLab Contributors: [https://gitlab.com/oauth-xx/snaky_hash/-/graphs/main][🚎contributors-gl]
|
84
|
+
|
85
|
+
## For Maintainers
|
86
|
+
|
87
|
+
### One-time, Per-maintainer, Setup
|
88
|
+
|
89
|
+
**IMPORTANT**: If you want to sign the build you create,
|
90
|
+
your public key for signing gems will need to be picked up by the line in the
|
91
|
+
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
|
92
|
+
All releases to RubyGems.org will be signed.
|
93
|
+
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
|
94
|
+
|
95
|
+
NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment.
|
96
|
+
|
97
|
+
### To release a new version:
|
14
98
|
|
15
|
-
|
99
|
+
1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
|
100
|
+
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
|
101
|
+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
102
|
+
4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
|
103
|
+
5. Run `git push` to trigger the final CI pipeline before release, & merge PRs
|
104
|
+
- NOTE: Remember to [check the build][🧪build]!
|
105
|
+
6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
|
106
|
+
7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
|
107
|
+
8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure you will release the latest trunk code
|
108
|
+
9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
|
109
|
+
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
|
110
|
+
- If the echo above has no output, then it didn't work.
|
111
|
+
- Note that you'll need the `zsh/datetime` module, if running `zsh`.
|
112
|
+
- In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
|
113
|
+
10. Run `bundle exec rake build`
|
114
|
+
11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
|
115
|
+
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
|
116
|
+
[gem][💎stone_checksums].
|
117
|
+
- Checksums will be committed automatically by the script, but not pushed
|
118
|
+
12. Run `bundle exec rake release` which will create a git tag for the version,
|
119
|
+
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
|
16
120
|
|
17
|
-
[
|
18
|
-
[
|
19
|
-
[
|
20
|
-
[
|
121
|
+
[🚎src-main]: https://gitlab.com/oauth-xx/snaky_hash
|
122
|
+
[🧪build]: https://github.com/oauth-xx/snaky_hash/actions
|
123
|
+
[🤝conduct]: https://gitlab.com/oauth-xx/snaky_hash/-/blob/main/CODE_OF_CONDUCT.md
|
124
|
+
[🖐contrib-rocks]: https://contrib.rocks
|
125
|
+
[🖐contributors]: https://github.com/oauth-xx/snaky_hash/graphs/contributors
|
126
|
+
[🚎contributors-gl]: https://gitlab.com/oauth-xx/snaky_hash/-/graphs/main
|
127
|
+
[🖐contributors-img]: https://contrib.rocks/image?repo=oauth-xx/snaky_hash
|
128
|
+
[💎rubygems]: https://rubygems.org
|
129
|
+
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
130
|
+
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
|
131
|
+
[🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
|
132
|
+
[💎stone_checksums]: https://github.com/pboling/stone_checksums
|
133
|
+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
134
|
+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
|
135
|
+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
136
|
+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
137
|
+
[🚎appraisal-eval-gemfile-pr]: https://github.com/thoughtbot/appraisal/pull/248
|
138
|
+
[🚎appraisal-fork]: https://github.com/pboling/appraisal/tree/galtzo
|
139
|
+
[🏃♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
|
data/LICENSE.txt
CHANGED