GithubHelp home page GithubHelp logo

isabella232 / flipper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from namely/flipper

0.0 0.0 0.0 5.7 MB

:dolphin: feature flipping for ruby (performant and simple)

Home Page: https://flippercloud.io

License: MIT License

Dockerfile 0.06% Ruby 67.76% CoffeeScript 0.01% CSS 29.31% JavaScript 0.01% HTML 2.58% Shell 0.26%

flipper's Introduction

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

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

flipper's People

Contributors

abelvarga avatar alabeduarte avatar alexwheeler avatar aroben avatar bgentry avatar camallen avatar chastell avatar chrislloyd avatar chrislundquist avatar delynn avatar ecbrodie avatar eric avatar greatuserongithub avatar gshutler avatar jackca avatar janester avatar jnunemaker avatar kathf avatar kevinbongart avatar krzcho avatar lazebny avatar lucasmazza avatar nilbus avatar oboxodo avatar rmacklin avatar rsanheim avatar stve avatar svarks avatar thetimbanks avatar vegantech avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.