ArgvToEnv
Parse command line arguments of the form NAME=VALUE to the ENV hash like rake.
Installation
Add this line to your application's Gemfile:
gem 'argv_to_env'
And then execute:
$ bundle
Or install it yourself as:
$ gem install argv_to_env
Usage
require 'argv_to_env'
ARGV.to_env
# Infact you can parse any array to a given hash:
h = {}
['test=123'].to_env(h)
h # => {'test' => '123'}
Contributing
- Fork it ( https://github.com/[my-github-username]/argv_to_env/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request