Sha256: 7111e8160bbcd379b36c018dfc6962b4e2256598900c9d209f53b242b2bd6dd0

Contents?: true

Size: 444 Bytes

Versions: 37

Compression:

Stored size: 444 Bytes

Contents

require 'bundler/setup'
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

37 entries across 37 versions & 1 rubygems

Version Path
flipper-rollout-1.3.2 examples/rollout/basic.rb
flipper-rollout-1.3.1 examples/rollout/basic.rb
flipper-rollout-1.3.0 examples/rollout/basic.rb
flipper-rollout-1.3.0.pre examples/rollout/basic.rb
flipper-rollout-1.2.2 examples/rollout/basic.rb
flipper-rollout-1.2.1 examples/rollout/basic.rb
flipper-rollout-1.2.0 examples/rollout/basic.rb
flipper-rollout-1.1.2 examples/rollout/basic.rb
flipper-rollout-1.1.1 examples/rollout/basic.rb
flipper-rollout-1.1.0 examples/rollout/basic.rb
flipper-rollout-1.0.0 examples/rollout/basic.rb
flipper-rollout-1.0.0.pre examples/rollout/basic.rb
flipper-rollout-0.28.3 examples/rollout/basic.rb
flipper-rollout-0.28.2 examples/rollout/basic.rb
flipper-rollout-0.28.1 examples/rollout/basic.rb
flipper-rollout-0.28.0 examples/rollout/basic.rb
flipper-rollout-0.27.1 examples/rollout/basic.rb
flipper-rollout-0.27.0 examples/rollout/basic.rb
flipper-rollout-0.26.2 examples/rollout/basic.rb
flipper-rollout-0.26.0 examples/rollout/basic.rb