split 3.4.1 → 4.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.rubocop.yml +177 -1
  4. data/.rubocop_todo.yml +40 -493
  5. data/.travis.yml +14 -42
  6. data/CHANGELOG.md +35 -0
  7. data/Gemfile +1 -0
  8. data/README.md +19 -1
  9. data/Rakefile +1 -0
  10. data/lib/split.rb +8 -2
  11. data/lib/split/algorithms/block_randomization.rb +1 -0
  12. data/lib/split/algorithms/weighted_sample.rb +2 -1
  13. data/lib/split/algorithms/whiplash.rb +3 -2
  14. data/lib/split/alternative.rb +1 -0
  15. data/lib/split/cache.rb +28 -0
  16. data/lib/split/combined_experiments_helper.rb +1 -0
  17. data/lib/split/configuration.rb +6 -12
  18. data/lib/split/dashboard.rb +17 -2
  19. data/lib/split/dashboard/helpers.rb +1 -0
  20. data/lib/split/dashboard/pagination_helpers.rb +1 -0
  21. data/lib/split/dashboard/paginator.rb +1 -0
  22. data/lib/split/dashboard/public/dashboard.js +10 -0
  23. data/lib/split/dashboard/public/style.css +5 -0
  24. data/lib/split/dashboard/views/_controls.erb +13 -0
  25. data/lib/split/encapsulated_helper.rb +3 -2
  26. data/lib/split/engine.rb +1 -0
  27. data/lib/split/exceptions.rb +1 -0
  28. data/lib/split/experiment.rb +81 -59
  29. data/lib/split/experiment_catalog.rb +1 -3
  30. data/lib/split/extensions/string.rb +1 -0
  31. data/lib/split/goals_collection.rb +1 -0
  32. data/lib/split/helper.rb +26 -7
  33. data/lib/split/metric.rb +2 -1
  34. data/lib/split/persistence.rb +4 -2
  35. data/lib/split/persistence/cookie_adapter.rb +1 -0
  36. data/lib/split/persistence/redis_adapter.rb +5 -0
  37. data/lib/split/persistence/session_adapter.rb +1 -0
  38. data/lib/split/redis_interface.rb +8 -28
  39. data/lib/split/trial.rb +20 -10
  40. data/lib/split/user.rb +14 -2
  41. data/lib/split/version.rb +2 -4
  42. data/lib/split/zscore.rb +1 -0
  43. data/spec/alternative_spec.rb +1 -1
  44. data/spec/cache_spec.rb +88 -0
  45. data/spec/configuration_spec.rb +1 -14
  46. data/spec/dashboard_spec.rb +45 -5
  47. data/spec/encapsulated_helper_spec.rb +1 -1
  48. data/spec/experiment_spec.rb +78 -7
  49. data/spec/goals_collection_spec.rb +1 -1
  50. data/spec/helper_spec.rb +68 -32
  51. data/spec/persistence/cookie_adapter_spec.rb +1 -1
  52. data/spec/persistence/redis_adapter_spec.rb +9 -0
  53. data/spec/redis_interface_spec.rb +0 -69
  54. data/spec/spec_helper.rb +5 -6
  55. data/spec/trial_spec.rb +45 -19
  56. data/spec/user_spec.rb +17 -0
  57. data/split.gemspec +7 -7
  58. metadata +23 -34
  59. data/gemfiles/4.2.gemfile +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c51ebd6a368635471d5c3f820488065669ac7dc1ad7ed7eba61f2c4154ca42b7
4
- data.tar.gz: 7fabe9a63a07037b144b91a11c89675d48a6ec9a5883e47bf8193584c461d003
3
+ metadata.gz: 1a8ee5e18e49d1020baf846f2e2403d9f54705c551690335e4898c43cffb93b9
4
+ data.tar.gz: 84db3159654293b4cda8905138f9bb0dbb0b8ba4e130580eb6758d74e3d70873
5
5
  SHA512:
