README.md in config-1.2.1 vs README.md in config-1.3.0

- old
+ new

@@ -43,30 +43,11 @@ config/settings/development.yml config/settings/production.yml config/settings/test.yml You can now edit them to adjust to your needs. - -If you want to use Settings before rails application initialization process you can load Config railtie manually: - -```ruby -module Appname - class Application < Rails::Application - - Bundler.require(*Rails.groups) - Config::Integration::Rails::Railtie.preload - - # ... - - config.time_zone = Settings.time_zone - - # ... - - end -end -``` - +a ### Installing on Padrino Add the gem to your `Gemfile` and run `bundle install` to install it. Then edit `app.rb` and register `Config` ```ruby @@ -269,11 +250,12 @@ * `const_name` - name of the object holing you settings. Default: `'Settings'` ### Merge customization -* `knockout_prefix` - ability to remove elements of the array set in earlier loaded settings file. Default: `nil` +* `overwrite_arrays` - overwrite arrays found in previously loaded settings file. Default: `true` +* `knockout_prefix` - ability to remove elements of the array set in earlier loaded settings file. Makes sense only when `overwrite_arrays = false`, otherwise array settings would be overwritten by default. Default: `nil` Check [Deep Merge](https://github.com/danielsdeleo/deep_merge) for more details. ### Environment variables @@ -311,17 +293,17 @@ ### Fine-tuning You can customize how environment variables are processed: -* `env_prefix` - which variables to load into config -* `env_separator` - what string to use as level separator instead of dots - default value of `.` works well with +* `env_prefix` (default: `SETTINGS`) - which ENV variables to load into config +* `env_separator` (default: `.`) - what string to use as level separator - default value of `.` works well with Heroku, but you might want to change it for example for `__` to easy override settings from command line, where using dots in variable names might not be allowed (eg. Bash) -* `env_converter` - how to process variables names: +* `env_converter` (default: `:downcase`) - how to process variables names: * `nil` - no change * `:downcase` - convert to lower case -* `env_parse_values` - parse numeric values as integers instead of strings +* `env_parse_values` (default: `true`) - try to parse values to a correct type (`Integer`, `Float`, `String`) For instance, given the following environment: ```bash SETTINGS__SECTION__SERVER_SIZE=1