split 3.4.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/ci.yml +71 -0
- data/.rubocop.yml +177 -1
- data/.rubocop_todo.yml +40 -493
- data/CHANGELOG.md +41 -0
- data/Gemfile +1 -0
- data/README.md +26 -6
- data/Rakefile +1 -0
- data/gemfiles/{4.2.gemfile → 6.1.gemfile} +1 -1
- data/gemfiles/7.0.gemfile +9 -0
- data/lib/split/algorithms/block_randomization.rb +1 -0
- data/lib/split/algorithms/weighted_sample.rb +2 -1
- data/lib/split/algorithms/whiplash.rb +3 -2
- data/lib/split/alternative.rb +1 -0
- data/lib/split/cache.rb +28 -0
- data/lib/split/combined_experiments_helper.rb +1 -0
- data/lib/split/configuration.rb +8 -12
- data/lib/split/dashboard/helpers.rb +1 -0
- data/lib/split/dashboard/pagination_helpers.rb +1 -0
- data/lib/split/dashboard/paginator.rb +1 -0
- data/lib/split/dashboard/public/dashboard.js +10 -0
- data/lib/split/dashboard/public/style.css +5 -0
- data/lib/split/dashboard/views/_controls.erb +13 -0
- data/lib/split/dashboard.rb +17 -2
- data/lib/split/encapsulated_helper.rb +3 -2
- data/lib/split/engine.rb +5 -4
- data/lib/split/exceptions.rb +1 -0
- data/lib/split/experiment.rb +82 -60
- data/lib/split/experiment_catalog.rb +1 -3
- data/lib/split/extensions/string.rb +1 -0
- data/lib/split/goals_collection.rb +1 -0
- data/lib/split/helper.rb +26 -7
- data/lib/split/metric.rb +2 -1
- data/lib/split/persistence/cookie_adapter.rb +6 -1
- data/lib/split/persistence/redis_adapter.rb +5 -0
- data/lib/split/persistence/session_adapter.rb +1 -0
- data/lib/split/persistence.rb +4 -2
- data/lib/split/redis_interface.rb +8 -28
- data/lib/split/trial.rb +20 -10
- data/lib/split/user.rb +15 -3
- data/lib/split/version.rb +2 -4
- data/lib/split/zscore.rb +1 -0
- data/lib/split.rb +9 -3
- data/spec/alternative_spec.rb +1 -1
- data/spec/cache_spec.rb +88 -0
- data/spec/configuration_spec.rb +17 -15
- data/spec/dashboard_spec.rb +45 -5
- data/spec/encapsulated_helper_spec.rb +1 -1
- data/spec/experiment_spec.rb +78 -13
- data/spec/goals_collection_spec.rb +1 -1
- data/spec/helper_spec.rb +68 -32
- data/spec/persistence/cookie_adapter_spec.rb +1 -1
- data/spec/persistence/redis_adapter_spec.rb +9 -0
- data/spec/redis_interface_spec.rb +0 -69
- data/spec/spec_helper.rb +5 -6
- data/spec/trial_spec.rb +45 -19
- data/spec/user_spec.rb +34 -3
- data/split.gemspec +7 -7
- metadata +27 -35
- data/.travis.yml +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6b66f4b21c4201228d9622d5e00ff2a2e957714edfce11316316a2ca3e405ce
|
4
|
+
data.tar.gz: 6a441cf39a14ef9e36b805e7728f34029db7f7d1e1e90f3389168942b7b77f60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc46df4b6f301b8bdaf99ba4648f7363ad2c1234b3be7586e078b9772fec9a2bae3c9e15335c0c207e88c45113a1348a0dcd608a9dcfee654846753ba59c6696
|
7
|
+
data.tar.gz: 53dffc60d0f0617f1a1e943170f7702eff6ec5d00381b9d3b19380ef50aaef4c76956974a94a645bfb288eddd75486f24c2c2d3c56e7465f85f68791f1aeda31
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
open_collective: split
|
@@ -0,0 +1,71 @@
|
|
1
|
+
name: split
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
include:
|
10
|
+
- gemfile: 5.2.gemfile
|
11
|
+
ruby: 2.5
|
12
|
+
|
13
|
+
- gemfile: 5.2.gemfile
|
14
|
+
ruby: 2.6
|
15
|
+
|
16
|
+
- gemfile: 5.2.gemfile
|
17
|
+
ruby: 2.7
|
18
|
+
|
19
|
+
- gemfile: 6.0.gemfile
|
20
|
+
ruby: 2.5
|
21
|
+
|
22
|
+
- gemfile: 6.0.gemfile
|
23
|
+
ruby: 2.6
|
24
|
+
|
25
|
+
- gemfile: 6.0.gemfile
|
26
|
+
ruby: 2.7
|
27
|
+
|
28
|
+
- gemfile: 6.0.gemfile
|
29
|
+
ruby: '3.0'
|
30
|
+
|
31
|
+
- gemfile: 6.1.gemfile
|
32
|
+
ruby: '3.0'
|
33
|
+
|
34
|
+
- gemfile: 7.0.gemfile
|
35
|
+
ruby: '3.0'
|
36
|
+
|
37
|
+
# - gemfile: 7.0.gemfile
|
38
|
+
# ruby: '3.1'
|
39
|
+
|
40
|
+
|
41
|
+
runs-on: ubuntu-latest
|
42
|
+
|
43
|
+
services:
|
44
|
+
redis:
|
45
|
+
image: redis
|
46
|
+
ports: ['6379:6379']
|
47
|
+
options: >-
|
48
|
+
--health-cmd "redis-cli ping"
|
49
|
+
--health-interval 10s
|
50
|
+
--health-timeout 5s
|
51
|
+
--health-retries 5
|
52
|
+
|
53
|
+
steps:
|
54
|
+
- uses: actions/checkout@v2
|
55
|
+
|
56
|
+
- uses: ruby/setup-ruby@v1
|
57
|
+
with:
|
58
|
+
ruby-version: ${{ matrix.ruby }}
|
59
|
+
|
60
|
+
- name: Install dependencies
|
61
|
+
run: |
|
62
|
+
bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}"
|
63
|
+
bundle install --jobs 4 --retry 3
|
64
|
+
|
65
|
+
- name: Display Ruby version
|
66
|
+
run: ruby -v
|
67
|
+
|
68
|
+
- name: Test
|
69
|
+
run: bundle exec rspec
|
70
|
+
env:
|
71
|
+
REDIS_URL: redis:6379
|
data/.rubocop.yml
CHANGED
@@ -1,7 +1,183 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
3
|
AllCops:
|
4
|
+
TargetRubyVersion: 2.5
|
5
|
+
DisabledByDefault: true
|
4
6
|
Exclude:
|
5
7
|
- 'Appraisals'
|
6
8
|
- 'gemfiles/**/*'
|
7
|
-
- 'spec/**/*.rb'
|
9
|
+
- 'spec/**/*.rb'
|
10
|
+
|
11
|
+
Style/AndOr:
|
12
|
+
Enabled: true
|
13
|
+
|
14
|
+
Layout/CaseIndentation:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
Layout/ClosingHeredocIndentation:
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
Layout/CommentIndentation:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Layout/ElseAlignment:
|
24
|
+
Enabled: true
|
25
|
+
|
26
|
+
Layout/EndAlignment:
|
27
|
+
Enabled: true
|
28
|
+
EnforcedStyleAlignWith: variable
|
29
|
+
AutoCorrect: true
|
30
|
+
|
31
|
+
Layout/EmptyLineAfterMagicComment:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Layout/EmptyLinesAroundAccessModifier:
|
35
|
+
Enabled: true
|
36
|
+
EnforcedStyle: only_before
|
37
|
+
|
38
|
+
Layout/EmptyLinesAroundBlockBody:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
Layout/EmptyLinesAroundClassBody:
|
42
|
+
Enabled: true
|
43
|
+
|
44
|
+
Layout/EmptyLinesAroundMethodBody:
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Layout/EmptyLinesAroundModuleBody:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Style/HashSyntax:
|
51
|
+
Enabled: true
|
52
|
+
|
53
|
+
Layout/FirstArgumentIndentation:
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Layout/IndentationConsistency:
|
57
|
+
Enabled: true
|
58
|
+
EnforcedStyle: indented_internal_methods
|
59
|
+
|
60
|
+
Layout/IndentationWidth:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Layout/LeadingCommentSpace:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Layout/SpaceAfterColon:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Layout/SpaceAfterComma:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Layout/SpaceAfterSemicolon:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Layout/SpaceAroundKeyword:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Layout/SpaceBeforeComma:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Layout/SpaceBeforeComment:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Layout/SpaceBeforeFirstArg:
|
88
|
+
Enabled: true
|
89
|
+
|
90
|
+
Style/DefWithParentheses:
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
Style/MethodDefParentheses:
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
Style/FrozenStringLiteralComment:
|
97
|
+
Enabled: true
|
98
|
+
EnforcedStyle: always
|
99
|
+
|
100
|
+
Style/RedundantFreeze:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
Layout/SpaceBeforeBlockBraces:
|
104
|
+
Enabled: true
|
105
|
+
|
106
|
+
Layout/SpaceInsideBlockBraces:
|
107
|
+
Enabled: true
|
108
|
+
EnforcedStyleForEmptyBraces: space
|
109
|
+
|
110
|
+
Layout/SpaceInsideHashLiteralBraces:
|
111
|
+
Enabled: true
|
112
|
+
|
113
|
+
Layout/SpaceInsideParens:
|
114
|
+
Enabled: true
|
115
|
+
|
116
|
+
Style/StringLiterals:
|
117
|
+
Enabled: false
|
118
|
+
EnforcedStyle: double_quotes
|
119
|
+
|
120
|
+
Layout/IndentationStyle:
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
Layout/TrailingEmptyLines:
|
124
|
+
Enabled: true
|
125
|
+
|
126
|
+
Layout/TrailingWhitespace:
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
Style/RedundantPercentQ:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
Lint/AmbiguousOperator:
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Lint/AmbiguousRegexpLiteral:
|
136
|
+
Enabled: true
|
137
|
+
|
138
|
+
Lint/ErbNewArguments:
|
139
|
+
Enabled: true
|
140
|
+
|
141
|
+
Lint/RequireParentheses:
|
142
|
+
Enabled: true
|
143
|
+
|
144
|
+
Lint/ShadowingOuterLocalVariable:
|
145
|
+
Enabled: true
|
146
|
+
|
147
|
+
Lint/RedundantStringCoercion:
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
Lint/UriEscapeUnescape:
|
151
|
+
Enabled: true
|
152
|
+
|
153
|
+
Lint/UselessAssignment:
|
154
|
+
Enabled: true
|
155
|
+
|
156
|
+
Lint/DeprecatedClassMethods:
|
157
|
+
Enabled: true
|
158
|
+
|
159
|
+
Style/ParenthesesAroundCondition:
|
160
|
+
Enabled: true
|
161
|
+
|
162
|
+
Style/HashTransformKeys:
|
163
|
+
Enabled: true
|
164
|
+
|
165
|
+
Style/HashTransformValues:
|
166
|
+
Enabled: true
|
167
|
+
|
168
|
+
Style/RedundantBegin:
|
169
|
+
Enabled: true
|
170
|
+
|
171
|
+
Style/RedundantReturn:
|
172
|
+
Enabled: true
|
173
|
+
AllowMultipleReturnValues: true
|
174
|
+
|
175
|
+
Style/Semicolon:
|
176
|
+
Enabled: true
|
177
|
+
AllowAsExpressionSeparator: true
|
178
|
+
|
179
|
+
Style/ColonMethodCall:
|
180
|
+
Enabled: true
|
181
|
+
|
182
|
+
Style/TrivialAccessors:
|
183
|
+
Enabled: true
|