6
- metadata.gz: 49c32cc9c769184b79716956046604e8f63de0fba0a87036f6cf2809803e74c376887db47e3a472d9b5acfb5172eb5d0bcea1c700bf74f799a5d259e0cf3dd49
7
- data.tar.gz: b930240fd33d85f594fef51f756100f925581fc1ead0dd910a1a51417362c68ab03aea6adbb1b50076db78114a1bc842fd2cd2d4a9462b9d50aa43c25b166df8
6
+ metadata.gz: 846c82ad7655d028ab719c85d3bc1589453f55adbc0bae011f1b4f4c28d478f121dc1905b3d4b5d81a39b7884d5e7c20ba7d06bf6bdb7d5216b5b07974587031
7
+ data.tar.gz: ca6166dc4dec2102ba82c80f4cb73308a9b4e87785276f4bb63ef5e702b55e2cc71146a537fd1306005aad2f77916c096484812f85bc90887400ca280a73a4b1
@@ -0,0 +1 @@
1
+ open_collective: split
@@ -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
@@ -1,92 +1,43 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-10-21 18:09:14 -0300 using RuboCop version 0.75.1.
3
+ # on 2020-07-05 01:43:26 UTC using RuboCop version 0.86.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 4
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
12
- # Include: **/*.gemspec
13
- Gemspec/OrderedDependencies:
14
- Exclude:
15
- - 'split.gemspec'
16
-
17
- # Offense count: 1
18
- # Configuration parameters: Include.
19
- # Include: **/*.gemspec,
20
- Gemspec/RequiredRubyVersion:
21
- Exclude:
22
- - 'split.gemspec'
23
-
24
- # Offense count: 2
25
- # Cop supports --auto-correct.
26
- # Configuration parameters: EnforcedStyle, IndentationWidth.
27
- # SupportedStyles: with_first_argument, with_fixed_indentation
28
- Layout/AlignArguments:
29
- Exclude:
30
- - 'lib/split.rb'
31
- - 'lib/split/experiment_catalog.rb'
32
-
33
- # Offense count: 3
34
- # Cop supports --auto-correct.
35
- # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
36
- # SupportedHashRocketStyles: key, separator, table
37
- # SupportedColonStyles: key, separator, table
38
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
39
- Layout/AlignHash:
40
- Exclude:
41
- - 'lib/split/helper.rb'
42
-
43
9
  # Offense count: 1
44
10
  # Cop supports --auto-correct.
45
11
  Layout/CommentIndentation:
46
12
  Exclude:
47
13
  - 'lib/split/experiment.rb'
48
14
 
49
- # Offense count: 5
15
+ # Offense count: 1
50
16
  # Cop supports --auto-correct.
51
17
  Layout/ElseAlignment:
52
18
  Exclude:
53
- - 'lib/split.rb'
54
- - 'lib/split/helper.rb'
55
- - 'lib/split/trial.rb'
19
+ - 'lib/split/experiment.rb'
56
20
 
57
- # Offense count: 20
21
+ # Offense count: 14
58
22
  # Cop supports --auto-correct.
59
- Layout/EmptyLineAfterGuardClause:
23
+ # Configuration parameters: EnforcedStyle.
24
+ # SupportedStyles: around, only_before
25
+ Layout/EmptyLinesAroundAccessModifier:
60
26
  Exclude:
61
- - 'lib/split.rb'
62
- - 'lib/split/algorithms/weighted_sample.rb'
27
+ - 'lib/split/algorithms/block_randomization.rb'
28
+ - 'lib/split/algorithms/whiplash.rb'
63
29
  - 'lib/split/alternative.rb'
64
- - 'lib/split/combined_experiments_helper.rb'
65
30
  - 'lib/split/configuration.rb'
31
+ - 'lib/split/dashboard/pagination_helpers.rb'
32
+ - 'lib/split/encapsulated_helper.rb'
66
33
  - 'lib/split/experiment.rb'
67
- - 'lib/split/experiment_catalog.rb'
68
34
  - 'lib/split/goals_collection.rb'
69
- - 'lib/split/helper.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'
70
39
  - 'lib/split/user.rb'
71
40
 
72
- # Offense count: 25
73
- # Cop supports --auto-correct.
74
- Layout/EmptyLineAfterMagicComment:
75
- Enabled: false
76
-
77
- # Offense count: 1
78
- # Cop supports --auto-correct.
79
- # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
80
- Layout/EmptyLineBetweenDefs:
81
- Exclude:
82
- - 'lib/split/helper.rb'
83
-
84
- # Offense count: 1
85
- # Cop supports --auto-correct.
86
- Layout/EmptyLines:
87
- Exclude:
88
- - 'lib/split/helper.rb'
89
-
90
41
  # Offense count: 8
91
42
  # Cop supports --auto-correct.
92
43
  # Configuration parameters: EnforcedStyle.
