split 4.0.1 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +8 -3
  3. data/.rubocop.yml +2 -5
  4. data/CHANGELOG.md +38 -0
  5. data/CONTRIBUTING.md +1 -1
  6. data/Gemfile +1 -1
  7. data/README.md +11 -3
  8. data/Rakefile +4 -5
  9. data/gemfiles/5.2.gemfile +1 -3
  10. data/gemfiles/6.0.gemfile +1 -3
  11. data/gemfiles/6.1.gemfile +1 -3
  12. data/gemfiles/7.0.gemfile +1 -3
  13. data/lib/split/algorithms/block_randomization.rb +5 -6
  14. data/lib/split/algorithms/whiplash.rb +16 -18
  15. data/lib/split/algorithms.rb +14 -0
  16. data/lib/split/alternative.rb +21 -22
  17. data/lib/split/cache.rb +0 -1
  18. data/lib/split/combined_experiments_helper.rb +4 -4
  19. data/lib/split/configuration.rb +83 -84
  20. data/lib/split/dashboard/helpers.rb +6 -7
  21. data/lib/split/dashboard/pagination_helpers.rb +53 -54
  22. data/lib/split/dashboard/public/style.css +5 -2
  23. data/lib/split/dashboard/views/_experiment.erb +2 -1
  24. data/lib/split/dashboard/views/index.erb +19 -4
  25. data/lib/split/dashboard.rb +29 -23
  26. data/lib/split/encapsulated_helper.rb +4 -6
  27. data/lib/split/experiment.rb +93 -88
  28. data/lib/split/experiment_catalog.rb +6 -5
  29. data/lib/split/extensions/string.rb +1 -1
  30. data/lib/split/goals_collection.rb +8 -10
  31. data/lib/split/helper.rb +20 -20
  32. data/lib/split/metric.rb +4 -5
  33. data/lib/split/persistence/cookie_adapter.rb +44 -47
  34. data/lib/split/persistence/dual_adapter.rb +7 -8
  35. data/lib/split/persistence/redis_adapter.rb +3 -4
  36. data/lib/split/persistence/session_adapter.rb +0 -2
  37. data/lib/split/persistence.rb +4 -4
  38. data/lib/split/redis_interface.rb +7 -1
  39. data/lib/split/trial.rb +23 -24
  40. data/lib/split/user.rb +12 -13
  41. data/lib/split/version.rb +1 -1
  42. data/lib/split/zscore.rb +1 -3
  43. data/lib/split.rb +26 -25
  44. data/spec/algorithms/block_randomization_spec.rb +6 -5
  45. data/spec/algorithms/weighted_sample_spec.rb +6 -5
  46. data/spec/algorithms/whiplash_spec.rb +4 -5
  47. data/spec/alternative_spec.rb +35 -36
  48. data/spec/cache_spec.rb +15 -19
  49. data/spec/combined_experiments_helper_spec.rb +18 -17
  50. data/spec/configuration_spec.rb +32 -38
  51. data/spec/dashboard/pagination_helpers_spec.rb +69 -67
  52. data/spec/dashboard/paginator_spec.rb +10 -9
  53. data/spec/dashboard_helpers_spec.rb +19 -18
  54. data/spec/dashboard_spec.rb +79 -35
  55. data/spec/encapsulated_helper_spec.rb +12 -14
  56. data/spec/experiment_catalog_spec.rb +14 -13
  57. data/spec/experiment_spec.rb +132 -123
  58. data/spec/goals_collection_spec.rb +17 -15
  59. data/spec/helper_spec.rb +415 -382
  60. data/spec/metric_spec.rb +14 -14
  61. data/spec/persistence/cookie_adapter_spec.rb +23 -8
  62. data/spec/persistence/dual_adapter_spec.rb +71 -71
  63. data/spec/persistence/redis_adapter_spec.rb +28 -29
  64. data/spec/persistence/session_adapter_spec.rb +2 -3
  65. data/spec/persistence_spec.rb +1 -2
  66. data/spec/redis_interface_spec.rb +26 -14
  67. data/spec/spec_helper.rb +16 -13
  68. data/spec/split_spec.rb +11 -11
  69. data/spec/support/cookies_mock.rb +1 -2
  70. data/spec/trial_spec.rb +61 -60
  71. data/spec/user_spec.rb +36 -36
  72. data/split.gemspec +21 -20
  73. metadata +25 -14
  74. data/.rubocop_todo.yml +0 -226
  75. data/Appraisals +0 -19
  76. data/gemfiles/5.0.gemfile +0 -9
  77. data/gemfiles/5.1.gemfile +0 -9
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: split
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-30 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.3.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: matrix
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +100,14 @@ dependencies:
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '1.1'
103
+ version: '2.0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '1.1'
110
+ version: '2.0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rake
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +164,7 @@ dependencies:
150
164
  - - ">="
