Sha256: 07c923cdc60defa2bd6bfd991cecbddb5b7520749f8334aa2d613a400555fd8a
Contents?: true
Size: 565 Bytes
Versions: 31
Compression:
Stored size: 565 Bytes
Contents
require 'pathname' require 'logger' root_path = Pathname(__FILE__).dirname.join('..').expand_path lib_path = root_path.join('lib') $:.unshift(lib_path) require 'flipper/adapters/redis' options = {} if ENV['REDIS_URL'] options[:url] = ENV['REDIS_URL'] end client = Redis.new(options) adapter = Flipper::Adapters::Redis.new(client) flipper = Flipper.new(adapter) flipper[:stats].enable if flipper[:stats].enabled? puts "Enabled!" else puts "Disabled!" end flipper[:stats].disable if flipper[:stats].enabled? puts "Enabled!" else puts "Disabled!" end
Version data entries
31 entries across 31 versions & 1 rubygems