Sha256: b2c1ce9950009ff9d5ad5c3f26f5e8628b5911fc1e939d145edf5431a3db826b

Contents?: true

Size: 709 Bytes

Versions: 3

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true
# Redis has 16 DBs (0 to 15)

FEATURE_FLAGS = if ::Rails.env.test?
                  # Use RamStorage in tests to make them faster
                  ::SimpleFeatureFlags::RamStorage.new("#{::Rails.root.to_s}/config/simple_feature_flags.yml")
                else
                  redis = ::Redis.new(host: '127.0.0.1', port: 6379, db: 0)
                  # We recommend using the `redis-namespace` gem to avoid key conflicts with Sidekiq or Resque
                  # redis = ::Redis::Namespace.new(:simple_feature_flags, redis: redis)

                  ::SimpleFeatureFlags::RedisStorage.new(redis, "#{::Rails.root.to_s}/config/simple_feature_flags.yml")
                end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple_feature_flags-1.2.0 lib/example_files/config/initializers/simple_feature_flags.rb
simple_feature_flags-1.1.1 lib/example_files/config/initializers/simple_feature_flags.rb
simple_feature_flags-1.1.0 lib/example_files/config/initializers/simple_feature_flags.rb