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