Skip to content

Commit 989ff86

Browse files
floriandrew
authored andcommitted
Fix loadorder issues (#479)
1 parent 4d39e34 commit 989ff86

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

lib/split.rb

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
# frozen_string_literal: true
22
require 'redis'
33

4-
# Auto require all files except for those that include 'dashboard' or 'engine'
5-
Dir["#{File.expand_path(File.dirname(__FILE__))}/**/*.rb"].reject do |file|
6-
file["dashboard"] || file["engine"]
7-
end.each { |file| require file }
8-
4+
require 'split/algorithms/block_randomization'
5+
require 'split/algorithms/weighted_sample'
6+
require 'split/algorithms/whiplash'
7+
require 'split/alternative'
8+
require 'split/configuration'
9+
require 'split/encapsulated_helper'
10+
require 'split/exceptions'
11+
require 'split/experiment'
12+
require 'split/experiment_catalog'
13+
require 'split/extensions/string'
14+
require 'split/goals_collection'
15+
require 'split/helper'
16+
require 'split/metric'
17+
require 'split/persistence'
18+
require 'split/redis_interface'
19+
require 'split/trial'
20+
require 'split/user'
21+
require 'split/version'
22+
require 'split/zscore'
923
require 'split/engine' if defined?(Rails)
1024

1125
module Split

lib/split/persistence.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# frozen_string_literal: true
2+
23
module Split
34
module Persistence
5+
require 'split/persistence/cookie_adapter'
6+
require 'split/persistence/dual_adapter'
7+
require 'split/persistence/redis_adapter'
8+
require 'split/persistence/session_adapter'
9+
410
ADAPTERS = {
511
:cookie => Split::Persistence::CookieAdapter,
612
:session => Split::Persistence::SessionAdapter

lib/split/persistence/dual_adapter.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# frozen_string_literal: true
2+
3+
require 'forwardable'
4+
25
module Split
36
module Persistence
47
class DualAdapter

lib/split/user.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'forwardable'
2+
13
module Split
24
class User
35
extend Forwardable

0 commit comments

Comments
 (0)