flipper 0,1,2,1,3,0 travis-ci ruby Rubygems

feature flipping for ANYTHING

flipper logo

                                   __
                               _.-~  )
                    _..--~~~~,'   ,-/     _
                 .-'. . . .'   ,-','    ,' )
               ,'. . . _   ,--~,-'__..-'  ,'
             ,'. . .  (@)' ---~~~~      ,'
            /. . . . '~~             ,-'
           /. . . . .             ,-'
          ; . . . .  - .        ,'
         : . . . .       _     /
        . . . . .          `-.:
       . . . ./  - .          )
      .  . . |  _____..---.._/ _____
~---~~~~----~~~~             ~~

Feature flipping is the act of enabling or disabling features or parts of your application, ideally without re-deploying or changing anything in your code base.

The goal of this gem is to make turning features on or off so easy that everyone does it. Whatever your data store, throughput, or experience, feature flipping should be easy and have minimal impact on your application.

Installation

Add this line to your application's Gemfile:

gem 'flipper'

And then execute:

$ bundle

Or install it yourself with:

$ gem install flipper

Examples

The goal of the API for flipper was to have everything revolve around features and what ways they can be enabled. Start with top level and dig into a feature, then dig in further and enable that feature for a given type of access, as opposed to thinking about how the feature will be accessed first (ie: stats.enable vs activate_group(:stats, ...)).

require 'flipper'

# pick an adapter
require 'flipper/adapters/memory'
adapter = Flipper::Adapters::Memory.new

# get a handy dsl instance
flipper = Flipper.new(adapter)

# grab a feature
search = flipper[:search]

# check if that feature is enabled
if search.enabled?
  puts 'Search away!'
else
  puts 'No search for you!'
end

puts 'Enabling Search...'
search.enable

Of course there are more examples for you to peruse. You could also check out the DSL and Feature classes for code/docs.

Docs

  • Gates - Boolean, Groups, Actors, % of Actors, and % of Time
  • Adapters - Mongo, Redis, Cassandra, Active Record...
  • Instrumentation - ActiveSupport::Notifications, Statsd and Metriks
  • Optimization - Memoization middleware and Cache adapters
  • Web Interface - Point and click...
  • API - HTTP API interface
  • Caveats - Flipper beware! (see what I did there)
  • Docker-Compose - Using docker-compose in contributing

Contributing

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

Releasing

  1. Update the version to be whatever it should be and commit.
  2. script/release
  3. Profit.

Brought To You By

pic @mention area
@jnunemaker @jnunemaker most things
@alexwheeler @alexwheeler api
@lazebny @lazebny docker

Related Repositories

flipper-ui

flipper-ui

[MOVED] ... to main flipper repo. See readme. ...

django-feature-flipper

django-feature-flipper

A feature flipper to help you use continuous deployment for Django projects. No ...

flipper-redis

flipper-redis

[MOVED] into flipper, check out readme for more ...

flipper-reverse-image-search

flipper-reverse-image-search

Open Reverse Image Search with Lire, Cassandra, Metaextractor, Solr and JHipster ...

jquery.flipper

jquery.flipper

Flipper Animation for text transitions. Can be used to create Retro style fall d ...


Top Contributors

jnunemaker AlexWheeler rsanheim JackCA listrophy aroben chastell chrislloyd ChrisLundquist eric bgentry svarks vegantech lucasmazza alabeduarte carlthuringer delynn gdavison jvanbaarsen natesholland scrogson

Releases

-   v0.9.2 zip tar
-   v0.9.1 zip tar
-   v0.9.0 zip tar
-   v0.9.0.beta1 zip tar
-   v0.8.0 zip tar
-   v0.7.5 zip tar
-   v0.7.4 zip tar
-   v0.7.3 zip tar
-   v0.7.2 zip tar
-   v0.7.1 zip tar
-   v0.7.0 zip tar
-   v0.7.0.beta6 zip tar
-   v0.7.0.beta5 zip tar
-   v0.7.0.beta4 zip tar
-   v0.7.0.beta3 zip tar
-   v0.7.0.beta2 zip tar
-   v0.7.0.beta1 zip tar
-   v0.6.3 zip tar
-   v0.6.2 zip tar
-   v0.6.1 zip tar
-   v0.6.0 zip tar
-   v0.5.0 zip tar
-   v0.4.0 zip tar
-   v0.3.0 zip tar
-   v0.2.1 zip tar
-   v0.2.0 zip tar
-   v0.1.1 zip tar
-   v0.1.0 zip tar