Sha256: 7bd3824147f3d1849f12f4998c060c12ece18ab3513cd8c0b5d308174b4f59e9

Contents?: true

Size: 843 Bytes

Versions: 16

Compression:

Stored size: 843 Bytes

Contents

require 'determinator/retrieve/dynaconf'
require 'active_support/cache'

retrieval = Determinator::Retrieve::Dynaconf.new(base_url: 'http://localhost:2345', service_name: 'determinator-rails')
feature_cache = Determinator::Cache::FetchWrapper.new(
  ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute)
)
Determinator.configure(retrieval: retrieval, feature_cache: feature_cache)

Determinator.on_error do |error|
  # NewRelic::Agent.notice_error(error)
end

Determinator.on_missing_feature do |feature_name|
  # STATSD.increment 'determinator.missing_feature', tags: ["feature:#{name}"]
end

Determinator.on_determination do |id, guid, feature, determination|
  if feature.experiment? && determination != false
    puts "TODO: Track that user #{id}/#{guid} saw the #{determination} variant of '#{feature.name}' for analysis"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
determinator-2.6.0 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.5.4 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.5.3 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.5.2 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.5.1 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.5.0 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.4.4 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.4.3 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.4.2 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.4.0 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.3.1 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.3.0 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.2.1 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.2.0 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.1.0 examples/determinator-rails/config/initializers/determinator.rb
determinator-2.0.0 examples/determinator-rails/config/initializers/determinator.rb