Ruby CSS HTML Shell Dockerfile JavaScript
Latest commit 8d98b39 Aug 1, 2018
Permalink
Failed to load latest commit information.
docs Document Flipper moneta adapter Jun 8, 2018
examples Add a slash feature to the example May 20, 2018
lib Release 0.16.0 Aug 1, 2018
script Add rails 5.1.4 to script/test Nov 4, 2017
spec Add exist to feature, dsl and flipper default instance delegation Jul 31, 2018
test Remove all the memory adapter requires May 15, 2018
.codeclimate.yml Remove ui/public/ from code climate results Dec 4, 2017
.gitignore Ignore .ruby-version Nov 19, 2016
.rubocop.yml Tweak rubo rules Feb 10, 2018
.rubocop_todo.yml Rename cache store again Oct 28, 2017
.travis.yml Test against Ruby 2.5 since it has been released Jan 7, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jan 20, 2018
Changelog.md Update the changelog Jul 31, 2018
Dockerfile Add docker-compose for contributors Nov 18, 2016
Gemfile Add guard rubocop for rubo corrections on the fly Feb 10, 2018
Guardfile Dont run rubocop on start Feb 21, 2018
LICENSE Bundle gem files Jul 22, 2012
README.md Remove all the memory adapter requires May 15, 2018
Rakefile Remove rake task that no longer is necessary Nov 22, 2017
docker-compose.yml 🔥-ing boxen remnants Apr 27, 2017
flipper-active_record.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-active_support_cache_store.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-api.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-cloud.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-dalli.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-moneta.gemspec Update moneta version constraints Jun 3, 2018
flipper-mongo.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-redis.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-rollout.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-sequel.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper-ui.gemspec Add changelog url to flipper gemspecs Jun 3, 2018
flipper.gemspec Add changelog url to flipper gemspecs Jun 3, 2018

README.md

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

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'

Flipper.configure do |config|
  config.default do
    # pick an adapter, this uses memory, any will do
    adapter = Flipper::Adapters::Memory.new

    # pass adapter to handy DSL instance
    Flipper.new(adapter)
  end
end

# check if search is enabled
if Flipper.enabled?(:search)
  puts 'Search away!'
else
  puts 'No search for you!'
end

puts 'Enabling Search...'
Flipper.enable(:search)

# check if search is enabled
if Flipper.enabled?(:search)
  puts 'Search away!'
else
  puts 'No search for you!'
end

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 and Statsd
  • 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
@thetimbanks @thetimbanks ui
@lazebny @lazebny docker