Sha256: 02e284352203bd3a5bd30df37cc862be9db98c7ca2d3cdab16650610a9f7f64d
Contents?: true
Size: 1.23 KB
Versions: 2
Compression:
Stored size: 1.23 KB
Contents
# RockConfig RockConfig is a simple convention based library for reading and accessing config files. ## Installation Add this line to your application's Gemfile: gem "rock_config" And then execute: $ bundle Or install it yourself as: $ gem install rock_config ## Usage Given the file elastic_search.yml: development: host: 127.0.0.1 port: 9200 production: host: 192.168.1.10 port: 9200 RockConfig allows you to read these settings with an API like this: elastic_config = RockConfig.for :elastic_search elastic_config.host # > 127.0.0.1 RockConfig automatically chooses the current application environment. You select the environment yourself with: RockConfig.for :elastic_search, :production RockConfig scans predefined directories for config files. By default, it tries to scan directory `config` in the project root. You can add more directories: RockConfig.configure do |config| config.scanned_directories << "custom_path" end ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rock_config-0.0.1 | README.md |
rock_config-0.0.0 | README.md |