@@ -116,55 +67,36 @@ Layout/EmptyLinesAroundModuleBody:
116
67
  Exclude:
117
68
  - 'lib/split/encapsulated_helper.rb'
118
69
 
119
- # Offense count: 3
70
+ # Offense count: 4
120
71
  # Cop supports --auto-correct.
121
72
  # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
122
73
  # SupportedStylesAlignWith: keyword, variable, start_of_line
123
74
  Layout/EndAlignment:
124
75
  Exclude:
125
- - 'lib/split.rb'
126
- - 'lib/split/helper.rb'
127
- - 'lib/split/trial.rb'
128
-
129
- # Offense count: 4
130
- # Cop supports --auto-correct.
131
- # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
132
- Layout/ExtraSpacing:
133
- Exclude:
134
- - 'lib/split/algorithms/whiplash.rb'
135
- - 'lib/split/dashboard.rb'
136
- - 'lib/split/metric.rb'
76
+ - 'lib/split/configuration.rb'
77
+ - 'lib/split/experiment.rb'
137
78
  - 'lib/split/trial.rb'
138
79
 
139
- # Offense count: 2
140
- # Cop supports --auto-correct.
141
- # Configuration parameters: EnforcedStyle, IndentationWidth.
142
- # SupportedStyles: special_inside_parentheses, consistent, align_braces
143
- Layout/IndentFirstHashElement:
144
- Exclude:
145
- - 'split.gemspec'
146
-
147
- # Offense count: 3
80
+ # Offense count: 17
148
81
  # Cop supports --auto-correct.
149
82
  # Configuration parameters: Width, IgnoredPatterns.
150
83
  Layout/IndentationWidth:
151
84
  Exclude:
152
- - 'lib/split.rb'
153
- - 'lib/split/helper.rb'
154
- - 'lib/split/trial.rb'
155
-
156
- # Offense count: 10
157
- # Cop supports --auto-correct.
158
- Layout/SpaceAfterComma:
159
- Exclude:
160
- - 'lib/split/algorithms/weighted_sample.rb'
85
+ - 'lib/split/algorithms/block_randomization.rb'
86
+ - 'lib/split/algorithms/whiplash.rb'
87
+ - 'lib/split/alternative.rb'
161
88
  - 'lib/split/configuration.rb'
89
+ - 'lib/split/dashboard/pagination_helpers.rb'
162
90
  - 'lib/split/encapsulated_helper.rb'
163
91
  - 'lib/split/experiment.rb'
164
- - 'lib/split/metric.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'
165
97
  - 'lib/split/user.rb'
166
98
 
167
- # Offense count: 5
99
+ # Offense count: 4
168
100
  # Cop supports --auto-correct.
169
101
  # Configuration parameters: EnforcedStyle.
170
102
  # SupportedStyles: space, no_space
@@ -173,21 +105,9 @@ Layout/SpaceAroundEqualsInParameterDefault:
173
105
  - 'lib/split/goals_collection.rb'
174
106
  - 'lib/split/persistence/dual_adapter.rb'
175
107
  - 'lib/split/persistence/redis_adapter.rb'
176
- - 'lib/split/trial.rb'
177
108
  - 'lib/split/user.rb'
178
109
 
179
- # Offense count: 24
180
- # Cop supports --auto-correct.
181
- # Configuration parameters: AllowForAlignment.
182
- Layout/SpaceAroundOperators:
183
- Exclude:
184
- - 'lib/split/algorithms/whiplash.rb'
185
- - 'lib/split/alternative.rb'
186
- - 'lib/split/metric.rb'
187
- - 'lib/split/trial.rb'
188
- - 'lib/split/zscore.rb'
189
-
190
- # Offense count: 14
110
+ # Offense count: 15
191
111
  # Cop supports --auto-correct.
192
112
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
193
113
  # SupportedStyles: space, no_space
@@ -200,22 +120,14 @@ Layout/SpaceBeforeBlockBraces:
200
120
  - 'lib/split/helper.rb'
201
121
  - 'lib/split/trial.rb'
202
122
 
203
- # Offense count: 2
204
- # Cop supports --auto-correct.
205
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
206
- # SupportedStyles: space, no_space, compact
207
- # SupportedStylesForEmptyBrackets: space, no_space
208
- Layout/SpaceInsideArrayLiteralBrackets:
209
- Exclude:
210
- - 'lib/split/dashboard/helpers.rb'
211
-
212
- # Offense count: 31
123
+ # Offense count: 35
213
124
  # Cop supports --auto-correct.
