Sha256: 05a06ff48ed9f497dce2d9525cc6bff78748b232195f5aa49eb00d7cc037be3c
Contents?: true
Size: 1.46 KB
Versions: 2
Compression:
Stored size: 1.46 KB
Contents
# Figly A simple config gem to use in either rails or any other ruby gem. ## Installation Add this line to your application's Gemfile: gem 'figly' And then execute: $ bundle Or install it yourself as: $ gem install figly ## Usage The only setup that's required is to set the path of you're configuration file that must be in YAML. Just throw the following code into an initializer.: Figly.load_file "path/to/config.yml" **NOTE: You can load multiple config files of different types and they will be deep merged together in your settings** If you're config looks like this: some_key: 234 nest1: nest2: nest3: Yay You can do the following: Figly::Settings.some_key #=> 234 Figly::Settings.nest1 #=> {"nest2" => {"nest3" => "Yay"}} Figly::Settings.nest1.nest2.nest3 #=> "Yay" Figly currently supports the following file extensions, and will infer the parser based on the extension: - .yml => YAML - .toml => TOML - .json => JSON ## Testing If you want to contribute start by making sure the tests work: bundle install To access a REPL environment that loads the libraries: ./bin/console To run tests: rspec spec ## Contributing 1. Fork it ( https://github.com/onetwopunch/figly/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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
figly-1.0.4 | README.md |
figly-1.0.3 | README.md |