Sha256: 9cf581617997b9291d2f112042dfa3b2cc8bf867e0e993955e8c6f3430c24888

Contents?: true

Size: 1.16 KB

Versions: 15

Compression:

Stored size: 1.16 KB

Contents

#
# Usage:
#   # if you want it to not reload and be really fast
#   bundle exec rackup examples/ui/read_only.ru -p 9999
#
#   http://localhost:9999/
#
require 'bundler/setup'
require 'rack/reloader'
require "flipper/ui"
require "flipper/adapters/pstore"

Flipper.register(:admins) { |actor|
  actor.respond_to?(:admin?) && actor.admin?
}

Flipper.register(:early_access) { |actor|
  actor.respond_to?(:early?) && actor.early?
}

Flipper::UI.configure do |config|
  config.banner_text = 'Read only mode.'
  config.banner_class = 'danger'
  config.read_only = true
end

# You can uncomment these to get some default data:
# Flipper.enable(:search_performance_another_long_thing)
# Flipper.disable(:gauges_tracking)
# Flipper.disable(:unused)
# Flipper.enable_actor(:suits, Flipper::Actor.new('1'))
# Flipper.enable_actor(:suits, Flipper::Actor.new('6'))
# Flipper.enable_group(:secrets, :admins)
# Flipper.enable_group(:secrets, :early_access)
# Flipper.enable_percentage_of_time(:logging, 5)
# Flipper.enable_percentage_of_actors(:new_cache, 15)
# Flipper.add("a/b")

use Rack::Reloader

run Flipper::UI.app { |builder|
  builder.use Rack::Session::Cookie, secret: "_super_secret"
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
flipper-ui-1.3.2 examples/ui/read_only.ru
flipper-ui-1.3.1 examples/ui/read_only.ru
flipper-ui-1.3.0 examples/ui/read_only.ru
flipper-ui-1.3.0.pre examples/ui/read_only.ru
flipper-ui-1.2.2 examples/ui/read_only.ru
flipper-ui-1.2.1 examples/ui/read_only.ru
flipper-ui-1.2.0 examples/ui/read_only.ru
flipper-ui-1.1.2 examples/ui/read_only.ru
flipper-ui-1.1.1 examples/ui/read_only.ru
flipper-ui-1.1.0 examples/ui/read_only.ru
flipper-ui-1.0.0 examples/ui/read_only.ru
flipper-ui-1.0.0.pre examples/ui/read_only.ru
flipper-ui-0.28.3 examples/ui/read_only.ru
flipper-ui-0.28.2 examples/ui/read_only.ru
flipper-ui-0.28.1 examples/ui/read_only.ru