214
125
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
215
126
  # SupportedStyles: space, no_space
216
127
  # SupportedStylesForEmptyBraces: space, no_space
217
128
  Layout/SpaceInsideBlockBraces:
218
129
  Exclude:
130
+ - 'lib/split.rb'
219
131
  - 'lib/split/configuration.rb'
220
132
  - 'lib/split/experiment.rb'
221
133
  - 'lib/split/experiment_catalog.rb'
@@ -238,109 +150,22 @@ Layout/SpaceInsideHashLiteralBraces:
238
150
  # Cop supports --auto-correct.
239
151
  # Configuration parameters: EnforcedStyle.
240
152
  # SupportedStyles: final_newline, final_blank_line
241
- Layout/TrailingBlankLines:
153
+ Layout/TrailingEmptyLines:
242
154
  Exclude:
243
155
  - 'Rakefile'
244
156
 
245
- # Offense count: 8
246
- # Configuration parameters: AllowSafeAssignment.
247
- Lint/AssignmentInCondition:
248
- Exclude:
249
- - 'lib/split/combined_experiments_helper.rb'
250
- - 'lib/split/configuration.rb'
251
- - 'lib/split/persistence/cookie_adapter.rb'
252
- - 'lib/split/persistence/dual_adapter.rb'
253
- - 'lib/split/persistence/redis_adapter.rb'
254
-
255
- # Offense count: 4
256
- # Cop supports --auto-correct.
257
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
258
- Lint/UnusedBlockArgument:
259
- Exclude:
260
- - 'lib/split/algorithms/block_randomization.rb'
261
- - 'lib/split/configuration.rb'
262
- - 'lib/split/engine.rb'
263
- - 'lib/split/metric.rb'
264
-
265
- # Offense count: 2
157
+ # Offense count: 3
266
158
  # Cop supports --auto-correct.
267
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
268
- Lint/UnusedMethodArgument:
159
+ # Configuration parameters: AllowInHeredoc.
160
+ Layout/TrailingWhitespace:
269
161
  Exclude:
270
- - 'lib/split/dashboard/helpers.rb'
271
- - 'lib/split/persistence/cookie_adapter.rb'
162
+ - 'lib/split/helper.rb'
272
163
 
273
164
  # Offense count: 1
274
165
  Lint/UselessAssignment:
275
166
  Exclude:
276
167
  - 'lib/split/goals_collection.rb'
277
168
 
278
- # Offense count: 19
279
- Metrics/AbcSize:
280
- Max: 47
281
-
282
- # Offense count: 3
283
- # Configuration parameters: CountComments.
284
- Metrics/ClassLength:
285
- Max: 377
286
-
287
- # Offense count: 6
288
- Metrics/CyclomaticComplexity:
289
- Max: 14
290
-
291
- # Offense count: 23
292
- # Configuration parameters: CountComments, ExcludedMethods.
293
- Metrics/MethodLength:
294
- Max: 66
295
-
296
- # Offense count: 1
297
- # Configuration parameters: CountComments.
298
- Metrics/ModuleLength:
299
- Max: 134
300
-
301
- # Offense count: 8
302
- Metrics/PerceivedComplexity:
303
- Max: 16
304
-
305
- # Offense count: 4
306
- Naming/AccessorMethodName:
307
- Exclude:
308
- - 'lib/split/alternative.rb'
309
- - 'lib/split/experiment.rb'
310
- - 'lib/split/persistence/cookie_adapter.rb'
311
-
312
- # Offense count: 1
313
- Naming/BinaryOperatorParameterName:
314
- Exclude:
315
- - 'lib/split/experiment.rb'
316
-
317
- # Offense count: 4
318
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
319
- # NamePrefix: is_, has_, have_
320
- # NamePrefixBlacklist: is_, has_, have_
321
- # NameWhitelist: is_a?
322
- # MethodDefinitionMacros: define_method, define_singleton_method
323
- Naming/PredicateName:
324
- Exclude:
325
- - 'spec/**/*'
326
- - 'lib/split/experiment.rb'
327
- - 'lib/split/helper.rb'
328
-
329
- # Offense count: 5
330
- # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
331
- # AllowedNames: io, id, to, by, on, in, at, ip, db
332
- Naming/UncommunicativeMethodParamName:
333
- Exclude:
334
- - 'lib/split/alternative.rb'
335
- - 'lib/split/zscore.rb'
336
-
337
- # Offense count: 6
338
- # Configuration parameters: EnforcedStyle.
339
- # SupportedStyles: snake_case, normalcase, non_integer
340
- Naming/VariableNumber:
341
- Exclude:
342
- - 'lib/split/zscore.rb'
343
-
344
169
  # Offense count: 1
