Sha256: 1638abdab50dbc0453638cf4be26352522e8193751e26296d88d7ad93e967f62
Contents?: true
Size: 598 Bytes
Versions: 37
Compression:
Stored size: 598 Bytes
Contents
require "pact_broker/config/runtime_configuration" module PactBroker class FeatureToggle def self.enabled?(feature, ignore_env) if ignore_env feature_in_env_var?(feature) else not_production? || feature_in_env_var?(feature) end end def self.not_production? ENV["RACK_ENV"] != "production" end def self.feature_in_env_var?(feature) PactBroker.configuration.features.include?(feature.to_s.downcase) end end def self.feature_enabled?(feature, ignore_env = false) FeatureToggle.enabled?(feature, ignore_env) end end
Version data entries
37 entries across 37 versions & 1 rubygems