launchdarkly-server-sdk 6.1.1 → 6.4.0

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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -5
  3. data/lib/ldclient-rb/config.rb +118 -4
  4. data/lib/ldclient-rb/evaluation_detail.rb +104 -14
  5. data/lib/ldclient-rb/events.rb +201 -107
  6. data/lib/ldclient-rb/file_data_source.rb +9 -300
  7. data/lib/ldclient-rb/flags_state.rb +23 -12
  8. data/lib/ldclient-rb/impl/big_segments.rb +117 -0
  9. data/lib/ldclient-rb/impl/diagnostic_events.rb +1 -1
  10. data/lib/ldclient-rb/impl/evaluator.rb +116 -62
  11. data/lib/ldclient-rb/impl/evaluator_bucketing.rb +22 -9
  12. data/lib/ldclient-rb/impl/evaluator_helpers.rb +53 -0
  13. data/lib/ldclient-rb/impl/evaluator_operators.rb +1 -1
  14. data/lib/ldclient-rb/impl/event_summarizer.rb +63 -0
  15. data/lib/ldclient-rb/impl/event_types.rb +90 -0
  16. data/lib/ldclient-rb/impl/integrations/dynamodb_impl.rb +82 -18
  17. data/lib/ldclient-rb/impl/integrations/file_data_source.rb +212 -0
  18. data/lib/ldclient-rb/impl/integrations/redis_impl.rb +84 -31
  19. data/lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb +40 -0
  20. data/lib/ldclient-rb/impl/model/preprocessed_data.rb +177 -0
  21. data/lib/ldclient-rb/impl/model/serialization.rb +7 -37
  22. data/lib/ldclient-rb/impl/repeating_task.rb +47 -0
  23. data/lib/ldclient-rb/impl/util.rb +62 -1
  24. data/lib/ldclient-rb/integrations/consul.rb +8 -1
  25. data/lib/ldclient-rb/integrations/dynamodb.rb +48 -3
  26. data/lib/ldclient-rb/integrations/file_data.rb +108 -0
  27. data/lib/ldclient-rb/integrations/redis.rb +42 -2
  28. data/lib/ldclient-rb/integrations/test_data/flag_builder.rb +438 -0
  29. data/lib/ldclient-rb/integrations/test_data.rb +209 -0
  30. data/lib/ldclient-rb/integrations/util/store_wrapper.rb +5 -0
  31. data/lib/ldclient-rb/integrations.rb +2 -51
  32. data/lib/ldclient-rb/interfaces.rb +152 -2
  33. data/lib/ldclient-rb/ldclient.rb +131 -33
  34. data/lib/ldclient-rb/polling.rb +22 -41
  35. data/lib/ldclient-rb/requestor.rb +3 -3
  36. data/lib/ldclient-rb/stream.rb +4 -3
  37. data/lib/ldclient-rb/util.rb +10 -1
  38. data/lib/ldclient-rb/version.rb +1 -1
  39. data/lib/ldclient-rb.rb +0 -1
  40. metadata +35 -132
  41. data/.circleci/config.yml +0 -40
  42. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -37
  43. data/.github/ISSUE_TEMPLATE/config.yml +0 -5
  44. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  45. data/.github/pull_request_template.md +0 -21
  46. data/.gitignore +0 -16
  47. data/.hound.yml +0 -2
  48. data/.ldrelease/build-docs.sh +0 -18
  49. data/.ldrelease/circleci/linux/execute.sh +0 -18
  50. data/.ldrelease/circleci/mac/execute.sh +0 -18
  51. data/.ldrelease/circleci/template/build.sh +0 -29
  52. data/.ldrelease/circleci/template/publish.sh +0 -23
  53. data/.ldrelease/circleci/template/set-gem-home.sh +0 -7
  54. data/.ldrelease/circleci/template/test.sh +0 -10
  55. data/.ldrelease/circleci/template/update-version.sh +0 -8
  56. data/.ldrelease/circleci/windows/execute.ps1 +0 -19
  57. data/.ldrelease/config.yml +0 -29
  58. data/.rspec +0 -2
  59. data/.rubocop.yml +0 -600
  60. data/.simplecov +0 -4
  61. data/CHANGELOG.md +0 -351
  62. data/CODEOWNERS +0 -1
  63. data/CONTRIBUTING.md +0 -37
  64. data/Gemfile +0 -3
  65. data/azure-pipelines.yml +0 -51
  66. data/docs/Makefile +0 -26
  67. data/docs/index.md +0 -9
  68. data/launchdarkly-server-sdk.gemspec +0 -45
  69. data/lib/ldclient-rb/event_summarizer.rb +0 -55
  70. data/lib/ldclient-rb/impl/event_factory.rb +0 -120
  71. data/spec/config_spec.rb +0 -63
  72. data/spec/diagnostic_events_spec.rb +0 -163
  73. data/spec/evaluation_detail_spec.rb +0 -135
  74. data/spec/event_sender_spec.rb +0 -197
  75. data/spec/event_summarizer_spec.rb +0 -63
  76. data/spec/events_spec.rb +0 -607
  77. data/spec/expiring_cache_spec.rb +0 -76
  78. data/spec/feature_store_spec_base.rb +0 -213
  79. data/spec/file_data_source_spec.rb +0 -283
  80. data/spec/fixtures/feature.json +0 -37
  81. data/spec/fixtures/feature1.json +0 -36
  82. data/spec/fixtures/user.json +0 -9
  83. data/spec/flags_state_spec.rb +0 -81
  84. data/spec/http_util.rb +0 -132
  85. data/spec/impl/evaluator_bucketing_spec.rb +0 -111
  86. data/spec/impl/evaluator_clause_spec.rb +0 -55
  87. data/spec/impl/evaluator_operators_spec.rb +0 -141
  88. data/spec/impl/evaluator_rule_spec.rb +0 -96
  89. data/spec/impl/evaluator_segment_spec.rb +0 -125
  90. data/spec/impl/evaluator_spec.rb +0 -305
  91. data/spec/impl/evaluator_spec_base.rb +0 -75
  92. data/spec/impl/model/serialization_spec.rb +0 -41
  93. data/spec/in_memory_feature_store_spec.rb +0 -12
  94. data/spec/integrations/consul_feature_store_spec.rb +0 -40
  95. data/spec/integrations/dynamodb_feature_store_spec.rb +0 -103
  96. data/spec/integrations/store_wrapper_spec.rb +0 -276
  97. data/spec/launchdarkly-server-sdk_spec.rb +0 -13
  98. data/spec/launchdarkly-server-sdk_spec_autoloadtest.rb +0 -9
  99. data/spec/ldclient_end_to_end_spec.rb +0 -157
  100. data/spec/ldclient_spec.rb +0 -643
  101. data/spec/newrelic_spec.rb +0 -5
  102. data/spec/polling_spec.rb +0 -120
  103. data/spec/redis_feature_store_spec.rb +0 -121
  104. data/spec/requestor_spec.rb +0 -196
  105. data/spec/segment_store_spec_base.rb +0 -95
  106. data/spec/simple_lru_cache_spec.rb +0 -24
  107. data/spec/spec_helper.rb +0 -9
  108. data/spec/store_spec.rb +0 -10
  109. data/spec/stream_spec.rb +0 -45
  110. data/spec/user_filter_spec.rb +0 -91
  111. data/spec/util_spec.rb +0 -17
  112. data/spec/version_spec.rb +0 -7
@@ -1,29 +0,0 @@
1
- repo:
2
- public: ruby-server-sdk
3
- private: ruby-server-sdk-private
4
-
5
- releasableBranches:
6
- - name: master
7
- - name: 5.x
8
-
9
- publications:
10
- - url: https://rubygems.org/gems/launchdarkly-server-sdk
11
- description: RubyGems
12
- - url: https://www.rubydoc.info/gems/launchdarkly-server-sdk
13
- description: documentation
14
-
15
- template:
16
- name: ruby
17
-
18
- circleci:
19
- linux:
20
- image: circleci/ruby:2.6.6-buster
21
- context: org-global
22
- env:
23
- LD_SKIP_DATABASE_TESTS: "1" # Don't run Redis/Consul/DynamoDB tests in release; they are run in CI
24
-
25
- documentation:
26
- githubPages: true
27
-
28
- sdk:
29
- displayName: "Ruby"
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --order random
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