345
170
  # Cop supports --auto-correct.
346
171
  # Configuration parameters: EnforcedStyle.
@@ -349,114 +174,25 @@ Style/AndOr:
349
174
  Exclude:
350
175
  - 'lib/split/experiment_catalog.rb'
351
176
 
352
- # Offense count: 2
353
- # Configuration parameters: AllowedChars.
354
- Style/AsciiComments:
355
- Exclude:
356
- - 'lib/split/zscore.rb'
357
-
358
- # Offense count: 4
359
- # Cop supports --auto-correct.
360
- # Configuration parameters: EnforcedStyle.
361
- # SupportedStyles: percent_q, bare_percent
362
- Style/BarePercentLiterals:
363
- Exclude:
364
- - 'lib/split/dashboard/pagination_helpers.rb'
365
-
366
- # Offense count: 8
367
- Style/CaseEquality:
368
- Exclude:
369
- - 'lib/split/alternative.rb'
370
- - 'lib/split/experiment_catalog.rb'
371
- - 'lib/split/helper.rb'
372
- - 'lib/split/metric.rb'
373
-
374
- # Offense count: 5
375
- # Cop supports --auto-correct.
376
- # Configuration parameters: EnforcedStyle.
377
- # SupportedStyles: is_a?, kind_of?
378
- Style/ClassCheck:
379
- Exclude:
380
- - 'lib/split/alternative.rb'
381
- - 'lib/split/configuration.rb'
382
- - 'lib/split/experiment.rb'
383
- - 'lib/split/goals_collection.rb'
384
- - 'lib/split/trial.rb'
385
-
386
177
  # Offense count: 1
387
178
  # Cop supports --auto-correct.
388
179
  Style/ColonMethodCall:
389
180
  Exclude:
390
181
  - 'lib/split/combined_experiments_helper.rb'
391
182
 
392
- # Offense count: 1
393
- # Cop supports --auto-correct.
394
- # Configuration parameters: Keywords.
395
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
396
- Style/CommentAnnotation:
397
- Exclude:
398
- - 'lib/split/configuration.rb'
399
-
400
- # Offense count: 2
401
- # Cop supports --auto-correct.
402
- # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
403
- # SupportedStyles: assign_to_condition, assign_inside_condition
404
- Style/ConditionalAssignment:
405
- Exclude:
406
- - 'lib/split/dashboard.rb'
407
- - 'lib/split/persistence/redis_adapter.rb'
408
-
409
183
  # Offense count: 1
410
184
  # Cop supports --auto-correct.
411
185
  Style/DefWithParentheses:
412
186
  Exclude:
413
187
  - 'lib/split/helper.rb'
414
188
 
415
- # Offense count: 29
416
- Style/Documentation:
417
- Enabled: false
418
-
419
- # Offense count: 3
420
- # Cop supports --auto-correct.
421
- # Configuration parameters: EnforcedStyle.
422
- # SupportedStyles: empty, nil, both
423
- Style/EmptyElse:
424
- Exclude:
425
- - 'lib/split/experiment.rb'
426
- - 'lib/split/metric.rb'
427
-
428
- # Offense count: 1
429
- # Cop supports --auto-correct.
430
- Style/Encoding:
431
- Exclude:
432
- - 'split.gemspec'
433
-
434
- # Offense count: 1
435
- # Cop supports --auto-correct.
436
- Style/ExpandPathArguments:
437
- Exclude:
438
- - 'split.gemspec'
439
-
440
- # Offense count: 13
441
- # Configuration parameters: MinBodyLength.
442
- Style/GuardClause:
443
- Exclude:
444
- - 'lib/split/alternative.rb'
445
- - 'lib/split/configuration.rb'
446
- - 'lib/split/experiment.rb'
447
- - 'lib/split/goals_collection.rb'
448
- - 'lib/split/helper.rb'
449
- - 'lib/split/persistence/dual_adapter.rb'
450
- - 'lib/split/trial.rb'
451
-
452
- # Offense count: 25
189
+ # Offense count: 23
453
190
  # Cop supports --auto-correct.
