snaky_hash 2.0.3 → 2.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a4ebce56adbdd1bb1cd6ac0fe46f3b891e0c0cf689ec611e6ca00e03c503fc1
4
- data.tar.gz: ae1ffc55d9c653904a2c65bdfeb1b1724c6bce5eab251a225b036baaa5c165c5
3
+ metadata.gz: 470baea057cb725329d366a78e0f63b827ef9a8b696ada7c898c3eca3567dcb7
4
+ data.tar.gz: 808d135faa416bff9f01c12dc8f73301d46789ac111e1205b2a5c6f3a10f3c1f
5
5
  SHA512:
6
- metadata.gz: 21e5beae61652b1307f346b676618562e1a713ff3db552e6dfc379683088e6e9de721eaca35dd32788564c77113d015af0d592def73697a2b25b5d8258a337b7
7
- data.tar.gz: 26327dc66ec45f4ab558e1cd383615107a72587b700df71837302ddef530d7b83acd5b70fb9601ad2c14f3d9c26290c956e99e941f1ce0568fed075317dacd81
6
+ metadata.gz: 657833d9641e7aff20780306515f3d936ac204726599ad5e03391936f93238bda469ed222b105fb0552936ef9a0ca711505275a7af507dee34d3609a92c58960
7
+ data.tar.gz: 1dde13aa200f9c726eb7b30bbf22cb80686faaab76df52c4034eabfd3422343de5ae7891bea3136465e9cc9c8e573a676a9e9ed801f665fe1066cffb8d8e7cf7
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,29 +1,88 @@
1
1
  # Changelog
2
+
3
+ [![SemVer 2.0.0][📌semver-img]][📌semver] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog]
4
+
2
5
  All notable changes to this project will be documented in this file.
3
6
 
4
- The format (since v2) is based on [Keep a Changelog v1](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.0.0.html).
7
+ The format is based on [Keep a Changelog][📗keep-changelog],
8
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
9
+ and [yes][📌major-versions-not-sacred], platform and engine support are part of the [public API][📌semver-breaking].
10
+ Please file a bug if you notice a violation of semantic versioning.
11
+
12
+ [📌semver]: https://semver.org/spec/v2.0.0.html
13
+ [📌semver-img]: https://img.shields.io/badge/semver-2.0.0-FFDD67.svg?style=flat
14
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
15
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
16
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
17
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
6
18
 
7
19
  ## [Unreleased]
20
+
8
21
  ### Added
22
+
9
23
  ### Changed
24
+
10
25
  ### Deprecated
26
+
11
27
  ### Removed
28
+
12
29
  ### Fixed
30
+
31
+ - Removed stale legacy CI workflows and duplicate extracted-stdlib gem
32
+ declarations from generated Appraisal gemfiles.
33
+
13
34
  ### Security
14
35
 
36
+ ## [2.0.5] - 2026-06-07
37
+
38
+ - TAG: [v2.0.5][2.0.5t]
39
+ - COVERAGE: 100.00% -- 133/133 lines in 7 files
40
+ - BRANCH COVERAGE: 100.00% -- 38/38 branches in 7 files
41
+ - 92.86% documented
42
+
43
+ ### Changed
44
+
45
+ - Refreshed project scaffolding with the current `kettle-jem` template, including
46
+ updated CI workflows, modular gemfiles, and development tooling floors.
47
+
48
+ ## [2.0.4] - 2026-05-16
49
+
50
+ - TAG: [v2.0.4][2.0.4t]
51
+ - COVERAGE: 100.00% -- 133/133 lines in 7 files
52
+ - BRANCH COVERAGE: 100.00% -- 38/38 branches in 7 files
53
+ - 100.00% documented
54
+
55
+ ### Added
56
+
57
+ - Incident Response Plan in IRP.md
58
+ - SnakyHash::VERSION (Traditional Constant Location)
59
+ - kettle-dev & kettle-test dev harnesses
60
+
61
+ ### Changed
62
+
63
+ - Contributor Conenant updated to version 2.1
64
+
65
+ ### Fixed
66
+
67
+ - Specs
68
+
15
69
  ## [2.0.3] - 2025-05-23
