rspec-stubbed_env 1.0.4 → 1.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: 152880a118a34c47d52e9bbe29a92b0667a29b23172e12d16f69a2c3e0d6dbb9
4
- data.tar.gz: d18620969e9f328d7b771f4d8e6481c4b113ee88d2244f1e93f2dda42d79dee1
3
+ metadata.gz: b005a6ffc8ed04e4603d70403653c681544cfcba896b5a456c7da1da792406d5
4
+ data.tar.gz: 81bf54e4b3f07d338e1dc90d35dbe412afda104c4e855bc50436283f247027e9
5
5
  SHA512:
6
- metadata.gz: c5886fc86d963a5037ebcf8d54c0f01e9a570763c52b767eae02746e81ac00e0cd78c5cddf052462c75f7ac76164699477384ea460c0a2926da816611a3dcb79
7
- data.tar.gz: 3ad54968abbd42a4d626dfeca1eb497d5e46a5f268fbe93454e141b4c021b05281748ffde628af438d85545981e688bceaef6c5f4b7658bbea783f301cb33cff
6
+ metadata.gz: a7bbe3a66f58b13aa127a8f1b98528a34b2cb82a8697930efe26503eed2baab240654c35bc9d002b3c66c413bc6a195fb4bb6b4f5de96c92c8a68990e98e9a0e
7
+ data.tar.gz: 6d3635f1e774f6bc2b48dd4a0121bcd49d2aac71d0dce97f2ee6f69a965e1ae5b5f631c18f6a77f4c0c2d9db3f8a95c79449b3009ec2459dcdbf82d80a242d6a
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,47 +1,102 @@
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 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
+
13
31
  ### Security
14
32
 
33
+ ## [1.0.5] - 2026-06-27
34
+
35
+ - TAG: [v1.0.5][1.0.5t]
36
+ - COVERAGE: 100.00% -- 95/95 lines in 5 files
37
+ - BRANCH COVERAGE: 84.21% -- 16/19 branches in 5 files
38
+ - 80.00% documented
39
+
40
+ ### Added
41
+
42
+ - `stub_env_hash_accessors` opt-in helper for stubbing `ENV.to_hash` and
43
+ `ENV.to_h` with a mixed real, stubbed, and hidden environment hash.
44
+ - More documentation
45
+ - Release notifications to Galtzo FLOSS Discord
46
+ - Join: https://discord.gg/3qme4XHNKN
47
+ - REEK list of things to work on (for devs)
48
+ - More binstubs (for devs)
49
+ - `Version` module, with backwards compatibility for deprecated `VERSION` constant
50
+
51
+ ### Fixed
52
+
53
+ - Bad links in documentation
54
+ - Compat with Ruby 1.8.7, and 1.9.0
55
+ - Rake tasks (for dev)
56
+
15
57
  ## [1.0.4] - 2025-08-04
58
+
16
59
  - TAG: [v1.0.4][1.0.4t]
17
60
  - COVERAGE: 100.00% -- 73/73 lines in 5 files
18
61
  - BRANCH COVERAGE: 100.00% -- 10/10 branches in 5 files
19
62
  - 85.71% documented
63
+
20
64
  ### Added
65
+
21
66
  - Discord notifications for CI, issues, pulls, etc
67
+
22
68
  ### Changed
69
+
23
70
  - Ownership transfer from pboling to galtzo-floss
24
71
  - gemspec metadata (homepage, funding, etc)
25
72
 
26
73
  ## [1.0.3] - 2025-07-28
74
+
27
75
  - TAG: [v1.0.3][1.0.3t]
28
76
  - COVERAGE: 100.00% -- 73/73 lines in 5 files
29
77
  - BRANCH COVERAGE: 100.00% -- 10/10 branches in 5 files
30
78
  - 85.71% documented
79
+
31
80
  ### Added
81
+
32
82
  - More documentation
33
83
  - Tracking maintainability and coverage with QLTY.sh
34
84
  - Documentation site
35
85
  - https://rspec-stubbed-env.galtzo.com
86
+
36
87
  ### Changed
88
+
37
89
  - gemspec metadata
38
90
 
39
91
  ## [1.0.2] - 2025-05-06
