Suzanne

A striped-down version of Figaro, allowing env variables to be managed through YAML files.

Currently meant to be used within a Rails project. Currently, like Figaro, we assume that the config file is in 'config/application.yml'.

Installation

Add this line to your application's Gemfile:

gem 'suzanne'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install suzanne

Usage

Define a YAML file:

development:
  super_secret_key: abcdef

test:
  super_secret_key: fedcba

Initialize Suzanne:

require 'suzanne'

Rails.env
=> 'development'
Suzanne.env.super_secret_key
=> 'abcdef'
Suzanne.env.no_such_key
=> nil

Development

Run bundle exec rake test to run the tests.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Naming

In case you are wondering about the gem name => [The_Marriage_of_Figaro] https://en.wikipedia.org/wiki/The_Marriage_of_Figaro_(play).

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Facilecomm/suzanne. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Suzanne project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.