Sha256: f1323ff53272ff11a42a32d6cc9d004efb3a331e69a93d099190dd080de6d2e6
Contents?: true
Size: 466 Bytes
Versions: 58
Compression:
Stored size: 466 Bytes
Contents
module PactBroker class FeatureToggle def self.enabled?(feature) not_production? || feature_in_env_var?(feature) end def self.not_production? ENV['RACK_ENV'] != 'production' end def self.feature_in_env_var?(feature) (features =~ /\b#{feature}\b/i) != nil end def self.features ENV['PACT_BROKER_FEATURES'] || "" end end def self.feature_enabled?(feature) FeatureToggle.enabled?(feature) end end
Version data entries
58 entries across 58 versions & 1 rubygems