launchdarkly-server-sdk 6.2.2 → 6.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/ldclient-rb/config.rb +81 -4
  4. data/lib/ldclient-rb/evaluation_detail.rb +67 -8
  5. data/lib/ldclient-rb/file_data_source.rb +9 -300
  6. data/lib/ldclient-rb/impl/big_segments.rb +117 -0
  7. data/lib/ldclient-rb/impl/diagnostic_events.rb +1 -1
  8. data/lib/ldclient-rb/impl/evaluator.rb +80 -28
  9. data/lib/ldclient-rb/impl/integrations/dynamodb_impl.rb +82 -18
  10. data/lib/ldclient-rb/impl/integrations/file_data_source.rb +212 -0
  11. data/lib/ldclient-rb/impl/integrations/redis_impl.rb +84 -31
  12. data/lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb +40 -0
  13. data/lib/ldclient-rb/impl/repeating_task.rb +47 -0
  14. data/lib/ldclient-rb/impl/util.rb +4 -1
  15. data/lib/ldclient-rb/integrations/consul.rb +7 -0
  16. data/lib/ldclient-rb/integrations/dynamodb.rb +47 -2
  17. data/lib/ldclient-rb/integrations/file_data.rb +108 -0
  18. data/lib/ldclient-rb/integrations/redis.rb +41 -1
  19. data/lib/ldclient-rb/integrations/test_data/flag_builder.rb +438 -0
  20. data/lib/ldclient-rb/integrations/test_data.rb +209 -0
  21. data/lib/ldclient-rb/integrations/util/store_wrapper.rb +5 -0
  22. data/lib/ldclient-rb/integrations.rb +2 -51
  23. data/lib/ldclient-rb/interfaces.rb +152 -2
  24. data/lib/ldclient-rb/ldclient.rb +21 -7
  25. data/lib/ldclient-rb/polling.rb +22 -41
  26. data/lib/ldclient-rb/util.rb +1 -1
  27. data/lib/ldclient-rb/version.rb +1 -1
  28. metadata +31 -132
  29. data/.circleci/config.yml +0 -40
  30. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -37
  31. data/.github/ISSUE_TEMPLATE/config.yml +0 -5
  32. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  33. data/.github/pull_request_template.md +0 -21
  34. data/.gitignore +0 -16
  35. data/.hound.yml +0 -2
  36. data/.ldrelease/build-docs.sh +0 -18
  37. data/.ldrelease/circleci/linux/execute.sh +0 -18
  38. data/.ldrelease/circleci/mac/execute.sh +0 -18
  39. data/.ldrelease/circleci/template/build.sh +0 -29
  40. data/.ldrelease/circleci/template/publish.sh +0 -23
  41. data/.ldrelease/circleci/template/set-gem-home.sh +0 -7
  42. data/.ldrelease/circleci/template/test.sh +0 -10
  43. data/.ldrelease/circleci/template/update-version.sh +0 -8
  44. data/.ldrelease/circleci/windows/execute.ps1 +0 -19
  45. data/.ldrelease/config.yml +0 -29
  46. data/.rspec +0 -2
  47. data/.rubocop.yml +0 -600
  48. data/.simplecov +0 -4
  49. data/CHANGELOG.md +0 -363
  50. data/CODEOWNERS +0 -1
  51. data/CONTRIBUTING.md +0 -37
  52. data/Gemfile +0 -3
  53. data/azure-pipelines.yml +0 -51
  54. data/docs/Makefile +0 -26
  55. data/docs/index.md +0 -9
  56. data/launchdarkly-server-sdk.gemspec +0 -45
  57. data/spec/config_spec.rb +0 -63
  58. data/spec/diagnostic_events_spec.rb +0 -163
  59. data/spec/evaluation_detail_spec.rb +0 -135
  60. data/spec/event_sender_spec.rb +0 -197
  61. data/spec/event_summarizer_spec.rb +0 -63
  62. data/spec/events_spec.rb +0 -607
  63. data/spec/expiring_cache_spec.rb +0 -76
  64. data/spec/feature_store_spec_base.rb +0 -213
  65. data/spec/file_data_source_spec.rb +0 -283
  66. data/spec/fixtures/feature.json +0 -37
  67. data/spec/fixtures/feature1.json +0 -36
  68. data/spec/fixtures/user.json +0 -9
  69. data/spec/flags_state_spec.rb +0 -81
  70. data/spec/http_util.rb +0 -132
  71. data/spec/impl/evaluator_bucketing_spec.rb +0 -216
  72. data/spec/impl/evaluator_clause_spec.rb +0 -55
  73. data/spec/impl/evaluator_operators_spec.rb +0 -141
  74. data/spec/impl/evaluator_rule_spec.rb +0 -128
  75. data/spec/impl/evaluator_segment_spec.rb +0 -125
  76. data/spec/impl/evaluator_spec.rb +0 -349
  77. data/spec/impl/evaluator_spec_base.rb +0 -75
  78. data/spec/impl/event_factory_spec.rb +0 -108
  79. data/spec/impl/model/serialization_spec.rb +0 -41
  80. data/spec/in_memory_feature_store_spec.rb +0 -12
  81. data/spec/integrations/consul_feature_store_spec.rb +0 -40
  82. data/spec/integrations/dynamodb_feature_store_spec.rb +0 -103
  83. data/spec/integrations/store_wrapper_spec.rb +0 -276
  84. data/spec/launchdarkly-server-sdk_spec.rb +0 -13
  85. data/spec/launchdarkly-server-sdk_spec_autoloadtest.rb +0 -9
  86. data/spec/ldclient_end_to_end_spec.rb +0 -157
  87. data/spec/ldclient_spec.rb +0 -635
  88. data/spec/newrelic_spec.rb +0 -5
  89. data/spec/polling_spec.rb +0 -120
  90. data/spec/redis_feature_store_spec.rb +0 -121
  91. data/spec/requestor_spec.rb +0 -209
  92. data/spec/segment_store_spec_base.rb +0 -95
  93. data/spec/simple_lru_cache_spec.rb +0 -24
  94. data/spec/spec_helper.rb +0 -9
  95. data/spec/store_spec.rb +0 -10
  96. data/spec/stream_spec.rb +0 -45
  97. data/spec/user_filter_spec.rb +0 -91
  98. data/spec/util_spec.rb +0 -17
  99. data/spec/version_spec.rb +0 -7
