Sha256: e24a3fb4d10d43625c5ce7bd825021abb4dd256114b4297b5b50b6f418094e53

Contents?: true

Size: 677 Bytes

Versions: 36

Compression:

Stored size: 677 Bytes

Contents

require 'pathname'
require 'logger'

root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path  = root_path.join('lib')
$:.unshift(lib_path)

require 'sequel'
Sequel::Model.db =  Sequel.sqlite(':memory:')
Sequel.extension :migration, :core_extensions

require 'generators/flipper/templates/sequel_migration'
CreateFlipperTablesSequel.new(Sequel::Model.db).up

require 'flipper/adapters/sequel'
adapter = Flipper::Adapters::Sequel.new
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

36 entries across 36 versions & 1 rubygems

Version Path
flipper-sequel-0.20.4 examples/sequel/basic.rb
flipper-sequel-0.20.3 examples/sequel/basic.rb
flipper-sequel-0.20.2 examples/sequel/basic.rb
flipper-sequel-0.20.1 examples/sequel/basic.rb
flipper-sequel-0.20.0 examples/sequel/basic.rb
flipper-sequel-0.20.0.beta3 examples/sequel/basic.rb
flipper-sequel-0.20.0.beta2 examples/sequel/basic.rb
flipper-sequel-0.20.0.beta1 examples/sequel/basic.rb
flipper-sequel-0.19.1 examples/sequel/basic.rb
flipper-sequel-0.19.0 examples/sequel/basic.rb
flipper-sequel-0.18.0 examples/sequel/basic.rb
flipper-sequel-0.17.2 examples/sequel/basic.rb
flipper-sequel-0.17.1 examples/sequel/basic.rb
flipper-sequel-0.16.2 examples/sequel/basic.rb
flipper-sequel-0.16.1 examples/sequel/basic.rb
flipper-sequel-0.16.0 examples/sequel/basic.rb
flipper-sequel-0.15.0 examples/sequel/basic.rb
flipper-sequel-0.14.0 examples/sequel/basic.rb
flipper-sequel-0.13.0 examples/sequel/basic.rb
flipper-sequel-0.13.0.beta1 examples/sequel/basic.rb