Sha256: 56f61d781e384d8ad15cc07450a9de66f205b627942807bb5326095f7102e896

Contents?: true

Size: 831 Bytes

Versions: 25

Compression:

Stored size: 831 Bytes

Contents

require "flipper/railtie"

module Flipper
  module Cloud
    class Engine < Rails::Engine
      paths["config/routes.rb"] = ["lib/flipper/cloud/routes.rb"]

      config.before_configuration do
        config.flipper.cloud_path = "_flipper"
      end

      initializer "flipper.cloud.default", before: :load_config_initializers do |app|
        Flipper.configure do |config|
          config.default do
            if ENV["FLIPPER_CLOUD_TOKEN"]
              Flipper::Cloud.new(
                local_adapter: config.adapter,
                instrumenter: app.config.flipper.instrumenter
              )
            else
              warn "Missing FLIPPER_CLOUD_TOKEN environment variable. Disabling Flipper::Cloud."
              Flipper.new(config.adapter)
            end
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
flipper-cloud-0.28.3 lib/flipper/cloud/engine.rb
flipper-cloud-0.28.2 lib/flipper/cloud/engine.rb
flipper-cloud-0.28.1 lib/flipper/cloud/engine.rb
flipper-cloud-0.28.0 lib/flipper/cloud/engine.rb
flipper-cloud-0.27.1 lib/flipper/cloud/engine.rb
flipper-cloud-0.27.0 lib/flipper/cloud/engine.rb
flipper-cloud-0.26.2 lib/flipper/cloud/engine.rb
flipper-cloud-0.26.1 lib/flipper/cloud/engine.rb
flipper-cloud-0.26.0 lib/flipper/cloud/engine.rb
flipper-cloud-0.26.0.rc2 lib/flipper/cloud/engine.rb
flipper-cloud-0.26.0.rc1 lib/flipper/cloud/engine.rb
flipper-cloud-0.25.4 lib/flipper/cloud/engine.rb
flipper-cloud-0.25.3 lib/flipper/cloud/engine.rb
flipper-cloud-0.25.2 lib/flipper/cloud/engine.rb
flipper-cloud-0.25.1 lib/flipper/cloud/engine.rb
flipper-cloud-0.25.0 lib/flipper/cloud/engine.rb
flipper-cloud-0.24.1 lib/flipper/cloud/engine.rb
flipper-cloud-0.24.0 lib/flipper/cloud/engine.rb
flipper-cloud-0.23.1 lib/flipper/cloud/engine.rb
flipper-cloud-0.23.0 lib/flipper/cloud/engine.rb