docs/redis/README.md in flipper-redis-0.20.4 vs docs/redis/README.md in flipper-redis-0.21.0.rc1
- old
+ new
@@ -16,15 +16,24 @@
$ gem install flipper-redis
## Usage
+In most cases, all you need to do is require the adapter. It will connect to the Redis instance specified in the `REDIS_URL` or `FLIPPER_REDIS_URL` environment vairable, or localhost by default.
+
```ruby
-require 'flipper/adapters/redis'
-client = Redis.new
-adapter = Flipper::Adapters::Redis.new(client)
-flipper = Flipper.new(adapter)
-# profit...
+require 'flipper-redis'
+```
+
+**If you need to customize the adapter**, you can add this to an initializer:
+
+```ruby
+Flipper.configure do |config|
+ config.default do
+ client = Redis.new(url: ENV["FLIPPER_REDIS_URL"] || ENV["REDIS_URL"])
+ Flipper.new(Flipper::Adapters::Redis.new(client))
+ end
+end
```
## Internals
Each feature is stored in a redis hash, which means getting a feature is single query.