92
+
40
93
  - TAG: [v1.0.2][1.0.2t]
41
94
  - COVERAGE: 100.00% -- 73/73 lines in 5 files
42
95
  - BRANCH COVERAGE: 100.00% -- 10/10 branches in 5 files
43
96
  - 85.71% documented
97
+
44
98
  ### Added
99
+
45
100
  - `hide_env`
46
101
  - `include_context "with hidden env", "FOO"`
47
102
  - Allow providing the env key/value pairs to be stubbed to `include_context` (@darhazer)
@@ -59,26 +114,36 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
59
114
  - New pattern for loading version.rb in gemspec allows (real) 100% code coverage
60
115
 
61
116
  ## [1.0.1] - 2023-04-01
117
+
62
118
  - TAG: [v1.0.1][1.0.1t]
119
+
63
120
  ### Added
121
+
64
122
  - support for values_at (@darhazer)
65
123
  - support for symbol keys (@hosamaly)
66
124
  - Structured gemfiles
67
125
  - Rubocop with standard, gradual, & more
68
126
  - Releases are now signed
69
127
  - Releases now have checksums
128
+
70
129
  ### Changed
130
+
71
131
  - Required ruby version in gemspec >= 1.8.7
72
132
  - not bumping major version, because this was already the de-facto minimum
73
133
  - TravisCI => GitHub Actions
74
134
  - CODE_OF_CONDUCT.md upgraded to v2.0
75
135
  - Moved from master to main default branch
136
+
76
137
  ### Fixed
138
+
77
139
  - README Badges (CI status)
78
140
 
79
141
  ## [1.0.0] - 2018-10-06
142
+
80
143
  - TAG: [v1.0.0][1.0.0t]
144
+
81
145
  ### Added
146
+
82
147
  - negated matchers
83
148
  - rubocop config
84
149
 
@@ -86,14 +151,16 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
86
151
  [@darhazer]: https://github.com/darhazer
87
152
  [@hosamaly]: https://github.com/hosamaly
88
153
 
89
- [Unreleased]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.4...main
154
+ [Unreleased]: https://github.com/galtzo-floss/rspec-stubbed_env/compare/v1.0.5...HEAD
155
+ [1.0.5]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.4...v1.0.5
156
+ [1.0.5t]: https://github.com/galtzo-floss/rspec-stubbed_env/releases/tag/v1.0.5
90
157
  [1.0.4]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.3...v1.0.4