151
165
  - !ruby/object:Gem::Version
152
166
  version: '5.0'
153
- description:
167
+ description:
154
168
  email:
155
169
  - andrewnez@gmail.com
156
170
  executables: []
@@ -168,8 +182,6 @@ files:
168
182
  - ".gitignore"
169
183
  - ".rspec"
170
184
  - ".rubocop.yml"
171
- - ".rubocop_todo.yml"
172
- - Appraisals
173
185
  - CHANGELOG.md
174
186
  - CODE_OF_CONDUCT.md
175
187
  - CONTRIBUTING.md
@@ -177,13 +189,12 @@ files:
177
189
  - LICENSE
178
190
  - README.md
179
191
  - Rakefile
180
- - gemfiles/5.0.gemfile
181
- - gemfiles/5.1.gemfile
182
192
  - gemfiles/5.2.gemfile
183
193
  - gemfiles/6.0.gemfile
184
194
  - gemfiles/6.1.gemfile
185
195
  - gemfiles/7.0.gemfile
186
196
  - lib/split.rb
197
+ - lib/split/algorithms.rb
187
198
  - lib/split/algorithms/block_randomization.rb
188
199
  - lib/split/algorithms/weighted_sample.rb
189
200
  - lib/split/algorithms/whiplash.rb
@@ -258,12 +269,12 @@ licenses:
258
269
  - MIT
259
270
  metadata:
260
271
  homepage_uri: https://github.com/splitrb/split
261
- changelog_uri: https://github.com/splitrb/split/blob/master/CHANGELOG.md
272
+ changelog_uri: https://github.com/splitrb/split/blob/main/CHANGELOG.md
262
273
  source_code_uri: https://github.com/splitrb/split
263
274
  bug_tracker_uri: https://github.com/splitrb/split/issues
264
275
  wiki_uri: https://github.com/splitrb/split/wiki
265
276
  mailing_list_uri: https://groups.google.com/d/forum/split-ruby
266
- post_install_message:
277
+ post_install_message:
267
278
  rdoc_options: []
268
279
  require_paths:
269
280
  - lib
@@ -278,8 +289,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
278
289
  - !ruby/object:Gem::Version
279
290
  version: 2.0.0
280
291
  requirements: []
281
- rubygems_version: 3.2.27
282
- signing_key:
292
+ rubygems_version: 3.1.6
293
+ signing_key:
283
294
  specification_version: 4
284
295
  summary: Rack based split testing framework
285
296
  test_files:
