README.markdown in conflate-0.0.1 vs README.markdown in conflate-0.0.2
- old
+ new
@@ -4,25 +4,47 @@
Conflate
========
Load YAML files in your config directory into the Rails.application.config.
-Example
--------
+If you're using Rails, you probably want to use [conflate-rails], which automatically loads YAML files from config/ into Rails.application.config.
-Let's suppose you have a file 'config/foo.yml', with the following contents:
+Usage
+-----
+Let's suppose you have a file 'config/statsd.yml', with the following contents:
+
```yml
-thing1: "qwerty"
-thing2: "asdf
+# statsd.yml
+host: "localhost"
+port: 8125
```
-With Conflate, this information gets loaded into the `Rails.application.config` object like so:
+With Conflate, load this information (and any other YAML file in your config directory) like so.
```ruby
-Rails.application.config.foo.thing1
-# => "qwerty"
-Rails.application.config.foo.thing2
-# => "asdf"
+settings = OpenStruct.new
+Conflate::Conflator.new("config", settings).perform
+settings.stats
+# => {"host" => "localhost", "port" => 8125}
```
-Use this information in your application or other initializers.
+The [conflate-rails] gem does the following for you in a Rails app.
+
+```ruby
+Conflate::Conflator.new(Rails.root.join("config"), Rails.application.config).perform
+Rails.application.config.statsd
+# => {"host" => "localhost", "port" => 8125}
+```
+
+Around the Web
+--------------
+
+* [conflate on GitHub][conflate]
+* [conflate on RubyGems][conflate-gem]
+* [conflate-rails on GitHub][conflate-rails]
+* [conflate-rails on RubyGems][conflate-rails-gem]
+
+[conflate-rails]:https://github.com/sportngin/conflate-rails
+[conflate-rails-gem]:https://rubygems.org/gems/conflate-rails
+[conflate]:https://github.com/sportngin/conflate
+[conflate-gem]:https://rubygems.org/gems/conflate