Skip to content

Instantly share code, notes, and snippets.

View brusic's full-sized avatar

Ivan Brusic brusic

View GitHub Profile
@brusic
brusic / split_config.rb
Created February 12, 2019 18:32 — forked from YurySolovyov/split_config.rb
Split Reentrant A/B Ext.
rails_env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
Split.redis = YAML.load_file(Rails.root.join('config/split.yml')).fetch(rails_env)
Split.configure do |config|
adapter = Split::Persistence::RedisAdapter.with_config(
lookup_by: :params_user_id,
namespace: 'abtesting_participant_id',
expire_seconds: 2_592_000, # 30 days
)