data/.rubocop.yml DELETED
@@ -1,600 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - db/schema.rb
4
-
5
- Style/AccessorMethodName:
6
- Description: Check the naming of accessor methods for get_/set_.
7
- Enabled: false
8
-
9
- Style/Alias:
10
- Description: 'Use alias_method instead of alias.'
11
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
12
- Enabled: false
13
-
14
- Style/ArrayJoin:
15
- Description: 'Use Array#join instead of Array#*.'
16
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
17
- Enabled: false
18
-
19
- Style/AsciiComments:
20
- Description: 'Use only ascii symbols in comments.'
21
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
22
- Enabled: false
23
-
24
- Style/AsciiIdentifiers:
25
- Description: 'Use only ascii symbols in identifiers.'
26
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
27
- Enabled: false
28
-
29
- Style/Attr:
30
- Description: 'Checks for uses of Module#attr.'
31
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
32
- Enabled: false
33
-
34
- Metrics/BlockNesting:
35
- Description: 'Avoid excessive block nesting'
36
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
37
- Enabled: false
38
-
39
- Style/CaseEquality:
40
- Description: 'Avoid explicit use of the case equality operator(===).'
41
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
42
- Enabled: false
43
-
44
- Style/CharacterLiteral:
45
- Description: 'Checks for uses of character literals.'
46
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
47
- Enabled: false
48
-
49
- Style/ClassAndModuleChildren:
50
- Description: 'Checks style of children classes and modules.'
51
- Enabled: true
52
- EnforcedStyle: nested
53
-
54
- Metrics/ClassLength:
55
- Description: 'Avoid classes longer than 100 lines of code.'
56
- Enabled: false
57
-
58
- Metrics/ModuleLength:
59
- Description: 'Avoid modules longer than 100 lines of code.'
60
- Enabled: false
61
-
62
- Style/ClassVars:
63
- Description: 'Avoid the use of class variables.'
64
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
65
- Enabled: false
66
-
67
- Style/CollectionMethods:
68
- Enabled: true
69
- PreferredMethods:
70
- find: detect
71
- inject: reduce
72
- collect: map
73
- find_all: select
74
-
75
- Style/ColonMethodCall:
76
- Description: 'Do not use :: for method call.'
77
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
78
- Enabled: false
79
-
80
- Style/CommentAnnotation:
81
- Description: >-
82
- Checks formatting of special comments
83
- (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
84
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
85
- Enabled: false
86
-
87
- Metrics/CyclomaticComplexity:
88
- Description: >-
89
- A complexity metric that is strongly correlated to the number
90
- of test cases needed to validate a method.
91
- Enabled: false
92
-
93
- Rails/Delegate:
94
- Description: 'Prefer delegate method for delegations.'
95
- Enabled: false
96
-
97
- Style/PreferredHashMethods:
98
- Description: 'Checks for use of deprecated Hash methods.'
99
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
100
- Enabled: false
101
-
102
- Style/Documentation:
103
- Description: 'Document classes and non-namespace modules.'
104
- Enabled: false
105
-
106
- Style/DoubleNegation:
107
- Description: 'Checks for uses of double negation (!!).'
108
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
109
- Enabled: false
110
-
111
- Style/EachWithObject:
112
- Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
113
- Enabled: false
114
-
115
- Style/EmptyLiteral:
116
- Description: 'Prefer literals to Array.new/Hash.new/String.new.'
117
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
118
- Enabled: false
119
-
120
- # Checks whether the source file has a utf-8 encoding comment or not
121
- # AutoCorrectEncodingComment must match the regex
122
- # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
123
- Style/Encoding:
124
- Enabled: false
125
-
126
- Style/EvenOdd:
127
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
128
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
129
- Enabled: false
130
-
131
- Style/FileName:
132
- Description: 'Use snake_case for source file names.'
133
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
134
- Enabled: false
135
-
136
- Style/FlipFlop:
137
- Description: 'Checks for flip flops'
138
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
139
- Enabled: false
140
-
141
- Style/FormatString:
142
- Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
143
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
144
- Enabled: false
145
-
146
- Style/GlobalVars:
147
- Description: 'Do not introduce global variables.'
148
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
149
- Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
150
- Enabled: false
151
-
152
- Style/GuardClause:
153
- Description: 'Check for conditionals that can be replaced with guard clauses'
154
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
155
- Enabled: false
156
-
157
- Style/IfUnlessModifier:
158
- Description: >-
159
- Favor modifier if/unless usage when you have a
160
- single-line body.
161
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
162
- Enabled: false
163
-
164
- Style/IfWithSemicolon:
165
- Description: 'Do not use if x; .... Use the ternary operator instead.'
166
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
167
- Enabled: false
168
-
169
- Style/InlineComment:
170
- Description: 'Avoid inline comments.'
171
- Enabled: false
172
-
173
- Style/Lambda:
174
- Description: 'Use the new lambda literal syntax for single-line blocks.'
175
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
176
- Enabled: false
177
-
178
- Style/LambdaCall:
179
- Description: 'Use lambda.call(...) instead of lambda.(...).'
180
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
181
- Enabled: false
182
-
183
- Style/LineEndConcatenation:
184
- Description: >-
185
- Use \ instead of + or << to concatenate two string literals at
186
- line end.
187
- Enabled: false
188
-
189
- Metrics/LineLength:
190
- Description: 'Limit lines to 150 characters.'
191
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
192
- Max: 150
193
-
194
- Metrics/MethodLength:
195
- Description: 'Avoid methods longer than 10 lines of code.'
196
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
197
- Enabled: false
198
-
199
- Style/ModuleFunction:
200
- Description: 'Checks for usage of `extend self` in modules.'
201
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
202
- Enabled: false
203
-
204
- Style/NegatedIf:
205
- Description: >-
206
- Favor unless over if for negative conditions
207
- (or control flow or).
208
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
209
- Enabled: false
210
-
211
- Style/NegatedWhile:
212
- Description: 'Favor until over while for negative conditions.'
213
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
214
- Enabled: false
215
-
216
- Style/Next:
217
- Description: 'Use `next` to skip iteration instead of a condition at the end.'
218
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
219
- Enabled: false
220
-
221
- Style/NilComparison:
222
- Description: 'Prefer x.nil? to x == nil.'
223
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
224
- Enabled: false
225
-
226
- Style/Not:
227
- Description: 'Use ! instead of not.'
228
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
229
- Enabled: false
230
-
231
- Style/NumericLiterals:
232
- Description: >-
233
- Add underscores to large numeric literals to improve their
234
- readability.
235
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
236
- Enabled: false
237
-
238
- Style/OneLineConditional:
239
- Description: >-
240
- Favor the ternary operator(?:) over
241
- if/then/else/end constructs.
242
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
243
- Enabled: false
244
-
245
- Style/OpMethod:
246
- Description: 'When defining binary operators, name the argument other.'
247
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
248
- Enabled: false
249
-
250
- Metrics/ParameterLists:
251
- Description: 'Avoid parameter lists longer than three or four parameters.'
252
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
253
- Enabled: false
254
-
255
- Style/PercentLiteralDelimiters:
256
- Description: 'Use `%`-literal delimiters consistently'
257
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
258
- Enabled: false
259
-
260
- Style/PerlBackrefs:
261
- Description: 'Avoid Perl-style regex back references.'
262
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
263
- Enabled: false
264
-
265
- Style/PredicateName:
266
- Description: 'Check the names of predicate methods.'
267
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
268
- NamePrefixBlacklist:
269
- - is_
270
- Exclude:
271
- - spec/**/*
272
-
273
- Style/Proc:
274
- Description: 'Use proc instead of Proc.new.'
275
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
276
- Enabled: false
277
-
278
- Style/RaiseArgs:
279
- Description: 'Checks the arguments passed to raise/fail.'
280
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
281
- Enabled: false
282
-
283
- Style/RegexpLiteral:
284
- Description: 'Use / or %r around regular expressions.'
285
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
286
- Enabled: false
287
-
288
- Style/SelfAssignment:
289
- Description: >-
290
- Checks for places where self-assignment shorthand should have
291
- been used.
292
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
293
- Enabled: false
294
-
295
- Style/SingleLineBlockParams:
296
- Description: 'Enforces the names of some block params.'
297
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
298
- Enabled: false
299
-
300
- Style/SingleLineMethods:
301
- Description: 'Avoid single-line methods.'
302
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
303
- Enabled: false
304
-
305
- Style/SignalException:
306
- Description: 'Checks for proper usage of fail and raise.'
307
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
308
- Enabled: false
309
-
310
- Style/SpecialGlobalVars:
311
- Description: 'Avoid Perl-style global variables.'
312
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
313
- Enabled: false
314
-
315
- Style/StringLiterals:
316
- Description: 'Checks if uses of quotes match the configured preference.'
317
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
318
- EnforcedStyle: double_quotes
319
- Enabled: true
320
-
321
- Style/TrailingCommaInArguments:
322
- Description: 'Checks for trailing comma in argument lists.'
323
- StyleGuide: '#no-trailing-params-comma'
324
- Enabled: true
325
-
326
- Style/TrailingCommaInLiteral:
327
- Description: 'Checks for trailing comma in array and hash literals.'
328
- StyleGuide: '#no-trailing-array-commas'
329
- Enabled: true
330
-
331
- Style/TrivialAccessors:
332
- Description: 'Prefer attr_* methods to trivial readers/writers.'
333
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
334
- Enabled: false
335
-
336
- Style/VariableInterpolation:
337
- Description: >-
338
- Don't interpolate global, instance and class variables
339
- directly in strings.
340
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
341
- Enabled: false
342
-
343
- Style/WhenThen:
344
- Description: 'Use when x then ... for one-line cases.'
345
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
346
- Enabled: false
347
-
348
- Style/WhileUntilModifier:
349
- Description: >-
350
- Favor modifier while/until usage when you have a
351
- single-line body.
352
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
353
- Enabled: false
354
-
355
- Style/WordArray:
356
- Description: 'Use %w or %W for arrays of words.'
357
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
358
- Enabled: false
359
-
360
- # Layout
361
- Layout/DotPosition:
362
- Description: 'Checks the position of the dot in multi-line method calls.'
363
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
364
- EnforcedStyle: trailing
365
-
366
- Layout/ExtraSpacing:
367
- Description: 'Do not use unnecessary spacing.'
368
- Enabled: true
369
-
370
- Layout/MultilineOperationIndentation:
371
- Description: >-
372
- Checks indentation of binary operations that span more than
373
- one line.
374
- Enabled: true
375
- EnforcedStyle: indented
376
-
377
- Layout/InitialIndentation:
378
- Description: >-
379
- Checks the indentation of the first non-blank non-comment line in a file.
380
- Enabled: false
381
-
382
-
383
- # Lint
384
-
385
- Lint/AmbiguousOperator:
386
- Description: >-
387
- Checks for ambiguous operators in the first argument of a
388
- method invocation without parentheses.
389
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
390
- Enabled: false
391
-
392
- Lint/AmbiguousRegexpLiteral:
393
- Description: >-
394
- Checks for ambiguous regexp literals in the first argument of
395
- a method invocation without parenthesis.
396
- Enabled: false
397
-
398
- Lint/AssignmentInCondition:
399
- Description: "Don't use assignment in conditions."
400
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
401
- Enabled: false
402
-
403
- Lint/CircularArgumentReference:
404
- Description: "Don't refer to the keyword argument in the default value."
405
- Enabled: false
406
-
407
- Lint/ConditionPosition:
408
- Description: >-
409
- Checks for condition placed in a confusing position relative to
410
- the keyword.
411
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
412
- Enabled: false
413
-
414
- Lint/DeprecatedClassMethods:
415
- Description: 'Check for deprecated class method calls.'
416
- Enabled: false
417
-
418
- Lint/DuplicatedKey:
419
- Description: 'Check for duplicate keys in hash literals.'
420
- Enabled: false
421
-
422
- Lint/EachWithObjectArgument:
423
- Description: 'Check for immutable argument given to each_with_object.'
424
- Enabled: false
425
-
426
- Lint/ElseLayout:
427
- Description: 'Check for odd code arrangement in an else block.'
428
- Enabled: false
429
-
430
- Lint/FormatParameterMismatch:
431
- Description: 'The number of parameters to format/sprint must match the fields.'
432
- Enabled: false
433
-
434
- Lint/HandleExceptions:
435
- Description: "Don't suppress exception."
436
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
437
- Enabled: false
438
-
439
- Lint/InvalidCharacterLiteral:
440
- Description: >-
441
- Checks for invalid character literals with a non-escaped
442
- whitespace character.
443
- Enabled: false
444
-
445
- Lint/LiteralInCondition:
446
- Description: 'Checks of literals used in conditions.'
447
- Enabled: false
448
-
449
- Lint/LiteralInInterpolation:
450
- Description: 'Checks for literals used in interpolation.'
451
- Enabled: false
452
-
453
- Lint/Loop:
454
- Description: >-
455
- Use Kernel#loop with break rather than begin/end/until or
456
- begin/end/while for post-loop tests.
457
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
458
- Enabled: false
459
-
460
- Lint/NestedMethodDefinition:
461
- Description: 'Do not use nested method definitions.'
462
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
463
- Enabled: false
464
-
465
- Lint/NonLocalExitFromIterator:
466
- Description: 'Do not use return in iterator to cause non-local exit.'
467
- Enabled: false
468
-
469
- Lint/ParenthesesAsGroupedExpression:
470
- Description: >-
471
- Checks for method calls with a space before the opening
472
- parenthesis.
473
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
474
- Enabled: false
475
-
476
- Lint/RequireParentheses:
477
- Description: >-
478
- Use parentheses in the method call to avoid confusion
479
- about precedence.
480
- Enabled: false
481
-
482
- Lint/UnderscorePrefixedVariableName:
483
- Description: 'Do not use prefix `_` for a variable that is used.'
484
- Enabled: false
485
-
486
- Lint/UnneededDisable:
487
- Description: >-
488
- Checks for rubocop:disable comments that can be removed.
489
- Note: this cop is not disabled when disabling all cops.
490
- It must be explicitly disabled.
491
- Enabled: false
492
-
493
- Lint/Void:
494
- Description: 'Possible use of operator/literal/variable in void context.'
495
- Enabled: false
496
-
497
- # Performance
498
-
499
- Performance/CaseWhenSplat:
500
- Description: >-
501
- Place `when` conditions that use splat at the end
502
- of the list of `when` branches.
503
- Enabled: false
504
-
505
- Performance/Count:
506
- Description: >-
507
- Use `count` instead of `select...size`, `reject...size`,
508
- `select...count`, `reject...count`, `select...length`,
509
- and `reject...length`.
510
- Enabled: false
511
-
512
- Performance/Detect:
513
- Description: >-
514
- Use `detect` instead of `select.first`, `find_all.first`,
515
- `select.last`, and `find_all.last`.
516
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
517
- Enabled: false
518
-
519
- Performance/FlatMap:
520
- Description: >-
521
- Use `Enumerable#flat_map`
522
- instead of `Enumerable#map...Array#flatten(1)`
523
- or `Enumberable#collect..Array#flatten(1)`
524
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
525
- Enabled: false
526
-
527
- Performance/ReverseEach:
528
- Description: 'Use `reverse_each` instead of `reverse.each`.'
529
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
530
- Enabled: false
531
-
532
- Performance/Sample:
533
- Description: >-
534
- Use `sample` instead of `shuffle.first`,
535
- `shuffle.last`, and `shuffle[Fixnum]`.
536
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
537
- Enabled: false
538
-
539
- Performance/Size:
540
- Description: >-
541
- Use `size` instead of `count` for counting
542
- the number of elements in `Array` and `Hash`.
543
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
544
- Enabled: false
545
-
546
- Performance/StringReplacement:
547
- Description: >-
548
- Use `tr` instead of `gsub` when you are replacing the same
549
- number of characters. Use `delete` instead of `gsub` when
550
- you are deleting characters.
551
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
552
- Enabled: false
553
-
554
- # Rails
555
-
556
- Rails/ActionFilter:
557
- Description: 'Enforces consistent use of action filter methods.'
558
- Enabled: false
559
-
560
- Rails/Date:
561
- Description: >-
562
- Checks the correct usage of date aware methods,
563
- such as Date.today, Date.current etc.
564
- Enabled: false
565
-
566
- Rails/FindBy:
567
- Description: 'Prefer find_by over where.first.'
568
- Enabled: false
569
-
570
- Rails/FindEach:
571
- Description: 'Prefer all.find_each over all.find.'
572
- Enabled: false
573
-
574
- Rails/HasAndBelongsToMany:
575
- Description: 'Prefer has_many :through to has_and_belongs_to_many.'
576
- Enabled: false
577
-
578
- Rails/Output:
579
- Description: 'Checks for calls to puts, print, etc.'
580
- Enabled: false
581
-
582
- Rails/ReadWriteAttribute:
583
- Description: >-
584
- Checks for read_attribute(:attr) and
585
- write_attribute(:attr, val).
586
- Enabled: false
587
-
588
- Rails/ScopeArgs:
589
- Description: 'Checks the arguments of ActiveRecord scopes.'
590
- Enabled: false
591
-
592
- Rails/TimeZone:
593
- Description: 'Checks the correct usage of time zone aware methods.'
594
- StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
595
- Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
596
- Enabled: false
597
-
598
- Rails/Validation:
599
- Description: 'Use validates :attribute, hash of validations.'
600
- Enabled: false
data/.simplecov DELETED
@@ -1,4 +0,0 @@
1
- SimpleCov.start do
2
- add_filter '/spec/'
3
- add_filter '/.bundle/'
4
- end