Sha256: 7b6cf7423ef1fb7e0de2d3ecc9d1ddd07102e32e02e0c09f206d1ff8a6418905

Contents?: true

Size: 710 Bytes

Versions: 13

Compression:

Stored size: 710 Bytes

Contents

# Usage (from the repo root):
#   env TOKEN=<token> bundle exec ruby examples/cloud/basic.rb
require 'pathname'
require 'logger'
root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path  = root_path.join('lib')
$:.unshift(lib_path)

require 'flipper'
require 'flipper/cloud'

memory_adapter = Flipper::Adapters::Memory.new
memory_flipper = Flipper.new(memory_adapter)

memory_flipper.enable(:test)
memory_flipper.enable(:search)
memory_flipper.enable_actor(:stats, Flipper::Actor.new("jnunemaker"))
memory_flipper.enable_percentage_of_time(:logging, 5)

flipper = Flipper::Cloud.new(ENV.fetch('TOKEN'))

# wipes cloud clean and makes it identical to memory flipper
flipper.import(memory_flipper)

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
flipper-cloud-0.20.1 examples/cloud/import.rb
flipper-cloud-0.20.0 examples/cloud/import.rb
flipper-cloud-0.20.0.beta3 examples/cloud/import.rb
flipper-cloud-0.20.0.beta2 examples/cloud/import.rb
flipper-cloud-0.20.0.beta1 examples/cloud/import.rb
flipper-cloud-0.19.1 examples/cloud/import.rb
flipper-cloud-0.19.0 examples/cloud/import.rb
flipper-cloud-0.18.0 examples/cloud/import.rb
flipper-cloud-0.17.2 examples/cloud/import.rb
flipper-cloud-0.17.1 examples/cloud/import.rb
flipper-cloud-0.16.2 examples/cloud/import.rb
flipper-cloud-0.16.1 examples/cloud/import.rb
flipper-cloud-0.16.0 examples/cloud/import.rb