Envee
Provides casting wrappers around fetch for environment variables.
Installation
Add this line to your application's Gemfile:
gem 'envee'
And then execute:
$ bundle
Or install it yourself as:
$ gem install envee
Usage
ENV['NUM'] = '1'
ENV.int('NUM')
ENV['NAME'] = 'bob'
ENV.str('NAME')
ENV['TIME'] = '1970-01-01 00:00:00 UTC'
ENV.time('TIME')
ENV['ITIME'] = 0
ENV.int_time('ITIME')
ENV['START'] = 'false'
ENV.bool(START)
ENV.int('MISSING', '1')
ENV.time('TIME2'){Time.at(0)}
ENV['MISSING'] = 'CHANGEME'
ENV.validate!(missing_value: 'CHANGEME')
Contributing
- Fork it ( https://github.com/secondrotation/envee/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