454
191
  # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
455
192
  # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
456
193
  Style/HashSyntax:
457
194
  Exclude:
458
195
  - 'Rakefile'
459
- - 'lib/split.rb'
460
196
  - 'lib/split/experiment.rb'
461
197
  - 'lib/split/experiment_catalog.rb'
462
198
  - 'lib/split/helper.rb'
@@ -464,24 +200,6 @@ Style/HashSyntax:
464
200
  - 'lib/split/persistence.rb'
465
201
  - 'lib/split/persistence/redis_adapter.rb'
466
202
 
467
- # Offense count: 4
468
- Style/IdenticalConditionalBranches:
469
- Exclude:
470
- - 'lib/split/configuration.rb'
471
- - 'lib/split/experiment.rb'
472
-
473
- # Offense count: 14
474
- # Cop supports --auto-correct.
475
- Style/IfUnlessModifier:
476
- Exclude:
477
- - 'lib/split/alternative.rb'
478
- - 'lib/split/experiment.rb'
479
- - 'lib/split/experiment_catalog.rb'
480
- - 'lib/split/goals_collection.rb'
481
- - 'lib/split/metric.rb'
482
- - 'lib/split/trial.rb'
483
- - 'lib/split/user.rb'
484
-
485
203
  # Offense count: 1
486
204
  # Cop supports --auto-correct.
487
205
  # Configuration parameters: EnforcedStyle.
@@ -490,190 +208,19 @@ Style/MethodDefParentheses:
490
208
  Exclude:
491
209
  - 'lib/split/configuration.rb'
492
210
 
493
- # Offense count: 1
494
- # Cop supports --auto-correct.
495
- # Configuration parameters: EnforcedStyle, Autocorrect.
496
- # SupportedStyles: module_function, extend_self
497
- Style/ModuleFunction:
498
- Exclude:
499
- - 'lib/split.rb'
500
-
501
- # Offense count: 1
502
- # Cop supports --auto-correct.
503
- # Configuration parameters: EnforcedStyle.
504
- # SupportedStyles: literals, strict
505
- Style/MutableConstant:
506
- Exclude:
507
- - 'lib/split/experiment.rb'
508
-
509
- # Offense count: 1
510
- # Cop supports --auto-correct.
511
- # Configuration parameters: EnforcedStyle.
512
- # SupportedStyles: both, prefix, postfix
513
- Style/NegatedIf:
514
- Exclude:
515
- - 'lib/split/user.rb'
516
-
517
- # Offense count: 1
518
- # Cop supports --auto-correct.
519
- # Configuration parameters: IncludeSemanticChanges.
520
- Style/NonNilCheck:
521
- Exclude:
522
- - 'lib/split/configuration.rb'
523
-
524
- # Offense count: 1
525
- # Cop supports --auto-correct.
526
- Style/Not:
527
- Exclude:
528
- - 'lib/split/experiment_catalog.rb'
529
-
530
- # Offense count: 2
531
- # Cop supports --auto-correct.
532
- # Configuration parameters: Strict.
533
- Style/NumericLiterals:
534
- MinDigits: 9
535
-
536
- # Offense count: 3
537
- # Cop supports --auto-correct.
538
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
539
- # SupportedStyles: predicate, comparison
540
- Style/NumericPredicate:
541
- Exclude:
542
- - 'spec/**/*'
543
- - 'lib/split/experiment.rb'
544
- - 'lib/split/trial.rb'
545
- - 'lib/split/user.rb'
546
-
547
- # Offense count: 2
548
- # Cop supports --auto-correct.
549
- Style/ParallelAssignment:
550
- Exclude:
551
- - 'lib/split/experiment_catalog.rb'
552
- - 'lib/split/persistence/cookie_adapter.rb'
553
-
554
- # Offense count: 1
555
- # Cop supports --auto-correct.
556
- # Configuration parameters: EnforcedStyle.
557
- # SupportedStyles: short, verbose
558
- Style/PreferredHashMethods:
559
- Exclude:
560
- - 'lib/split/configuration.rb'
561
-
562
- # Offense count: 2
563
- # Cop supports --auto-correct.
564
- # Configuration parameters: EnforcedStyle.
565
- # SupportedStyles: compact, exploded
566
- Style/RaiseArgs:
567
- Exclude:
568
- - 'lib/split/configuration.rb'
569
- - 'lib/split/experiment.rb'
570
-
571
- # Offense count: 6
572
- # Cop supports --auto-correct.
573
- Style/RedundantParentheses:
574
- Exclude:
575
- - 'lib/split/alternative.rb'
576
- - 'lib/split/zscore.rb'
577
-
578
- # Offense count: 11
211
+ # Offense count: 9
579
212
  # Cop supports --auto-correct.
