fx 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +58 -0
  3. data/.gitignore +0 -1
  4. data/.rspec +1 -1
  5. data/.standard.yml +3 -0
  6. data/CONTRIBUTING.md +12 -3
  7. data/Gemfile +1 -1
  8. data/README.md +2 -2
  9. data/Rakefile +2 -1
  10. data/bin/setup +0 -4
  11. data/fx.gemspec +20 -22
  12. data/lib/fx/function.rb +4 -4
  13. data/lib/fx/statements/function.rb +3 -5
  14. data/lib/fx/statements/trigger.rb +8 -10
  15. data/lib/fx/version.rb +1 -1
  16. data/lib/fx.rb +3 -3
  17. data/lib/generators/fx/function/function_generator.rb +6 -6
  18. data/lib/generators/fx/trigger/trigger_generator.rb +6 -6
  19. data/spec/acceptance/user_manages_functions_spec.rb +1 -1
  20. data/spec/acceptance/user_manages_triggers_spec.rb +2 -2
  21. data/spec/acceptance_helper.rb +4 -2
  22. data/spec/dummy/Rakefile +4 -4
  23. data/spec/dummy/bin/bundle +2 -2
  24. data/spec/dummy/bin/rails +3 -3
  25. data/spec/dummy/bin/rake +2 -2
  26. data/spec/dummy/config/application.rb +2 -0
  27. data/spec/dummy/config/database.yml +2 -0
  28. data/spec/dummy/config.ru +1 -1
  29. data/spec/features/functions/migrations_spec.rb +1 -1
  30. data/spec/features/functions/revert_spec.rb +4 -4
  31. data/spec/features/triggers/migrations_spec.rb +2 -2
  32. data/spec/features/triggers/revert_spec.rb +8 -8
  33. data/spec/fx/adapters/postgres/triggers_spec.rb +3 -3
  34. data/spec/fx/adapters/postgres_spec.rb +2 -2
  35. data/spec/fx/command_recorder/arguments_spec.rb +4 -4
  36. data/spec/fx/command_recorder_spec.rb +23 -23
  37. data/spec/fx/definition_spec.rb +6 -6
  38. data/spec/fx/function_spec.rb +8 -8
  39. data/spec/fx/schema_dumper/function_spec.rb +14 -16
  40. data/spec/fx/schema_dumper/trigger_spec.rb +3 -3
  41. data/spec/fx/statements/function_spec.rb +17 -17
  42. data/spec/fx/statements/trigger_spec.rb +20 -20
  43. data/spec/fx/trigger_spec.rb +6 -6
  44. data/spec/generators/fx/function/function_generator_spec.rb +3 -3
  45. data/spec/support/definition_helpers.rb +4 -4
  46. data/spec/support/generator_setup.rb +1 -1
  47. data/spec/support/migration_helpers.rb +1 -1
  48. metadata +26 -73
  49. data/.hound.yml +0 -2
  50. data/.rubocop.yml +0 -648
  51. data/.travis.yml +0 -60
  52. data/Appraisals +0 -45
  53. data/bin/appraisal +0 -17
  54. data/gemfiles/rails42.gemfile +0 -10
  55. data/gemfiles/rails50.gemfile +0 -8
  56. data/gemfiles/rails51.gemfile +0 -8
  57. data/gemfiles/rails52.gemfile +0 -8
  58. data/gemfiles/rails60.gemfile +0 -8
  59. data/gemfiles/rails61.gemfile +0 -8
  60. data/gemfiles/rails_edge.gemfile +0 -8
data/.rubocop.yml DELETED
@@ -1,648 +0,0 @@
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
data/.travis.yml DELETED
@@ -1,60 +0,0 @@
1
- addons:
2
- postgresql: "10"
3
- apt:
4
- packages:
5
- - postgresql-10
6
- - postgresql-client-10
7
- before_install:
8
- - "echo '--colour' > ~/.rspec"
9
- - "echo 'gem: --no-document' > ~/.gemrc"
10
- - git config --global user.name "Travis CI"
11
- - git config --global user.email "travis-ci@example.com"
12
- branches:
13
- only:
14
- - master
15
- install:
16
- - travis_retry bin/setup
17
- language:
18
- - ruby
19
- notifications:
20
- email: false
21
- rvm:
22
- - 3.0
23
- - 2.7
24
- - 2.6
25
- - 2.5
26
- - 2.4
27
- gemfile:
28
- - gemfiles/rails42.gemfile
29
- - gemfiles/rails50.gemfile
30
- - gemfiles/rails51.gemfile
31
- - gemfiles/rails52.gemfile
32
- - gemfiles/rails60.gemfile
33
- - gemfiles/rails61.gemfile
34
- - gemfiles/rails_edge.gemfile
35
- matrix:
36
- allow_failures:
37
- - gemfile: gemfiles/rails_edge.gemfile
38
- exclude:
39
- - rvm: 2.4
40
- gemfile: gemfiles/rails60.gemfile
41
- - rvm: 2.4
42
- gemfile: gemfiles/rails61.gemfile
43
- - rvm: 2.4
44
- gemfile: gemfiles/rails_edge.gemfile
45
- - rvm: 2.5
46
- gemfile: gemfiles/rails_edge.gemfile
47
- - rvm: 2.6
48
- gemfile: gemfiles/rails42.gemfile
49
- - rvm: 2.6
50
- gemfile: gemfiles/rails_edge.gemfile
51
- - rvm: 2.7
52
- gemfile: gemfiles/rails42.gemfile
53
- - rvm: 3.0
54
- gemfile: gemfiles/rails42.gemfile
55
- - rvm: 3.0
56
- gemfile: gemfiles/rails50.gemfile
57
- - rvm: 3.0
58
- gemfile: gemfiles/rails51.gemfile
59
- - rvm: 3.0
60
- gemfile: gemfiles/rails52.gemfile