70
+
16
71
  - TAG: [v2.0.3][2.0.3t]
17
72
  - COVERAGE: 100.00% -- 132/132 lines in 7 files
18
73
  - BRANCH COVERAGE: 100.00% -- 38/38 branches in 7 files
19
74
  - 100.00% documented
75
+
20
76
  ### Added
77
+
21
78
  - `#dump` instance method injected by `extend SnakyHash::Serializer` (@pboling)
22
79
  - `dump_hash_extensions` - new feature, analogous to `load_hash_extensions` (@pboling)
23
80
  - `dump_value_extensions` - alternate name for `dump_extensions` (@pboling)
24
81
  - `load_value_extensions` - alternate name for `load_extensions` (@pboling)
25
82
  - Clarifying documentation (@pboling)
83
+
26
84
  ### Fixed
85
+
27
86
  - [gh4](https://github.com/oauth-xx/snaky_hash/pull/4) - Serializer extensions dump and load empty values properly (@pboling)
28
87
  - Fixed `dump_extensions`, `load_extensions`, `load_hash_extensions`
29
88
  - Intended usage is primarily JSON, and oauth2 gem
@@ -31,11 +90,14 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
31
90
  - Previous logic was inherited from design decisions made by `serialized_hashie` gem; doesn't apply here
32
91
 
33
92
  ## [2.0.2] - 2025-05-21
93
+
34
94
  - TAG: [v2.0.2][2.0.2t]
35
95
  - COVERAGE: 100.00% -- 119/119 lines in 7 files
36
96
  - BRANCH COVERAGE: 100.00% -- 35/35 branches in 7 files
37
97
  - 100.00% documented
98
+
38
99
  ### Added
100
+
39
101
  - Gem is signed by 20-year cert (@pboling)
40
102
  - Expires 2045-04-29
41
103
  - Gemspec metadata updates (@pboling)
@@ -48,42 +110,64 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
48
110
  - 100% documented! (@pboling)
49
111
 
50
112
  ## [2.0.1] - 2022-09-23
113
+
51
114
  - TAG: [v2.0.1][2.0.1t]
115
+
52
116
  ### Added
117
+
53
118
  - Certificate for signing gem releases (@pboling)
54
119
  - Gemspec metadata (@pboling)
55
120
  - funding_uri
56
121
  - mailing_list_uri
57
122
  - Checksums for released gems (@pboling)
123
+
58
124
  ### Changed
125
+
59
126
  - Gem releases are now cryptographically signed (@pboling)
60
127
 
61
128
  ## [2.0.0] - 2022-08-29
129
+
62
130
  - TAG: [v2.0.0][2.0.0t]
131
+
63
132
  ### Changed
133
+
64
134
  - **BREAKING**: `SnakeHash::Snake` is now a mixin, now with support for symbol or string keys
65
135
  ```ruby
66
136
  class MySnakedHash < Hashie::Mash
67
137
  include SnakyHash::Snake.new(key_type: :string) # or :symbol
68
138
  end
69
139
  ```
140
+
70
141
  ### Added
142
+
71
143
  - `SnakyHash::StringKeyed`: a Hashie::Mash class with snake-cased String keys
72
144
  - `SnakyHash::SymbolKeyed`: a Hashie::Mash class with snake-cased Symbol keys
73
145
 
74
146
  ## [1.0.1] - 2022-08-26
147
+
75
148
  - TAG: [v1.0.1][1.0.1t]
149
+
76
150
  ### Added
151
+
77
152
  - Missing LICENSE.txt file to release
153
+
78
154
  ### Removed
155
+
79
156
  - Accidentally added bundler dependency (vestige of transpec process) is now removed
80
157
 
81
158
  ## [1.0.0] - 2022-08-26
159
+
82
160
  - TAG: [v1.0.0][1.0.0t]
161
+
83
162
  ### Added
163
+
84
164
  - Initial release
85
165
 
86
- [Unreleased]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v2.0.3...main
166
+ [Unreleased]: https://github.com/ruby-oauth/snaky_hash/compare/v2.0.5...HEAD
167
+ [2.0.5]: https://github.com/ruby-oauth/snaky_hash/compare/v2.0.4...v2.0.5
168
+ [2.0.5t]: https://github.com/ruby-oauth/snaky_hash/releases/tag/v2.0.5
169
+ [2.0.4]: https://github.com/ruby-oauth/snaky_hash/compare/v2.0.3...v2.0.4
170
+ [2.0.4t]: https://github.com/ruby-oauth/snaky_hash/releases/tag/v2.0.4
87
171
  [2.0.3]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v2.0.2...v2.0.3
88
172
  [2.0.3t]: https://gitlab.com/oauth-xx/snaky_hash/-/releases/tag/v2.0.3
89
173
  [2.0.2]: https://gitlab.com/oauth-xx/snaky_hash/-/compare/v2.0.1...v2.0.2
data/CITATION.cff ADDED
@@ -0,0 +1,20 @@
1
+ cff-version: 1.2.0
2
+ title: "snaky_hash"
3
+ message: >-
4
+ If you use this work and you want to cite it,
5
+ then you can use the metadata from this file.
6
+ type: software
7
+ authors:
8
+ - given-names: "Peter H."
9
+ family-names: "Boling"
10
+ email: "floss@galtzo.com"
11
+ affiliation: "galtzo.com"
12
+ orcid: 'https://orcid.org/0009-0008-8519-441X'
13
+ identifiers:
14
+ - type: url
15
+ value: 'https://github.com/ruby-oauth/snaky_hash'
16
+ description: "snaky_hash"
17
+ repository-code: 'https://github.com/ruby-oauth/snaky_hash'
18
+ abstract: >-
19
+ snaky_hash
20
+ license: See license file
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # Contributor Covenant Code of Conduct
3
2
 
4
3
  ## Our Pledge
@@ -7,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
7
6
  community a harassment-free experience for everyone, regardless of age, body
8
7
  size, visible or invisible disability, ethnicity, sex characteristics, gender
9
8
  identity and expression, level of experience, education, socio-economic status,
10
- nationality, personal appearance, race, religion, or sexual identity
11
- and orientation.
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
12
11
 
13
12
  We pledge to act and interact in ways that contribute to an open, welcoming,
14
13
  diverse, inclusive, and healthy community.
@@ -23,17 +22,17 @@ community include:
23
22
  * Giving and gracefully accepting constructive feedback
24
23
  * Accepting responsibility and apologizing to those affected by our mistakes,
25
24
  and learning from the experience
26
- * Focusing on what is best not just for us as individuals, but for the
27
- overall community
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
28
27
 
29
28
  Examples of unacceptable behavior include:
30
29
 
31
- * The use of sexualized language or imagery, and sexual attention or
32
- advances of any kind
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
33
32
  * Trolling, insulting or derogatory comments, and personal or political attacks
34
33
  * Public or private harassment
35
- * Publishing others' private information, such as a physical or email
36
- address, without their explicit permission
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
37
36
  * Other conduct which could reasonably be considered inappropriate in a
38
37
  professional setting
39
38
 
@@ -53,7 +52,7 @@ decisions when appropriate.
53
52
 
54
53
  This Code of Conduct applies within all community spaces, and also applies when
55
54
  an individual is officially representing the community in public spaces.
56
- Examples of representing our community include using an official e-mail address,
55
+ Examples of representing our community include using an official email address,
57
56
  posting via an official social media account, or acting as an appointed
58
57
  representative at an online or offline event.
59
58
 
@@ -61,7 +60,7 @@ representative at an online or offline event.
61
60
 
62
61
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
62
  reported to the community leaders responsible for enforcement at
64
- [INSERT CONTACT METHOD].
63
+ [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact].
65
64
  All complaints will be reviewed and investigated promptly and fairly.
66
65
 
67
66
  All community leaders are obligated to respect the privacy and security of the
@@ -83,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.
83
82
 
84
83
  ### 2. Warning
85
84
 
86
- **Community Impact**: A violation through a single incident or series
87
- of actions.
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
88
87
 
89
88
  **Consequence**: A warning with consequences for continued behavior. No
90
89
  interaction with the people involved, including unsolicited interaction with
91
90
  those enforcing the Code of Conduct, for a specified period of time. This
92
91
  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.
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
95
94
 
96
95
  ### 3. Temporary Ban
97
96
 
@@ -107,27 +106,29 @@ Violating these terms may lead to a permanent ban.
107
106
  ### 4. Permanent Ban
108
107
 
109
108
  **Community Impact**: Demonstrating a pattern of violation of community
110
- standards, including sustained inappropriate behavior, harassment of an
109
+ standards, including sustained inappropriate behavior, harassment of an
111
110
  individual, or aggression toward or disparagement of classes of individuals.
112
111
 
113
- **Consequence**: A permanent ban from any sort of public interaction within
114
- the community.
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
115
114
 
116
115
  ## Attribution
117
116
 
118
117
  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].
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
120
 
