environment-temp
Ruby module for temporarily changing ENV. Call ENV.temp and add a do block.
require 'environment-temp'
puts ENV['HOME'] # => /home/you (or whatever your home directory is)
ENV.temp do
ENV['HOME'] = 'whatever'
puts ENV['HOME'] # => whatever
end
puts ENV['HOME'] # => /home/you
Installation
The usual:
sudo gem install environment-temp
Or however you like to install gems. It's just a single file.
Author
Mike O'Sullivan [email protected]
History
version | date | notes |
---|---|---|
1.0 | June 27, 2023 | Initial upload. |