Envyable
The simplest yaml to ENV config loader.
Installation
Add this line to your application's Gemfile:
gem 'envyable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install envyable
Usage
Rails
Once installed in a Rails app, add a config/env.yml
file with your config
separated into environments, like so:
development:
API_CLIENT_ID: development-id
test:
API_CLIENT_ID: test-id
The gem will load the correct environment on initialization of the application.
Do not check in the config/env.yml
file as it may contain application secrets
that you do not want shared.
Other applications
You can simply call Envyable.load(path, environment)
and the yaml file will be loaded into ENV.
Contributing
- Fork it
- 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 new Pull Request