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

  1. Fork it ( https://github.com/[my-github-username]/argv_to_env/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request