580
213
  # Configuration parameters: AllowMultipleReturnValues.
581
214
  Style/RedundantReturn:
582
215
  Exclude:
583
216
  - 'lib/split/alternative.rb'
584
217
  - 'lib/split/experiment.rb'
585
- - 'lib/split/experiment_catalog.rb'
586
218
  - 'lib/split/helper.rb'
587
- - 'lib/split/metric.rb'
588
219
  - 'lib/split/zscore.rb'
589
220
 
590
- # Offense count: 21
591
- # Cop supports --auto-correct.
592
- Style/RedundantSelf:
593
- Exclude:
594
- - 'lib/split.rb'
595
- - 'lib/split/alternative.rb'
596
- - 'lib/split/configuration.rb'
597
- - 'lib/split/experiment.rb'
598
- - 'lib/split/extensions/string.rb'
599
- - 'lib/split/metric.rb'
600
- - 'lib/split/persistence/dual_adapter.rb'
601
- - 'lib/split/persistence/redis_adapter.rb'
602
- - 'lib/split/trial.rb'
603
-
604
- # Offense count: 2
605
- # Cop supports --auto-correct.
606
- Style/RescueModifier:
607
- Exclude:
608
- - 'lib/split/alternative.rb'
609
- - 'lib/split/configuration.rb'
610
-
611
- # Offense count: 5
612
- # Cop supports --auto-correct.
613
- # Configuration parameters: EnforcedStyle.
614
- # SupportedStyles: implicit, explicit
615
- Style/RescueStandardError:
616
- Exclude:
617
- - 'lib/split/alternative.rb'
618
- - 'lib/split/experiment.rb'
619
- - 'lib/split/helper.rb'
620
-
621
- # Offense count: 2
622
- # Cop supports --auto-correct.
623
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
624
- # Whitelist: present?, blank?, presence, try, try!
625
- Style/SafeNavigation:
626
- Exclude:
627
- - 'lib/split/configuration.rb'
628
- - 'lib/split/helper.rb'
629
-
630
- # Offense count: 1
631
- # Cop supports --auto-correct.
632
- # Configuration parameters: AllowAsExpressionSeparator.
633
- Style/Semicolon:
634
- Exclude:
635
- - 'lib/split/algorithms/whiplash.rb'
636
-
637
- # Offense count: 1
638
- # Cop supports --auto-correct.
639
- # Configuration parameters: .
640
- # SupportedStyles: use_perl_names, use_english_names
641
- Style/SpecialGlobalVars:
642
- EnforcedStyle: use_perl_names
643
-
644
- # Offense count: 86
221
+ # Offense count: 258
645
222
  # Cop supports --auto-correct.
646
223
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
647
224
  # SupportedStyles: single_quotes, double_quotes
648
225
  Style/StringLiterals:
649
226
  Enabled: false
650
-
651
- # Offense count: 3
652
- # Cop supports --auto-correct.
653
- # Configuration parameters: IgnoredMethods.
654
- # IgnoredMethods: respond_to, define_method
655
- Style/SymbolProc:
656
- Exclude:
657
- - 'lib/split/experiment.rb'
658
- - 'lib/split/experiment_catalog.rb'
659
- - 'lib/split/metric.rb'
660
-
661
- # Offense count: 1
662
- # Cop supports --auto-correct.
663
- # Configuration parameters: AllowNamedUnderscoreVariables.
664
- Style/TrailingUnderscoreVariable:
665
- Exclude:
666
- - 'lib/split/helper.rb'
667
-
668
- # Offense count: 1
669
- # Cop supports --auto-correct.
670
- Style/ZeroLengthPredicate:
671
- Exclude:
672
- - 'lib/split/user.rb'
673
-
674
- # Offense count: 74
675
- # Cop supports --auto-correct.
676
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
677
- # URISchemes: http, https
678
- Metrics/LineLength:
679
- Max: 183