kefir kefir
](https://badge.fury.io/rb/kefir)
Simple configuration for your Gem or application. A ruby port of conf.
Installation
Add this line to your application's Gemfile:
gem 'kefir'
And then execute:
$ bundle
Or install it yourself as:
$ gem install kefir
Usage
require 'kefir'
config = Kefier.config('my_gem')
api_key = config.get(:api_key)
config.set(:api_key, api_key + '!')
# write your changes
config.persist
get and set can accept multiple keys for nested paths:
config.set(:my, :nested, :value, 'hello!')
value = config.get(:my, :nested, :value)
expect(value).to eq('hello!')
Contributing
- Fork it ( https://github.com/nicktomlin/kefir/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Run the tests
rake - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request