Module: Unleash

Defined in:
lib/unleash.rb,
lib/unleash/client.rb,
lib/unleash/context.rb,
lib/unleash/metrics.rb,
lib/unleash/variant.rb,
lib/unleash/version.rb,
lib/unleash/util/http.rb,
lib/unleash/constraint.rb,
lib/unleash/strategies.rb,
lib/unleash/configuration.rb,
lib/unleash/strategy/base.rb,
lib/unleash/strategy/util.rb,
lib/unleash/feature_toggle.rb,
lib/unleash/toggle_fetcher.rb,
lib/unleash/metrics_reporter.rb,
lib/unleash/strategy/default.rb,
lib/unleash/variant_override.rb,
lib/unleash/bootstrap/handler.rb,
lib/unleash/scheduled_executor.rb,
lib/unleash/variant_definition.rb,
lib/unleash/activation_strategy.rb,
lib/unleash/strategy/user_with_id.rb,
lib/unleash/bootstrap/configuration.rb,
lib/unleash/bootstrap/provider/base.rb,
lib/unleash/strategy/remote_address.rb,
lib/unleash/strategy/flexible_rollout.rb,
lib/unleash/bootstrap/provider/from_url.rb,
lib/unleash/bootstrap/provider/from_file.rb,
lib/unleash/strategy/application_hostname.rb,
lib/unleash/strategy/gradual_rollout_random.rb,
lib/unleash/strategy/gradual_rollout_userid.rb,
lib/unleash/strategy/gradual_rollout_sessionid.rb

Defined Under Namespace

Modules: Bootstrap, Strategy, Util Classes: ActivationStrategy, Client, Configuration, Constraint, Context, FeatureToggle, Metrics, MetricsReporter, ScheduledExecutor, Strategies, ToggleFetcher, Variant, VariantDefinition, VariantOverride

Constant Summary collapse

TIME_RESOLUTION =
3
STRATEGIES =

Deprecated: Use Unleash.configure to add custom strategies

self.configuration.strategies
VERSION =
"5.0.2".freeze
CLIENT_SPECIFICATION_VERSION =
gemspec.['client-specification-version'].freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



12
13
14
# File 'lib/unleash.rb', line 12

def configuration
  @configuration
end

.loggerObject

Returns the value of attribute logger.



12
13
14
# File 'lib/unleash.rb', line 12

def logger
  @logger
end

.reporterObject

Returns the value of attribute reporter.



12
13
14
# File 'lib/unleash.rb', line 12

def reporter
  @reporter
end

.segment_cacheObject

Returns the value of attribute segment_cache.



12
13
14
# File 'lib/unleash.rb', line 12

def segment_cache
  @segment_cache
end

.toggle_fetcherObject

Returns the value of attribute toggle_fetcher.



12
13
14
# File 'lib/unleash.rb', line 12

def toggle_fetcher
  @toggle_fetcher
end

.toggle_metricsObject

Returns the value of attribute toggle_metrics.



12
13
14
# File 'lib/unleash.rb', line 12

def toggle_metrics
  @toggle_metrics
end

.togglesObject

Returns the value of attribute toggles.



12
13
14
# File 'lib/unleash.rb', line 12

def toggles
  @toggles
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Support for configuration via yield:

Yields:



21
22
23
24
25
26
# File 'lib/unleash.rb', line 21

def self.configure
  yield(configuration)

  self.configuration.validate!
  self.configuration.refresh_backup_file!
end

.strategiesObject



28
29
30
# File 'lib/unleash.rb', line 28

def self.strategies
  self.configuration.strategies
end