rspec-stubbed_env 1.0.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f5215e742c22f09ea48531c86d14314678ccc73d84aa3d854567fe657aaa162
4
- data.tar.gz: 6e060354684b694b98e0f8b5caffdb751044941f9f5f0d03d59903e1c0254623
3
+ metadata.gz: 0d5aa482680fc94dc161b2b7aab8354e170acaa82bad43f4b0a393b3fd027393
4
+ data.tar.gz: 9e0e25127f18502b84c3bef946fe783bd4a307b26c1a2206f096fe4aa0924234
5
5
  SHA512:
6
- metadata.gz: f0ca35e533aa20855454f485f4623b34904c5287a8c04a5075942e82774ab35bc091fd2190970ba33678ddbd01441f015a0fa7f62879ca11dfdb4c60a33533c0
7
- data.tar.gz: f37af4f2c0e48b87b226e90934f3f1421864f3ed3a48eae46669c9da1e0e33e37d36ae839495bfe082cf42750acebd1713407c8ad1605974338f3d203cec9d50
6
+ metadata.gz: 687c74a9ddee6c0da0adad584b49130cb908446952617ce49d83788514f3268cd52e411dc8b4e13510e3c255d5b6bcba284cba642cdc7e3123c5e65c0d3ea470
7
+ data.tar.gz: a62911d9913061f739fce1e6e8615440dcadaa17ceb3a786383dca065a85b0db9434dd6a2397ee4ac3484aa4a1805ed34968c53bde189d96fba80dfa9b6b4105
checksums.yaml.gz.sig ADDED
Binary file
data/CHANGELOG.md ADDED
@@ -0,0 +1,66 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
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).
6
+
7
+ ## [Unreleased]
8
+ ### Added
9
+ ### Changed
10
+ ### Fixed
11
+ ### Removed
12
+
13
+ ## [1.0.2] - 2025-05-06 ([tag][1.0.2t])
14
+ - COVERAGE: 100.00% -- 73/73 lines in 5 files
15
+ - BRANCH COVERAGE: 100.00% -- 10/10 branches in 5 files
16
+ - 85.71% documented
17
+ ### Added
18
+ - `hide_env`
19
+ - `include_context "with hidden env", "FOO"`
20
+ - Allow providing the env key/value pairs to be stubbed to `include_context` (@darhazer)
21
+ - `include_context "with stubbed env", "FOO" => "is bar"`
22
+ - Security policy (SECURITY.md)
23
+ - Random ordering of test suite
24
+ - 20 year signing cert expires 2045-04-29
25
+ - dev container config for development
26
+ - Added appraisals to test on many supported Rubies
27
+ - Ruby 2.3+, including head
28
+ - JRuby 9.1+, including head
29
+ - Truffleruby 22.3+, including head
30
+ - Added CITATION.cff
31
+ - Upgraded Code of Conduct based on Contributor Covenant v2.1
32
+ - New pattern for loading version.rb in gemspec allows (real) 100% code coverage
33
+
34
+ ## [1.0.1] - 2023-04-01 ([tag][1.0.1t])
35
+ ### Added
36
+ - support for values_at (@darhazer)
37
+ - support for symbol keys (@hosamaly)
38
+ - Structured gemfiles
39
+ - Rubocop with standard, gradual, & more
40
+ - Releases are now signed
41
+ - Releases now have checksums
42
+ ### Changed
43
+ - Required ruby version in gemspec >= 1.8.7
44
+ - not bumping major version, because this was already the de-facto minimum
45
+ - TravisCI => GitHub Actions
46
+ - CODE_OF_CONDUCT.md upgraded to v2.0
47
+ - Moved from master to main default branch
48
+ ### Fixed
49
+ - README Badges (CI status)
50
+
51
+ ## [1.0.0] - 2018-10-06 ([tag][1.0.0t])
52
+ ### Added
53
+ - negated matchers
54
+ - rubocop config
55
+
56
+ <!-- Contributors (alphabetically) -->
57
+ [@darhazer]: https://github.com/darhazer
58
+ [@hosamaly]: https://github.com/hosamaly
59
+
60
+ [Unreleased]: https://gitlab.com/pboling/rspec-stubbed_env/-/compare/v1.0.2...main
61
+ [1.0.2]: https://gitlab.com/pboling/rspec-stubbed_env/-/compare/v1.0.1...v1.0.2
62
+ [1.0.2t]: https://gitlab.com/pboling/rspec-stubbed_env/-/tags/v1.0.2
63
+ [1.0.1]: https://gitlab.com/pboling/rspec-stubbed_env/-/compare/v1.0.0...v1.0.1
64
+ [1.0.1t]: https://gitlab.com/pboling/rspec-stubbed_env/-/tags/v1.0.1
65
+ [1.0.0]: https://gitlab.com/pboling/rspec-stubbed_env/-/compare/a3055964517c159bf214712940982034b75264be...v1.0.0
66
+ [1.0.0t]: https://gitlab.com/pboling/rspec-stubbed_env/-/tags/v1.0.0
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,74 +1,135 @@
1
+
1
2
  # Contributor Covenant Code of Conduct
2
3
 
3
4
  ## Our Pledge
4
5
 
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
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, caste, color, religion, or sexual
11
+ identity and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
11
15
 
12
16
  ## Our Standards
13
17
 
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
16
20
 
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
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 overall
27
+ community
22
28
 
23
- Examples of unacceptable behavior by participants include:
29
+ Examples of unacceptable behavior include:
24
30
 
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
31
+ * The use of sexualized language or imagery, and sexual attention or advances of
32
+ any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
28
34
  * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
35
+ * Publishing others' private information, such as a physical or email address,
36
+ without their explicit permission
31
37
  * Other conduct which could reasonably be considered inappropriate in a