122
121
  Community Impact Guidelines were inspired by
123
122
  [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
123
 
125
124
  For answers to common questions about this code of conduct, see the FAQ at
126
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
- at [https://www.contributor-covenant.org/translations][translations].
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
128
127
 
129
128
  [homepage]: https://www.contributor-covenant.org
130
- [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
130
  [Mozilla CoC]: https://github.com/mozilla/diversity
132
131
  [FAQ]: https://www.contributor-covenant.org/faq
133
132
  [translations]: https://www.contributor-covenant.org/translations
133
+ [🚂maint-contact]: http://www.railsbling.com/contact
134
+ [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
data/CONTRIBUTING.md CHANGED
@@ -1,77 +1,195 @@
1
- ## Contributing
1
+ # Contributing
2
2
 
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
3
+ Bug reports and pull requests are welcome on [CodeBerg][📜src-cb], [GitLab][📜src-gl], or [GitHub][📜src-gh].
4
+ This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to
5
5
  the [code of conduct][🤝conduct].
6
6
 
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.
7
+ To submit a patch, please fork the project, create a patch with tests, and send a pull request.
9
8
 
10
- We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
9
+ Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
11
10
 
12
- ## You can help!
11
+ ## Developer Certificate of Origin
13
12
 
14
- Take a look at the `reek` list which is the file called `REEK` and find something to improve.
13
+ In order to protect users of this project, we require all contributors to comply with the
14
+ [Developer Certificate of Origin](https://developercertificate.org/).
15
+ This ensures that all contributions are properly licensed and attributed.
15
16
 
16
- Simply follow these instructions:
17
+ ## Help out!
17
18
 
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.
19
+ Take a look at the open issues and pull requests, or use the gem and find something to improve.
25
20
 
26
- ## Appraisals
21
+ Follow these instructions:
27
22
 
28
- From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
29
- They are created and updated with the commands:
23
+ 1. Join the Discord: [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
24
+ 2. Fork the repository
25
+ 3. Create your feature branch (`git checkout -b my-new-feature`)
26
+ 4. Make some fixes.
27
+ 5. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 6. Push to the branch (`git push origin my-new-feature`)
29
+ 7. Make sure to add tests for it. This is important, so it doesn't break in a future release.
30
+ 8. Create new Pull Request.
31
+ 9. Announce it in the channel for this org in the [Discord][✉️discord-invite]!
32
+
33
+ ## Executables vs Rake tasks
30
34
 
31
- NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
35
+ Executables shipped by dependencies, such as kettle-dev, and stone_checksums, are available
36
+ after running `bin/setup`. These include:
32
37
 
33
- Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
38
+ - gem_checksums
39
+ - kettle-changelog
40
+ - kettle-commit-msg
41
+ - kettle-dev-setup
42
+ - kettle-dvcs
43
+ - kettle-pre-release
44
+ - kettle-readme-backers
45
+ - kettle-release
46
+
47
+ There are many Rake tasks available as well. You can see them by running:
34
48
 
35
49
  ```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
50
+ bin/rake -T
39
51
  ```
40
52
 
41
- When adding an appraisal to CI check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
53
+ ## Code quality checks
42
54
 
43
- ## The Reek List
55
+ Run the Reek task when you want a smell check that fails on current findings:
44
56
 
45
- Take a look at the `reek` list which is the file called `REEK` and find something to improve.
57
+ ```shell
58
+ bin/rake reek
59
+ ```
60
+
61
+ Refresh the checked-in `REEK` backlog through the rake task, not by redirecting
62
+ the raw `reek` executable output. The rake task uses the project bundle and
63
+ avoids stale generated binstubs shadowing the Reek gem executable:
46
64
 
47
- To refresh the `reek` list:
65
+ ```shell
66
+ bin/rake reek:update
67
+ ```
68
+
69
+ ## Environment Variables for Local Development
70
+
71
+ Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
72
+
73
+ General/runtime
74
+ - DEBUG: Enable extra internal logging for this library (default: false)
75
+ - REQUIRE_BENCH: Enable `require_bench` to profile requires (default: false)
76
+ - CI: When set to true, adjusts default rake tasks toward CI behavior
77
+
78
+ Coverage (kettle-soup-cover / SimpleCov)
79
+ - K_SOUP_COV_DO: Enable coverage collection (default: true in `mise.toml`)
80
+ - K_SOUP_COV_FORMATTERS: Comma-separated list of formatters (html, xml, rcov, lcov, json, tty)
81
+ - K_SOUP_COV_MIN_LINE: Minimum line coverage threshold (integer, e.g., 100)
82
+ - K_SOUP_COV_MIN_BRANCH: Minimum branch coverage threshold (integer, e.g., 100)
83
+ - K_SOUP_COV_MIN_HARD: Fail the run if thresholds are not met (true/false)
84
+ - K_SOUP_COV_MULTI_FORMATTERS: Enable multiple formatters at once (true/false)
85
+ - K_SOUP_COV_OPEN_BIN: Path to browser opener for HTML (empty disables auto-open)
86
+ - MAX_ROWS: Limit console output rows for simplecov-console (e.g., 1)
87
+ Tip: When running a single spec file locally, you may want `K_SOUP_COV_MIN_HARD=false` to avoid failing thresholds for a partial run.
88
+
89
+ GitHub API and CI helpers
90
+ - GITHUB_TOKEN or GH_TOKEN: Token used by `ci:act` and release workflow checks to query GitHub Actions status at higher rate limits
91
+
92
+ Releasing and signing
93
+ - SKIP_GEM_SIGNING: If set, skip gem signing during build/release
94
+ - GEM_CERT_USER: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
95
+ - SOURCE_DATE_EPOCH: Reproducible build timestamp.
96
+ - `kettle-release` will set this automatically for the session.
97
+ - Not needed on bundler >= 2.7.0, as reproducible builds have become the default.
98
+
99
+ Git hooks and commit message helpers (exe/kettle-commit-msg)
100
+ - GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
101
+ - GIT_HOOK_FOOTER_APPEND: Append a footer to commit messages when goalie allows (true/false)
102
+ - GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
103
+ - GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
104
+
105
+ Git diff driver setup
106
+ - Local setup writes repository `.gitattributes` entries and local Git `diff.smorg-*` command config so this checkout uses StructuredMerge semantic diffs.
107
+ - Global setup registers `diff.smorg-*` commands once in the user Git config; use it when you work across several StructuredMerge-enabled repositories.
108
+ - Include-file setup writes `.git/smorg/config` and includes it from local Git config, keeping command registrations out of the repository files.
109
+ - Git hosting forges generally ignore external diff drivers, so pull request views may still show raw textual diffs even when local `git diff` uses semantic drivers.
110
+
111
+ ```console
112
+ K_JEM_TEMPLATING=true bundle exec kettle-jem install
113
+ ```
114
+
115
+ Troubleshooting Git diffs
116
+ - Use `git diff --no-ext-diff` to compare against Git's built-in diff output.
117
+ - Use `git diff --no-textconv` when a textconv projection obscures the raw file bytes you need to inspect.
118
+ - If Git reports a missing `smorg-*` executable, rerun `bundle install` and the setup command above, then check `git config --local --get-regexp '^diff\.smorg-'`.
119
+ - To remove managed local entries, run `K_JEM_TEMPLATING=true bundle exec kettle-jem install --undo`; remove global command registrations with `git config --global --unset-all diff.smorg-ruby.command`.
120
+
121
+ For a quick starting point, this repository’s `mise.toml` defines the shared defaults, and `.env.local` can override them locally. Copy `.env.local.example` to `.env.local`, use `KEY=value` lines, and either activate `mise` in your shell or run commands through `mise exec -C /path/to/project -- ...`.
122
+
123
+ ## Appraisals
124
+
125
+ From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
126
+ Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
127
+ in `.structuredmerge/kettle-jem.yml`; this project was templated with `ruby.test_minimum: 2.4`.
128
+ That value describes the lowest Ruby version expected to run the test/development
129
+ toolchain, and it may be higher than the gemspec runtime floor.
130
+
131
+ They are created and updated with the commands:
48
132
 
49
- ```bash
50
- bundle exec reek > REEK
133
+ ```console
134
+ bin/rake appraisal:update
51
135
  ```
52
136
 
137
+ If you need to reset all gemfiles/*.gemfile.lock files:
138
+
139
+ ```console
140
+ bin/rake appraisal:reset
141
+ ```
142
+
143
+ When adding an appraisal to CI, check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
144
+
53
145
  ## Run Tests
54
146
 
55
- To run all tests
147
+ Run tests via `kettle-test` (provided by `kettle-test`). It runs RSpec, writes the full log to
148
+ `tmp/kettle-test/rspec-TIMESTAMP.log`, and prints a compact highlight block with timing, seed,
149
+ pass/fail count, failing example list, and SimpleCov coverage percentages.
56
150
 
57
- ```bash
58
- bundle exec rake test
151
+ ```console
152
+ bundle exec kettle-test
59
153
  ```
60
154
 
155
+ For targeted runs, disable the hard coverage threshold to avoid false failures:
156
+
157
+ ```console
158
+ K_SOUP_COV_MIN_HARD=false bundle exec kettle-test spec/path/to/spec.rb
159
+ ```
160
+
161
+ ### Spec organization (required)
162
+
163
+ - One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/snaky_hash/my_class.rb` -> `spec/snaky_hash/my_class_spec.rb`.
164
+ - Exception: Integration specs that intentionally span multiple classes. Place these under `spec/integration/` (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class.
165
+
61
166
  ## Lint It
62
167
 
63
168
  Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
64
169
 
65
- ```bash
170
+ ```console
66
171
  bundle exec rake
67
172
  ```
68
173
 
69
174
  Or just run the linter.
70
175
 
71
- ```bash
176
+ ```console
72
177
  bundle exec rake rubocop_gradual:autocorrect
73
178
  ```
74
179
 
180
+ For more detailed information about using RuboCop in this project, please see the [RUBOCOP.md](RUBOCOP.md) guide. This project uses `rubocop_gradual` instead of vanilla RuboCop, which requires specific commands for checking violations.
181
+
182
+ ### Important: Do not add inline RuboCop disables
183
+
184
+ Never add `# rubocop:disable ...` / `# rubocop:enable ...` comments to code or specs (except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). Instead:
185
+
186
+ - Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`).
187
+ - When a violation is temporary, and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
188
+ - `bundle exec rake rubocop_gradual:autocorrect` (preferred)
189
+ - `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately)
190
+
191
+ As a general rule, fix style issues rather than ignoring them. For example, our specs should follow RSpec conventions like using `described_class` for the class under test.
192
+
75
193
  ## Contributors
76
194
 
77
195
  Your picture could be here!
@@ -80,60 +198,75 @@ Your picture could be here!
80
198
 
81
199
  Made with [contributors-img][🖐contrib-rocks].
82
200
 
83
- Also see GitLab Contributors: [https://gitlab.com/oauth-xx/snaky_hash/-/graphs/main][🚎contributors-gl]
201
+ Also see GitLab Contributors: [https://gitlab.com/ruby-oauth/snaky_hash/-/graphs/main][🚎contributors-gl]
84
202
 
85
203
  ## For Maintainers
86
204
 
87
205
  ### One-time, Per-maintainer, Setup
88
206
 
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
207
+ **IMPORTANT**: To sign a build,
208
+ a public key for signing gems will need to be picked up by the line in the
91
209
  `gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
92
- All releases to RubyGems.org will be signed.
210
+ All releases are signed releases.
93
211
  See: [RubyGems Security Guide][🔒️rubygems-security-guide]
94
212
 
95
- NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment.
213
+ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
96
214
 
97
215
  ### To release a new version:
98
216
 
99
- 1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
217
+ #### Automated process
218
+
219
+ 1. Update version.rb to contain the correct version-to-be-released.
220
+ 2. Run `bundle exec kettle-changelog`.
221
+ 3. Run `bundle exec kettle-release`.
222
+ 4. Stay awake and monitor the release process for any errors, and answer any prompts.
223
+
224
+ #### Manual process
225
+
226
+ 1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
100
227
  2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
101
228
  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
229
+ 4. Run `bin/rake yard` to regenerate the docs site using the canonical docs task
230
+ 5. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
231
+ 6. Run `git push` to trigger the final CI pipeline before release, and merge PRs
232
+ - NOTE: Remember to [check the build][🧪build].
233
+ 7. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
234
+ 8. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
235
+ 9. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
236
+ 10. Optional for older Bundler (< 2.7.0): Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use the same timestamp and generate the same checksums
237
+ - If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
109
238
  - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
110
239
  - 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`.
240
+ - Note: `zsh/datetime` module is needed, if running `zsh`.
112
241
  - 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])
242
+ 11. Run `bundle exec rake build`
243
+ 12. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
115
244
  to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
116
245
  [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]
120
-
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
246
+ - The script automatically commits but does not push the checksums
247
+ 13. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
248
+ - `sha256sum pkg/<gem name>-<version>.gem`
249
+ 14. Run `bundle exec rake release` which will create a git tag for the version,
250
+ push git commits and tags, and push the `.gem` file to the gem host configured in the gemspec.
251
+
252
+ [📜src-gl]: https://gitlab.com/ruby-oauth/snaky_hash
253
+ [📜src-cb]: https://codeberg.org/ruby-oauth/snaky_hash
254
+ [📜src-gh]: https://github.com/ruby-oauth/snaky_hash
255
+ [🧪build]: https://github.com/ruby-oauth/snaky_hash/actions
256
+ [🤝conduct]: https://github.com/ruby-oauth/snaky_hash/blob/main/CODE_OF_CONDUCT.md
124
257
  [🖐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
258
+ [🖐contributors]: https://github.com/ruby-oauth/snaky_hash/graphs/contributors
259
+ [🚎contributors-gl]: https://gitlab.com/ruby-oauth/snaky_hash/-/graphs/main
260
+ [🖐contributors-img]: https://contrib.rocks/image?repo=ruby-oauth/snaky_hash
261
+ [💎gem-coop]: https://gem.coop
129
262
  [🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
130
263
  [🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
131
264
  [🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
132
- [💎stone_checksums]: https://github.com/pboling/stone_checksums
265
+ [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
133
266
  [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
134
267
  [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
135
268
  [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
136
269
  [📌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
270
+ [🚎appraisal2]: https://github.com/appraisal-rb/appraisal2
139
271
  [🏃‍♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
272
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN