docs/mongo/README.md in flipper-mongo-0.20.4 vs docs/mongo/README.md in flipper-mongo-0.21.0.rc1
- old
+ new
@@ -16,15 +16,24 @@
$ gem install flipper-mongo
## Usage
+In most cases, all you need to do is require the adapter. You must set the `MONGO_URL` or `FLIPPER_MONGO_URL` environment vairable to specify which Mongo database to connect to.
+
```ruby
-require 'flipper/adapters/mongo'
-collection = Mongo::Client.new(["127.0.0.1:27017"], database: 'testing')['flipper']
-adapter = Flipper::Adapters::Mongo.new(collection)
-flipper = Flipper.new(adapter)
-# profit...
+require 'flipper-mongo`
+```
+
+**If you need to customize the adapter**, you can add this to an initializer:
+
+```ruby
+Flipper.configure do |config|
+ config.default do
+ collection = Mongo::Client.new(ENV["MONGO_URL"])["flipper"]
+ Flipper.new(Flipper::Adapters::Mongo.new(collection))
+ end
+end
```
## Internals
Each feature is stored in a document, which means getting a feature is single query.