32
38
  professional setting
33
39
 
34
- ## Our Responsibilities
40
+ ## Enforcement Responsibilities
35
41
 
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
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.
39
46
 
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
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.
45
51
 
46
52
  ## Scope
47
53
 
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
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 email address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
54
59
 
55
60
  ## Enforcement
56
61
 
57
62
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at peter.boling@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
+ reported to the community leaders responsible for enforcement at
64
+ [![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact].
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
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:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
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.
83
+
84
+ ### 2. Warning
63
85
 
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
86
+ **Community Impact**: A violation through a single incident or series of
87
+ actions.
88
+
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 permanent
94
+ ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
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.
106
+
107
+ ### 4. Permanent Ban
108
+
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.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within the
114
+ community.
67
115
 
68
116
  ## Attribution
69
117
 
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.1, available at
120
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ 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 at
127
+ [https://www.contributor-covenant.org/translations][translations].
72
128
 
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/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
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
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,136 @@
1
+ # Contributing
2
+
3
+ Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/pboling/rspec-stubbed_env][🚎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
+
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
+ Simply follow these instructions:
15
+
16
+ 1. Fork the repository
17
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
18
+ 3. Make some fixes.
19
+ 4. Commit your changes (`git commit -am 'Added some feature'`)
20
+ 5. Push to the branch (`git push origin my-new-feature`)
21
+ 6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
22
+ 7. Create new Pull Request.
23
+
24
+ ## Appraisals
25
+
26
+ From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
27
+ They are created and updated with the commands:
28
+
29
+ NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
30
+
31
+ Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
32
+
33
+ ```shell
34
+ BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
35
+ BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
36
+ ```
37
+
38
+ When adding an appraisal to CI check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
39
+
40
+ ## The Reek List
41
+
42
+ Take a look at the `reek` list which is the file called `REEK` and find something to improve.
43
+
44
+ To refresh the `reek` list:
45
+
46
+ ```bash
47
+ bundle exec reek > REEK
48
+ ```
49
+
50
+ ## Run Tests
51
+
52
+ To run all tests
53
+
54
+ ```bash
55
+ bundle exec rake test
56
+ ```
57
+
58
+ ## Lint It
59
+
60
+ Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
61
+
62
+ ```bash
63
+ bundle exec rake
64
+ ```
65
+
66
+ Or just run the linter.
67
+
68
+ ```bash
69
+ bundle exec rake rubocop_gradual:autocorrect
70
+ ```
71
+
72
+ ## Contributors
73
+
74
+ Your picture could be here!
75
+
76
+ [![Contributors][🖐contributors-img]][🖐contributors]
77
+
78
+ Made with [contributors-img][🖐contrib-rocks].
79
+
80
+ Also see GitLab Contributors: [https://gitlab.com/pboling/rspec-stubbed_env/-/graphs/main][🚎contributors-gl]
81
+
82
+ ## For Maintainers
83
+
84
+ ### One-time, Per-maintainer, Setup
85
+
86
+ **IMPORTANT**: If you want to sign the build you create,
87
+ your public key for signing gems will need to be picked up by the line in the
88
+ `gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
89
+ All releases to RubyGems.org will be signed.
90
+ See: [RubyGems Security Guide][🔒️rubygems-security-guide]
91
+
92
+ NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment.
93
+
94
+ ### To release a new version:
95
+
96
+ 1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
97
+ 2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
98
+ 3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
99
+ 4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
100
+ 5. Run `git push` to trigger the final CI pipeline before release, & merge PRs
101
+ - NOTE: Remember to [check the build][🧪build]!
102
+ 6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
103
+ 7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
104
+ 8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure you will release the latest trunk code
105
+ 9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
106
+ - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
107
+ - If the echo above has no output, then it didn't work.
108
+ - Note that you'll need the `zsh/datetime` module, if running `zsh`.
109
+ - In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
110
+ 10. Run `bundle exec rake build`
111
+ 11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
112
+ to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
113
+ [gem][💎stone_checksums].
114
+ - Checksums will be committed automatically by the script, but not pushed
115
+ 12. Run `bundle exec rake release` which will create a git tag for the version,
116
+ push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
117
+
118
+ [🚎src-main]: https://gitlab.com/pboling/rspec-stubbed_env
119
+ [🧪build]: https://github.com/pboling/rspec-stubbed_env/actions
120
+ [🤝conduct]: https://gitlab.com/pboling/rspec-stubbed_env/-/blob/main/CODE_OF_CONDUCT.md
121
+ [🖐contrib-rocks]: https://contrib.rocks
122
+ [🖐contributors]: https://github.com/pboling/rspec-stubbed_env/graphs/contributors
123
+ [🚎contributors-gl]: https://gitlab.com/pboling/rspec-stubbed_env/-/graphs/main
124
+ [🖐contributors-img]: https://contrib.rocks/image?repo=pboling/rspec-stubbed_env
125
+ [💎rubygems]: https://rubygems.org
126
+ [🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
127
+ [🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
128
+ [🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
129
+ [💎stone_checksums]: https://github.com/pboling/stone_checksums
130
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
131
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
132
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
133
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
134
+ [🚎appraisal-eval-gemfile-pr]: https://github.com/thoughtbot/appraisal/pull/248
135
+ [🚎appraisal-fork]: https://github.com/pboling/appraisal/tree/galtzo
136
+ [🏃‍♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
@@ -1,4 +1,5 @@
1
- Copyright 2018 Peter Boling of railsbling.com
1
+ Copyright © 2014 LittlOwlLabs
2
+ Copyright © 2018-2020, 2023 - 2025 Peter Boling of railsbling.com
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
5