This gem adds a simple callback interface for Flipper adapter events.
For example, when a Flipper feature is changed, you can:
- send a Slack notification (built-in)
- write the change to a database or log file
- notify a performance monitoring application
- send a YO
Add this line to your application's Gemfile:
gem'flipper-echo'And then execute:
$ bundle
Or install it yourself as:
$ gem install flipper-echo
First, configure Flipper as you normally would (any adapter will do), e.g.:
FLIPPER=Flipper.new(Flipper::Adapters::Memory.new)Then configure this gem in any of the following ways:
Flipper::Echo.configuredo |config|
config.flipper=FLIPPERconfig.notifier=procdo |event|
# Do something with the event...#puts"#{event.feature.name} changed: #{event.action}"endendYou can provide any Ruby object with a notify method:
classCustomNotifierdefnotify(event)# Do something with the event...endendFlipper::Echo.configuredo |config|
config.flipper=FLIPPERconfig.notifier=CustomNotifier.newendFlipper::Echo.configuredo |config|
config.flipper=FLIPPERconfig.notifiers << NewrelicNotifier.newconfig.notifiers << GraphiteNotifier.newconfig.notifiers << Flipper::Echo::Stdout::Notifier.newendFirst create a Slack webhook url, then use it in your configuration:
Flipper::Echo.configuredo |config|
config.notifiers << Flipper::Echo::Slack::Notifier.new('https://hooks.slack.com/your/webhook...',channel: '#eng')endhttp://www.rubydoc.info/github/mode/flipper-echo/master
- Fork it ( https://github.com/mode/flipper-echo/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request



