Skip to content

fix: require AS String inflections

  • Rollout.resolve uses String#clasify to build class name
  • Rollout::PercentusesZlib` to calculate CRC32

This patch makes it so that minimal non-Rails demo will work:

  require "bundler/inline"

  gemfile do
    source "https://rubygems.org"
    gem "gitlab-experiment"
  end

  class SomeExperiment < Gitlab::Experiment
    default_rollout :percent, include_control: true

    control   { "Hello %s," }
    candidate { "Hi %s," }
  end

  include Gitlab::Experiment::Dsl

  10.times { |i| puts(format(experiment(:some, actor: i).run, "Jeremy")) }
Edited by Alexey Zapparov

Merge request reports

Loading