README.md in rails_config-0.3.4 vs README.md in rails_config-0.4.1
- old
+ new
@@ -1,5 +1,8 @@
+[![Gem Version](https://badge.fury.io/rb/rails_config.svg)](http://badge.fury.io/rb/rails_config)
+[![Dependency Status](https://gemnasium.com/railsjedi/rails_config.svg)](https://gemnasium.com/railsjedi/rails_config)
+
# RailsConfig
## Summary
RailsConfig helps you easily manage environment specific Rails settings in an easy and usable manner
@@ -11,17 +14,17 @@
* config files support inheritance
* access config information via convenient object member notation
## Compatibility
-* Rails 3.x
+* Rails 3.x and 4.x
* Padrino
* Sinatra
For older versions of Rails and other Ruby apps, use [AppConfig](http://github.com/fredwu/app_config).
-## Installing on Rails 3
+## Installing on Rails 3 or 4
Add this to your `Gemfile`:
```ruby
gem "rails_config"
@@ -228,9 +231,49 @@
```ruby
Settings.section.servers[0].name # => yahoo.com
Settings.section.servers[1].name # => amazon.com
```
+
+## Working with Heroku
+
+Heroku uses ENV object to store sensitive settings which are like the local files described above. You cannot upload such files to Heroku because it's ephemeral filesystem gets recreated from the git sources on each instance refresh.
+
+To use rails_config with Heroku just set the `use_env` var to `true` in your `config/initializers/rails_config.rb` file. Eg:
+
+```ruby
+RailsConfig.setup do |config|
+ config.const_name = 'AppSettings'
+ config.use_env = true
+end
+```
+
+Now rails_config would read values from the ENV object to the settings. For the example above it would look for keys starting with 'AppSettings'. Eg:
+
+```ruby
+ENV['AppSettings.section.size'] = 1
+ENV['AppSettings.section.server'] = 'google.com'
+```
+
+It won't work with arrays, though.
+
+To upload your local values to Heroku you could ran `bundle exec rake rails_config:heroku`.
+
+
+## Contributing
+
+Bootstrap
+
+```bash
+$ appraisal install
+```
+
+Running the test suite
+
+```bash
+$ appraisal rspec
+```
+
## Authors
* [Jacques Crocker](http://github.com/railsjedi)
* [Fred Wu](http://github.com/fredwu)