Code Monkey home page Code Monkey logo

flipper's Introduction

Flipper Mark

Flipper

Beautiful, performant feature flags for Ruby.

Control your software — don't let it control you.

Installation

Add this line to your application's Gemfile:

gem 'flipper'

And then execute:

$ bundle

Or install it yourself with:

$ gem install flipper

Getting Started

Flipper is built on adapters for maximum flexibility. Regardless of what data store you are using, Flipper can performantly store data in it.

To get started, pick one of our supported adapters and follow the instructions:

Or roll your own. We even provide automatic (rspec and minitest) tests for you, so you know you've built your custom adapter correctly.

Once you've selected an adapter and followed the installation instructions, you should be good to go.

Flipper UI

If you prefer a web UI to an IRB console, you can setup the Flipper UI.

It's simple and pretty.

Flipper UI Screenshot

Flipper Cloud

Or, (even better than OSS + UI) use Flipper Cloud which comes with:

  • everything in one place — no need to bounce around from different application UIs or IRB consoles.
  • permissions — grant access to everyone in your organization or lockdown each project to particular people.
  • multiple environments — production, staging, enterprise, by continent, whatever you need.
  • personal environments — no more rake scripts or manual enable/disable to get your laptop to look like production. Every developer gets a personal environment that inherits from production that they can override as they please (read more).
  • no maintenance — we'll keep the lights on for you. We also have handy webhooks for keeping your app in sync with Cloud, so our availability won't affect yours. All your feature flag reads are local to your app.
  • audit history — every feature change and who made it.
  • rollbacks — enable or disable a feature accidentally? No problem. You can roll back to any point in the audit history with a single click.

Flipper Cloud Screenshot

Cloud is super simple to integrate with Rails (demo app), Sinatra or any other framework.

Examples

Want to get a quick feel for what it looks like to work with Flipper? Check out the following example or the examples directory. You might also want to peek at the DSL and Feature classes for code/docs.

require 'flipper'

Flipper.configure do |config|
  config.default do
    # pick an adapter, this uses memory, any will do, see docs above
    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

Docs

A few miscellaneous docs with more info for the hungry.

  • 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. Run the tests (bundle exec rake)
  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 alexwheeler avatar aroben avatar bendb-instacart avatar brndnblck avatar camallen avatar chastell avatar chrislloyd avatar chrislundquist avatar clinejj avatar ecbrodie avatar eric avatar grepsedawk avatar gshutler avatar jackca avatar janester avatar jbarrieault avatar jnunemaker avatar juanroldan1989 avatar kathf avatar kevinbongart avatar krzcho avatar lazebny avatar lucasmazza avatar rmacklin avatar rsanheim avatar svarks avatar thetimbanks avatar vegantech avatar xlgmokha avatar

Stargazers

 avatar  avatar

Watchers

 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.