Skip to content

Latest commit

History

History
53 lines (35 loc) 路 1.18 KB

README.md

File metadata and controls

53 lines (35 loc) 路 1.18 KB

Flipper Redis

A Redis adapter for Flipper.

Installation

Add this line to your application's Gemfile:

gem 'flipper-redis'

And then execute:

$ bundle

Or install it yourself with:

$ gem install flipper-redis

Usage

You can read more about adapter versioning here if you are confused. The tl;dr is use the highest version number as that is the latest and greatest.

V2

require 'flipper/adapters/v2/redis'
client = Redis.new
adapter = Flipper::Adapters::V2::Redis.new(client)
flipper = Flipper.new(adapter)
# profit...

V1

require 'flipper/adapters/redis'
client = Redis.new
adapter = Flipper::Adapters::Redis.new(client)
flipper = Flipper.new(adapter)
# profit...

Internals

You can learn more about the internals of the adapter by checking out the example.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request