Class: Gitlab::Experiment::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/gitlab/experiment/configuration.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.base_classObject

Returns the value of attribute base_class.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def base_class
  @base_class
end

.cacheObject

Returns the value of attribute cache.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def cache
  @cache
end

.context_key_bit_lengthObject

Returns the value of attribute context_key_bit_length.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def context_key_bit_length
  @context_key_bit_length
end

.context_key_secretObject

Returns the value of attribute context_key_secret.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def context_key_secret
  @context_key_secret
end

Returns the value of attribute cookie_domain.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def cookie_domain
  @cookie_domain
end

.default_rolloutObject

Returns the value of attribute default_rollout.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def default_rollout
  @default_rollout
end

.loggerObject

Returns the value of attribute logger.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def logger
  @logger
end

.mount_atObject

Returns the value of attribute mount_at.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def mount_at
  @mount_at
end

.name_prefixObject

Returns the value of attribute name_prefix.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def name_prefix
  @name_prefix
end

.nested_behaviorObject

Returns the value of attribute nested_behavior.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def nested_behavior
  @nested_behavior
end

.publishing_behaviorObject

Returns the value of attribute publishing_behavior.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def publishing_behavior
  @publishing_behavior
end

.redirect_url_validatorObject

Returns the value of attribute redirect_url_validator.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def redirect_url_validator
  @redirect_url_validator
end

.strict_registrationObject

Returns the value of attribute strict_registration.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def strict_registration
  @strict_registration
end

.tracking_behaviorObject

Returns the value of attribute tracking_behavior.



223
224
225
# File 'lib/gitlab/experiment/configuration.rb', line 223

def tracking_behavior
  @tracking_behavior
end

Class Method Details

.context_hash_strategy=(block) ⇒ Object

Deprecated.


169
170
171
172
173
174
175
176
177
# File 'lib/gitlab/experiment/configuration.rb', line 169

def context_hash_strategy=(block)
  deprecated(
    :context_hash_strategy,
    'instead use `context_key_secret` and `context_key_bit_length`',
    version: '0.7.0'
  )

  @__context_hash_strategy = block
end

.deprecated(*args, version:, stack: 0) ⇒ Object

Internal warning helpers.



258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/gitlab/experiment/configuration.rb', line 258

def deprecated(*args, version:, stack: 0)
  deprecator = deprecator(version)
  args << args.pop.to_s.gsub('{{release}}', "#{deprecator.gem_name} #{deprecator.deprecation_horizon}")
  args << caller_locations(4 + stack)

  if args.length == 2
    deprecator.warn(*args)
  else
    args[0] = "`#{args[0]}`"
    deprecator.deprecation_warning(*args)
  end
end

.inclusion_resolverObject

Deprecated.


213
214
215
216
217
218
219
220
221
# File 'lib/gitlab/experiment/configuration.rb', line 213

def inclusion_resolver
  deprecated(
    :inclusion_resolver,
    'instead put this logic into custom rollout strategies',
    version: '0.7.0'
  )

  @__inclusion_resolver
end

.inclusion_resolver=(block) ⇒ Object

Deprecated.


202
203
204
205
206
207
208
209
210
# File 'lib/gitlab/experiment/configuration.rb', line 202

def inclusion_resolver=(block)
  deprecated(
    :inclusion_resolver,
    'instead put this logic into custom rollout strategies',
    version: '0.7.0'
  )

  @__inclusion_resolver = block
end

.variant_resolverObject

Deprecated.


180
181
182
183
184
185
186
187
188
# File 'lib/gitlab/experiment/configuration.rb', line 180

def variant_resolver
  deprecated(
    :variant_resolver,
    'instead use `inclusion_resolver` with a block that returns a boolean',
    version: '0.6.5'
  )

  @__inclusion_resolver
end

.variant_resolver=(block) ⇒ Object

Deprecated.


191
192
193
194
195
196
197
198
199
# File 'lib/gitlab/experiment/configuration.rb', line 191

def variant_resolver=(block)
  deprecated(
    :variant_resolver,
    'instead use `inclusion_resolver` with a block that returns a boolean',
    version: '0.6.5'
  )

  @__inclusion_resolver = block
end