Sha256: f57fef633c4444a32dead2dd9d26452538ad6778df6734ef91fac5340630dbd3
Contents?: true
Size: 877 Bytes
Versions: 18
Compression:
Stored size: 877 Bytes
Contents
# # Usage: # bin/rackup examples/api/custom_memoized.ru -p 9999 # # http://localhost:9999/ # require 'bundler/setup' require 'rack/reloader' require "active_support/notifications" require "flipper/api" require "flipper/adapters/pstore" adapter = Flipper::Adapters::Instrumented.new( Flipper::Adapters::PStore.new, instrumenter: ActiveSupport::Notifications, ) flipper = Flipper.new(adapter) ActiveSupport::Notifications.subscribe(/.*/, ->(*args) { name, start, finish, id, data = args case name when "adapter_operation.flipper" p data[:adapter_name] => data[:operation] end }) # You can uncomment this to get some default data: # flipper[:logging].enable_percentage_of_time 5 use Rack::Reloader run Flipper::Api.app(flipper) { |builder| builder.use Flipper::Middleware::SetupEnv, flipper builder.use Flipper::Middleware::Memoizer, preload: true }
Version data entries
18 entries across 18 versions & 1 rubygems