Permalink
Browse files

Add some enabled features for example

  • Loading branch information...
1 parent 4e4c296 commit c6dbc027be04cb3f50f63822690b96eeac36c061 @jnunemaker committed Sep 12, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 examples/basic.ru
View
@@ -10,9 +10,17 @@ $:.unshift(lib_path)
require 'flipper-ui'
require 'flipper/adapters/memory'
+Flipper.register(:admins) { |actor| actor.admin? }
+
adapter = Flipper::Adapters::Memory.new({})
flipper = Flipper.new(adapter)
+flipper[:search_performance].enable
+flipper[:gauges_tracking].enable
+flipper[:secrets].enable flipper.group(:admins)
+flipper[:logging].enable flipper.random(5)
+flipper[:new_cache].enable flipper.actors(15)
+
use Flipper::UI::Middleware, flipper
run lambda { |env|
[200, {'Content-Type' => 'text/html'}, ['Go here for <a href="/flipper">Flipper!</a>']]

0 comments on commit c6dbc02

Please sign in to comment.