https://github.com/mhs/with_env-rb
Ruby library WithEnv is an extremely small helper module for executing code with ENV variables.
https://github.com/mhs/with_env-rb
Last synced: about 5 hours ago
JSON representation
Repository metadata
Ruby library WithEnv is an extremely small helper module for executing code with ENV variables.
- Host: GitHub
- URL: https://github.com/mhs/with_env-rb
- Owner: mhs
- License: mit
- Created: 2015-07-15T14:30:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-03T15:22:11.000Z (almost 5 years ago)
- Last Synced: 2025-12-05T12:48:58.390Z (7 days ago)
- Language: Ruby
- Size: 8.79 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
README.md
WithEnv
WithEnv is an extremely small helper module for executing code with ENV variables. It exists because
I got tired of re-writing or copying over a #with_env helper method for the 131st time.
Installation
Add this line to your application's Gemfile:
gem 'with_env'
And then execute:
$ bundle
Or install it yourself as:
$ gem install with_env
Usage
include WithEnv
with_env("FOO" => "BAR") do
`echo $FOO` # => "BAR\n"
ENV["FOO"] # => "BAR"
end
# The ENV has been restored to what it was before the
# above with_env block, so FOO no longer exists
`echo $FOO` # => "\n"
ENV.has_key?("FOO") # => false
Development
After checking out the repo, run bin/setup to install dependencies. Then, run rake rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/mhs/with_env-rb.
License
The gem is available as open source under the terms of the MIT License.
Owner metadata
- Name: Mutually Human
- Login: mhs
- Email: hello@mutuallyhuman.com
- Kind: organization
- Description:
- Website: http://mutuallyhuman.com/
- Location: Grand Rapids, MI
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/38444?v=4
- Repositories: 93
- Last ynced at: 2023-04-13T15:11:06.356Z
- Profile URL: https://github.com/mhs
GitHub Events
Total
Last Year
Committers metadata
Last synced: 6 days ago
Total Commits: 10
Total Committers: 2
Avg Commits per committer: 5.0
Development Distribution Score (DDS): 0.1
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Zach Dennis | z****s@g****m | 9 |
| Nate Eizenga | e****n@g****m | 1 |
Issue and Pull Request metadata
Last synced: about 2 months ago
Total issues: 0
Total pull requests: 1
Average time to close issues: N/A
Average time to close pull requests: 3 minutes
Total issue authors: 0
Total pull request authors: 1
Average comments per issue: 0
Average comments per pull request: 0.0
Merged pull request: 1
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
Top Pull Request Authors
- eizengan (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 2
-
Total downloads:
- rubygems: 120,841,164 total
- Total docker downloads: 875,701,366
- Total dependent packages: 3 (may contain duplicates)
- Total dependent repositories: 959 (may contain duplicates)
- Total versions: 4
- Total maintainers: 1
gem.coop: with_env
WithEnv is an extremely small helper module for executing code with ENV variables. It exists because I got tired of re-writing or copying over a #with_env helper method for the 131st time.
- Homepage: https://github.com/mhs/with_env-rb
- Documentation: http://www.rubydoc.info/gems/with_env/
- Licenses: MIT
- Latest release: 1.1.0 (published over 10 years ago)
- Last Synced: 2025-12-10T20:01:30.972Z (1 day ago)
- Versions: 2
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 60,420,582 Total
- Docker Downloads: 437,850,683
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Docker downloads count: 0.329%
- Downloads: 0.45%
- Average: 9.905%
- Stargazers count: 28.429%
- Forks count: 30.223%
- Maintainers (1)
rubygems.org: with_env
WithEnv is an extremely small helper module for executing code with ENV variables. It exists because I got tired of re-writing or copying over a #with_env helper method for the 131st time.
- Homepage: https://github.com/mhs/with_env-rb
- Documentation: http://www.rubydoc.info/gems/with_env/
- Licenses: MIT
- Latest release: 1.1.0 (published over 10 years ago)
- Last Synced: 2025-12-10T20:01:29.424Z (1 day ago)
- Versions: 2
- Dependent Packages: 3
- Dependent Repositories: 959
- Downloads: 60,420,582 Total
- Docker Downloads: 437,850,683
-
Rankings:
- Docker downloads count: 0.33%
- Downloads: 0.481%
- Dependent repos count: 1.054%
- Dependent packages count: 4.021%
- Average: 11.143%
- Stargazers count: 29.405%
- Forks count: 31.568%
- Maintainers (1)
Dependencies
- bundler ~> 1.10 development
- rake ~> 13.0 development
- rspec ~> 3 development
Score: 22.511563176915356