91
- [1.0.4t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.4
158
+ [1.0.4t]: https://github.com/galtzo-floss/rspec-stubbed_env/releases/tag/v1.0.4
92
159
  [1.0.3]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.2...v1.0.3
93
- [1.0.3t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.3
160
+ [1.0.3t]: https://github.com/galtzo-floss/rspec-stubbed_env/releases/tag/v1.0.3
94
161
  [1.0.2]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.1...v1.0.2
95
- [1.0.2t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.2
162
+ [1.0.2t]: https://github.com/galtzo-floss/rspec-stubbed_env/releases/tag/v1.0.2
96
163
  [1.0.1]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.0...v1.0.1
97
- [1.0.1t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.1
98
- [1.0.0]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/a3055964517c159bf214712940982034b75264be...v1.0.0
99
- [1.0.0t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.0
164
+ [1.0.1t]: https://github.com/galtzo-floss/rspec-stubbed_env/releases/tag/v1.0.1
165
+ [1.0.0]: https://github.com/galtzo-floss/rspec-stubbed_env/compare/a3055964517c159bf214712940982034b75264be...v1.0.0
166
+ [1.0.0t]: https://github.com/galtzo-floss/rspec-stubbed_env/releases/tag/v1.0.0
data/CITATION.cff ADDED
@@ -0,0 +1,20 @@
1
+ cff-version: 1.2.0
2
+ title: "rspec-stubbed_env"
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/galtzo-floss/rspec-stubbed_env'
16
+ description: "rspec-stubbed_env"
17
+ repository-code: 'https://github.com/galtzo-floss/rspec-stubbed_env'
18
+ abstract: >-
19
+ rspec-stubbed_env
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
@@ -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
- [![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact].
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
@@ -131,5 +130,5 @@ For answers to common questions about this code of conduct, see the FAQ at
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
134
- [🚂bdfl-contact]: http://www.railsbling.com/contact
135
- [🚂bdfl-contact-img]: https://img.shields.io/badge/Contact-BDFL-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
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,58 +1,171 @@
1
1
  # Contributing
2
2
 
3
- Bug reports and pull requests are welcome on GitHub, CodeBerg, or [GitLab][🚎src-main].
3
+ Bug reports and pull requests are welcome on [CodeBerg][📜src-cb], [GitLab][📜src-gl], or [GitHub][📜src-gh].
4
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
7
  To submit a patch, please fork the project, create a patch with tests, and send a pull request.
8
8
 
9
- Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog].
9
+ Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
10
+
11
+ ## Developer Certificate of Origin
12
+
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.
10
16
 
11
17
  ## Help out!
12
18
 
13
- Take a look at the `reek` list which is the file called `REEK` and find something to improve.
19
+ Take a look at the open issues and pull requests, or use the gem and find something to improve.
14
20
 
15
21
  Follow these instructions:
16
22
 
17
- 1. Fork the repository
18
- 2. Create a feature branch (`git checkout -b my-new-feature`)
19
- 3. Make some fixes.
20
- 4. Commit changes (`git commit -am 'Added some feature'`)
21
- 5. Push to the branch (`git push origin my-new-feature`)
22
- 6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
23
- 7. Create new Pull Request.
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
34
+
35
+ Executables shipped by dependencies, such as kettle-dev, and stone_checksums, are available
36
+ after running `bin/setup`. These include:
37
+
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:
48
+
49
+ ```shell
50
+ bin/rake -T
51
+ ```
24
52
 
25
- ## Appraisals
53
+ ## Code quality checks
26
54
 
27
- From time to time the Appraisal2 gemfiles in `gemfiles/` will need to be updated.
28
- They are created and updated with the commands:
55
+ Run the Reek task when you want a smell check that fails on current findings:
56
+
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:
64
+
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.
29
110
 
30
111
  ```console
31
- BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
32
- BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
33
- bundle exec rake rubocop_gradual:autocorrect
112
+ K_JEM_TEMPLATING=true kettle-jem install
34
113
  ```
35
114
 
36
- When adding an appraisal to CI check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
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 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:
37
132
 
38
- ## The Reek List
133
+ ```console
134
+ bin/rake appraisal:generate
135
+ ```
39
136
 
40
- Take a look at the `reek` list which is the file called `REEK` and find something to improve.
137
+ Use `bin/rake appraisal:update` when you intentionally need to resolve fresh
138
+ appraisal locks.
41
139
 
42
- To refresh the `reek` list:
140
+ If you need to reset all gemfiles/*.gemfile.lock files:
43
141
 
44
142
  ```console
45
- bundle exec reek > REEK
143
+ bin/rake appraisal:reset
46
144
  ```
47
145
 
146
+ When adding an appraisal to CI, check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
147
+
48
148
  ## Run Tests
49
149
 
50
- To run all tests
150
+ Run tests via `kettle-test` (provided by `kettle-test`). It runs RSpec, writes the full log to
151
+ `tmp/kettle-test/rspec-TIMESTAMP.log`, and prints a compact highlight block with timing, seed,
152
+ pass/fail count, failing example list, and SimpleCov coverage percentages.
51
153
 
52
154
  ```console
53
- bundle exec rake test
155
+ bundle exec kettle-test
54
156
  ```
55
157
 
158
+ For targeted runs, disable the hard coverage threshold to avoid false failures:
159
+
160
+ ```console
161
+ K_SOUP_COV_MIN_HARD=false bundle exec kettle-test spec/path/to/spec.rb
162
+ ```
163
+
164
+ ### Spec organization (required)
165
+
166
+ - 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/rspec/stubbed_env/my_class.rb` -> `spec/rspec/stubbed_env/my_class_spec.rb`.
167
+ - 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.
168
+
56
169
  ## Lint It
57
170
 
58
171
  Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
@@ -67,6 +180,19 @@ Or just run the linter.
67
180
  bundle exec rake rubocop_gradual:autocorrect
68
181
  ```
69
182
 
183
+ 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.
184
+
185
+ ### Important: Do not add inline RuboCop disables
186
+
187
+ 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:
188
+
189
+ - Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`).
190
+ - When a violation is temporary, and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
191
+ - `bundle exec rake rubocop_gradual:autocorrect` (preferred)
192
+ - `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately)
193
+
194
+ 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.
195
+
70
196
  ## Contributors
71
197
 
72
198
  Your picture could be here!
@@ -81,46 +207,61 @@ Also see GitLab Contributors: [https://gitlab.com/galtzo-floss/rspec-stubbed_env
81
207
 
82
208
  ### One-time, Per-maintainer, Setup
83
209
 
84
- **IMPORTANT**: If you want to sign the build you create,
85
- your public key for signing gems will need to be picked up by the line in the
210
+ **IMPORTANT**: To sign a build,
211
+ a public key for signing gems will need to be picked up by the line in the
86
212
  `gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
87
- All releases to RubyGems.org will be signed.
213
+ All releases are signed releases.
88
214
  See: [RubyGems Security Guide][🔒️rubygems-security-guide]
89
215
 
90
- NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment.
216
+ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
91
217
 
92
218
  ### To release a new version:
93
219
 
220
+ #### Automated process
221
+
222
+ 1. Update version.rb to contain the correct version-to-be-released.
223
+ 2. Run `bundle exec kettle-changelog`.
224
+ 3. Run `bundle exec kettle-release`.
225
+ 4. Stay awake and monitor the release process for any errors, and answer any prompts.
226
+
227
+ #### Manual process
228
+
94
229
  1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
95
230
  2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
96
231
  3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
97
- 4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
98
- 5. Run `git push` to trigger the final CI pipeline before release, and merge PRs
232
+ 4. Run `bin/rake yard` to regenerate the docs site using the canonical docs task
233
+ 5. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
234
+ 6. Run `git push` to trigger the final CI pipeline before release, and merge PRs
99
235
  - NOTE: Remember to [check the build][🧪build].
100
- 6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
101
- 7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
102
- 8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
103
- 9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
236
+ 7. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
237
+ 8. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
238
+ 9. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
239
+ 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
240
+ - If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
104
241
  - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
105
242
  - If the echo above has no output, then it didn't work.
106
243
  - Note: `zsh/datetime` module is needed, if running `zsh`.
107
244
  - In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
108
- 10. Run `bundle exec rake build`
109
- 11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
245
+ 11. Run `bundle exec rake build`
246
+ 12. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
110
247
  to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
111
248
  [gem][💎stone_checksums].
112
249
  - The script automatically commits but does not push the checksums
113
- 12. Run `bundle exec rake release` which will create a git tag for the version,
114
- push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
115
-
116
- [🚎src-main]: https://gitlab.com/galtzo-floss/rspec-stubbed_env
250
+ 13. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
251
+ - `sha256sum pkg/<gem name>-<version>.gem`
252
+ 14. Run `bundle exec rake release` which will create a git tag for the version,
253
+ push git commits and tags, and push the `.gem` file to the gem host configured in the gemspec.
254
+
255
+ [📜src-gl]: https://gitlab.com/galtzo-floss/rspec-stubbed_env
256
+ [📜src-cb]: https://codeberg.org/galtzo-floss/rspec-stubbed_env
257
+ [📜src-gh]: https://github.com/galtzo-floss/rspec-stubbed_env
117
258
  [🧪build]: https://github.com/galtzo-floss/rspec-stubbed_env/actions
118
- [🤝conduct]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/blob/main/CODE_OF_CONDUCT.md
259
+ [🤝conduct]: https://github.com/galtzo-floss/rspec-stubbed_env/blob/main/CODE_OF_CONDUCT.md
119
260
  [🖐contrib-rocks]: https://contrib.rocks
120
261
  [🖐contributors]: https://github.com/galtzo-floss/rspec-stubbed_env/graphs/contributors
121
262
  [🚎contributors-gl]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main
122
263
  [🖐contributors-img]: https://contrib.rocks/image?repo=galtzo-floss/rspec-stubbed_env
123
- [💎rubygems]: https://rubygems.org
264
+ [💎gem-coop]: https://gem.coop
124
265
  [🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
125
266
  [🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
126
267
  [🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
@@ -129,4 +270,6 @@ NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some v
129
270
  [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
130
271
  [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
131
272
  [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
273
+ [🚎appraisal2]: https://github.com/appraisal-rb/appraisal2
132
274
  [🏃‍♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
275
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
data/FUNDING.md ADDED
@@ -0,0 +1,70 @@
1
+ <!-- RELEASE-NOTES-FOOTER-START -->
2
+
3
+ Official Discord 👉️ [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
4
+
5
+ Many paths lead to being a sponsor or a backer of this project. Are you on such a path?
6
+
7
+ [![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal]
8
+
9
+ [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi]
10
+
11
+ [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
12
+ [⛳liberapay]: https://liberapay.com/pboling/donate
13
+ [🖇osc-backers]: https://opencollective.com/galtzo-floss#backer
14
+ [🖇osc-backers-i]: https://opencollective.com/galtzo-floss/backers/badge.svg?style=flat
15
+ [🖇osc-sponsors]: https://opencollective.com/galtzo-floss#sponsor
16
+ [🖇osc-sponsors-i]: https://opencollective.com/galtzo-floss/sponsors/badge.svg?style=flat
17
+ [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
18
+ [🖇sponsor]: https://github.com/sponsors/pboling
19
+ [🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
20
+ [🖇kofi]: https://ko-fi.com/pboling
21
+ [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
22
+ [🖇buyme]: https://www.buymeacoffee.com/pboling
23
+ [🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
24
+ [🖇paypal]: https://www.paypal.com/paypalme/peterboling
25
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
26
+ [✉️discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=flat
27
+
28
+ <!-- RELEASE-NOTES-FOOTER-END -->
29
+
30
+ # 🤑 A request for help
31
+
32
+ Maintainers have teeth and need to pay their dentists.
33
+ After getting laid off in an RIF in March, and encountering difficulty finding a new one,
34
+ I began spending most of my time building open source tools.
35
+ I'm hoping to be able to pay for my kids' health insurance this month,
36
+ so if you value the work I am doing, I need your support.
37
+ Please consider sponsoring me or the project.
38
+
39
+ To join the community or get help 👇️ Join the Discord.
40
+
41
+ [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
42
+
43
+ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
44
+
45
+ [![Sponsor galtzo-floss/rspec-stubbed_env on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal]
46
+
47
+ # Another Way to Support Open Source Software
48
+
49
+ I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).
50
+
51
+ If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
52
+
53
+ I’m developing a new library, [floss_funding][🖇floss-funding-gem], designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
54
+
55
+ **[Floss-Funding.dev][🖇floss-funding.dev]: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags**
56
+
57
+ [⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
58
+ [🖇osc-all-img]: https://img.shields.io/opencollective/all/galtzo-floss
59
+ [🖇osc-sponsors-img]: https://img.shields.io/opencollective/sponsors/galtzo-floss
60
+ [🖇osc-backers-img]: https://img.shields.io/opencollective/backers/galtzo-floss
61
+ [🖇osc-all-bottom-img]: https://img.shields.io/opencollective/all/galtzo-floss?style=for-the-badge
62
+ [🖇osc-sponsors-bottom-img]: https://img.shields.io/opencollective/sponsors/galtzo-floss?style=for-the-badge
63
+ [🖇osc-backers-bottom-img]: https://img.shields.io/opencollective/backers/galtzo-floss?style=for-the-badge
64
+ [🖇osc]: https://opencollective.com/galtzo-floss
65
+ [🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
66
+ [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
67
+ [🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
68
+ [🖇floss-funding.dev]: https://floss-funding.dev
69
+ [🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
70
+ [✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge
data/LICENSE.md ADDED
@@ -0,0 +1,11 @@
1
+ # License
2
+
3
+ This project is made available under the following license.
4
+ Choose the option that best fits your use case:
5
+
6
+ - [MIT](MIT.md)
7
+
8
+ ## Copyright Notice
9
+
10
+ - Copyright (c) 2018-2019, 2023, 2025-2026 Peter H. Boling
11
+ - Copyright (c) 2024 Maxim Krizhanovski