Sha256: 76053a6c8d9f823f3c88b9d2637e0856c11a40a5b4844039af7ae07b37249811
Contents?: true
Size: 577 Bytes
Versions: 19
Compression:
Stored size: 577 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['BOXEN_REDIS_URL'] options[:url] = ENV['BOXEN_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
19 entries across 19 versions & 1 rubygems