Sha256: c7e8c5717db7a655f6446bfe4687862fc8382e227b1884a3a47289d316b661f8
Contents?: true
Size: 575 Bytes
Versions: 21
Compression:
Stored size: 575 Bytes
Contents
require 'pathname' require 'logger' root_path = Pathname(__FILE__).dirname.join('..').expand_path lib_path = root_path.join('lib') $:.unshift(lib_path) require 'redis' require 'rollout' require 'flipper' require 'flipper/adapters/rollout' redis = Redis.new rollout = Rollout.new(redis) rollout.activate(:stats) adapter = Flipper::Adapters::Rollout.new(rollout) flipper = Flipper.new(adapter) if flipper[:stats].enabled? puts "Enabled!" else puts "Disabled!" end rollout.deactivate(:stats) if flipper[:stats].enabled? puts "Enabled!" else puts "Disabled!" end
Version data entries
21 entries across 21 versions & 1 rubygems