data/.rubocop_todo.yml DELETED
@@ -1,226 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2020-07-05 01:43:26 UTC using RuboCop version 0.86.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Cop supports --auto-correct.
11
- Layout/CommentIndentation:
12
- Exclude:
13
- - 'lib/split/experiment.rb'
14
-
15
- # Offense count: 1
16
- # Cop supports --auto-correct.
17
- Layout/ElseAlignment:
18
- Exclude:
19
- - 'lib/split/experiment.rb'
20
-
21
- # Offense count: 14
22
- # Cop supports --auto-correct.
23
- # Configuration parameters: EnforcedStyle.
24
- # SupportedStyles: around, only_before
25
- Layout/EmptyLinesAroundAccessModifier:
26
- Exclude:
27
- - 'lib/split/algorithms/block_randomization.rb'
28
- - 'lib/split/algorithms/whiplash.rb'
29
- - 'lib/split/alternative.rb'
30
- - 'lib/split/configuration.rb'
31
- - 'lib/split/dashboard/pagination_helpers.rb'
32
- - 'lib/split/encapsulated_helper.rb'
33
- - 'lib/split/experiment.rb'
34
- - 'lib/split/goals_collection.rb'
35
- - 'lib/split/persistence/cookie_adapter.rb'
36
- - 'lib/split/persistence/dual_adapter.rb'
37
- - 'lib/split/redis_interface.rb'
38
- - 'lib/split/trial.rb'
39
- - 'lib/split/user.rb'
40
-
41
- # Offense count: 8
42
- # Cop supports --auto-correct.
43
- # Configuration parameters: EnforcedStyle.
44
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
45
- Layout/EmptyLinesAroundClassBody:
46
- Exclude:
47
- - 'lib/split/experiment_catalog.rb'
48
- - 'lib/split/goals_collection.rb'
49
- - 'lib/split/metric.rb'
50
- - 'lib/split/persistence/cookie_adapter.rb'
51
- - 'lib/split/persistence/redis_adapter.rb'
52
- - 'lib/split/persistence/session_adapter.rb'
53
- - 'lib/split/zscore.rb'
54
-
55
- # Offense count: 2
56
- # Cop supports --auto-correct.
57
- Layout/EmptyLinesAroundMethodBody:
58
- Exclude:
59
- - 'lib/split/dashboard/helpers.rb'
60
- - 'lib/split/zscore.rb'
61
-
62
- # Offense count: 1
63
- # Cop supports --auto-correct.
64
- # Configuration parameters: EnforcedStyle.
65
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
66
- Layout/EmptyLinesAroundModuleBody:
67
- Exclude:
68
- - 'lib/split/encapsulated_helper.rb'
69
-
70
- # Offense count: 4
71
- # Cop supports --auto-correct.
72
- # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
73
- # SupportedStylesAlignWith: keyword, variable, start_of_line
74
- Layout/EndAlignment:
75
- Exclude:
76
- - 'lib/split/configuration.rb'
77
- - 'lib/split/experiment.rb'
78
- - 'lib/split/trial.rb'
79
-
80
- # Offense count: 17
81
- # Cop supports --auto-correct.
82
- # Configuration parameters: Width, IgnoredPatterns.
83
- Layout/IndentationWidth:
84
- Exclude:
85
- - 'lib/split/algorithms/block_randomization.rb'
86
- - 'lib/split/algorithms/whiplash.rb'
87
- - 'lib/split/alternative.rb'
88
- - 'lib/split/configuration.rb'
89
- - 'lib/split/dashboard/pagination_helpers.rb'
90
- - 'lib/split/encapsulated_helper.rb'
91
- - 'lib/split/experiment.rb'
92
- - 'lib/split/goals_collection.rb'
93
- - 'lib/split/persistence/cookie_adapter.rb'
94
- - 'lib/split/persistence/dual_adapter.rb'
95
- - 'lib/split/redis_interface.rb'
96
- - 'lib/split/trial.rb'
97
- - 'lib/split/user.rb'
98
-
99
- # Offense count: 4
100
- # Cop supports --auto-correct.
101
- # Configuration parameters: EnforcedStyle.
102
- # SupportedStyles: space, no_space
103
- Layout/SpaceAroundEqualsInParameterDefault:
104
- Exclude:
105
- - 'lib/split/goals_collection.rb'
106
- - 'lib/split/persistence/dual_adapter.rb'
107
- - 'lib/split/persistence/redis_adapter.rb'
108
- - 'lib/split/user.rb'
109
-
110
- # Offense count: 15
111
- # Cop supports --auto-correct.
112
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
113
- # SupportedStyles: space, no_space
114
- # SupportedStylesForEmptyBraces: space, no_space
115
- Layout/SpaceBeforeBlockBraces:
116
- Exclude:
117
- - 'lib/split/configuration.rb'
118
- - 'lib/split/experiment.rb'
119
- - 'lib/split/experiment_catalog.rb'
120
- - 'lib/split/helper.rb'
121
- - 'lib/split/trial.rb'
122
-
123
- # Offense count: 35
124
- # Cop supports --auto-correct.
125
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
126
- # SupportedStyles: space, no_space
127
- # SupportedStylesForEmptyBraces: space, no_space
128
- Layout/SpaceInsideBlockBraces:
129
- Exclude:
130
- - 'lib/split.rb'
131
- - 'lib/split/configuration.rb'
132
- - 'lib/split/experiment.rb'
133
- - 'lib/split/experiment_catalog.rb'
134
- - 'lib/split/helper.rb'
135
- - 'lib/split/trial.rb'
136
- - 'lib/split/user.rb'
137
-
138
- # Offense count: 10
139
- # Cop supports --auto-correct.
140
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
141
- # SupportedStyles: space, no_space, compact
142
- # SupportedStylesForEmptyBraces: space, no_space
143
- Layout/SpaceInsideHashLiteralBraces:
144
- Exclude:
145
- - 'lib/split/experiment.rb'
146
- - 'lib/split/helper.rb'
147
- - 'lib/split/persistence/redis_adapter.rb'
148
-
149
- # Offense count: 1
150
- # Cop supports --auto-correct.
151
- # Configuration parameters: EnforcedStyle.
152
- # SupportedStyles: final_newline, final_blank_line
153
- Layout/TrailingEmptyLines:
154
- Exclude:
155
- - 'Rakefile'
156
-
157
- # Offense count: 3
158
- # Cop supports --auto-correct.
159
- # Configuration parameters: AllowInHeredoc.
160
- Layout/TrailingWhitespace:
161
- Exclude:
162
- - 'lib/split/helper.rb'
163
-
164
- # Offense count: 1
165
- Lint/UselessAssignment:
166
- Exclude:
167
- - 'lib/split/goals_collection.rb'
168
-
169
- # Offense count: 1
170
- # Cop supports --auto-correct.
171
- # Configuration parameters: EnforcedStyle.
172
- # SupportedStyles: always, conditionals
173
- Style/AndOr:
174
- Exclude:
175
- - 'lib/split/experiment_catalog.rb'
176
-
177
- # Offense count: 1
178
- # Cop supports --auto-correct.
179
- Style/ColonMethodCall:
180
- Exclude:
181
- - 'lib/split/combined_experiments_helper.rb'
182
-
183
- # Offense count: 1
184
- # Cop supports --auto-correct.
185
- Style/DefWithParentheses:
186
- Exclude:
187
- - 'lib/split/helper.rb'
188
-
189
- # Offense count: 23
190
- # Cop supports --auto-correct.
191
- # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
192
- # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
193
- Style/HashSyntax:
194
- Exclude:
195
- - 'Rakefile'
196
- - 'lib/split/experiment.rb'
197
- - 'lib/split/experiment_catalog.rb'
198
- - 'lib/split/helper.rb'
199
- - 'lib/split/metric.rb'
200
- - 'lib/split/persistence.rb'
201
- - 'lib/split/persistence/redis_adapter.rb'
202
-
203
- # Offense count: 1
204
- # Cop supports --auto-correct.
205
- # Configuration parameters: EnforcedStyle.
206
- # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
207
- Style/MethodDefParentheses:
208
- Exclude:
209
- - 'lib/split/configuration.rb'
210
-
211
- # Offense count: 9
212
- # Cop supports --auto-correct.
213
- # Configuration parameters: AllowMultipleReturnValues.
214
- Style/RedundantReturn:
215
- Exclude:
216
- - 'lib/split/alternative.rb'
217
- - 'lib/split/experiment.rb'
218
- - 'lib/split/helper.rb'
219
- - 'lib/split/zscore.rb'
220
-
221
- # Offense count: 258
222
- # Cop supports --auto-correct.
223
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
224
- # SupportedStyles: single_quotes, double_quotes
225
- Style/StringLiterals:
226
- Enabled: false
data/Appraisals DELETED
@@ -1,19 +0,0 @@
1
- appraise "4.2" do
2
- gem "rails", "~> 4.2"
3
- end
4
-
5
- appraise "5.0" do
6
- gem "rails", "~> 5.0"
7
- end
8
-
9
- appraise "5.1" do
10
- gem "rails", "~> 5.1"
11
- end
12
-
13
- appraise "5.2" do
14
- gem "rails", "~> 5.2"
15
- end
16
-
17
- appraise "6.0" do
18
- gem 'rails', '~> 6.0'
19
- end
data/gemfiles/5.0.gemfile DELETED
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "codeclimate-test-reporter"
7
- gem "rails", "~> 5.0"
8
-
9
- gemspec path: "../"
data/gemfiles/5.1.gemfile DELETED
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "codeclimate-test-reporter"
7
- gem "rails", "~> 5.1"
8
-
9
- gemspec path: "../"