graphql-activerecord 0.12.6 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +581 -11
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile +1 -0
  5. data/README.md +69 -37
  6. data/Rakefile +1 -0
  7. data/bin/bundle +105 -0
  8. data/bin/coderay +12 -0
  9. data/bin/htmldiff +12 -0
  10. data/bin/ldiff +12 -0
  11. data/bin/pry +12 -0
  12. data/bin/rake +12 -0
  13. data/bin/rspec +12 -0
  14. data/bin/rubocop +12 -0
  15. data/bin/ruby-parse +12 -0
  16. data/bin/ruby-rewrite +12 -0
  17. data/graphql-activerecord.gemspec +6 -6
  18. data/lib/graphql/activerecord.rb +6 -2
  19. data/lib/graphql/models/active_record_extension.rb +2 -1
  20. data/lib/graphql/models/association_load_request.rb +1 -0
  21. data/lib/graphql/models/attribute_loader.rb +1 -0
  22. data/lib/graphql/models/backed_by_model.rb +1 -0
  23. data/lib/graphql/models/database_types.rb +1 -0
  24. data/lib/graphql/models/definer.rb +1 -0
  25. data/lib/graphql/models/definition_helpers.rb +3 -2
  26. data/lib/graphql/models/definition_helpers/associations.rb +3 -2
  27. data/lib/graphql/models/definition_helpers/attributes.rb +1 -0
  28. data/lib/graphql/models/hash_combiner.rb +1 -0
  29. data/lib/graphql/models/helpers.rb +1 -0
  30. data/lib/graphql/models/instrumentation.rb +6 -4
  31. data/lib/graphql/models/monkey_patches/graphql_query_context.rb +1 -0
  32. data/lib/graphql/models/mutation_field_map.rb +9 -7
  33. data/lib/graphql/models/mutation_helpers/apply_changes.rb +16 -5
  34. data/lib/graphql/models/mutation_helpers/authorization.rb +1 -0
  35. data/lib/graphql/models/mutation_helpers/print_input_fields.rb +4 -3
  36. data/lib/graphql/models/mutation_helpers/validation.rb +1 -0
  37. data/lib/graphql/models/mutation_helpers/validation_error.rb +1 -0
  38. data/lib/graphql/models/mutator.rb +3 -2
  39. data/lib/graphql/models/promise_relation_connection.rb +1 -0
  40. data/lib/graphql/models/reflection.rb +2 -0
  41. data/lib/graphql/models/relation_load_request.rb +1 -0
  42. data/lib/graphql/models/relation_loader.rb +1 -0
  43. data/lib/graphql/models/version.rb +2 -1
  44. metadata +23 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1fb8887cc7d5b635ae865e1cc117d1ec12783daa
4
- data.tar.gz: d9be88c8349bb35660d6f1ca89ac6fabd371d2c9
2
+ SHA256:
3
+ metadata.gz: 76a4ced301d85b1033852b47a61787f0f9942f8299c6c2f25981c827d22e7f59
4
+ data.tar.gz: 8821f341a6b418a1426a01fd5c38488f8b5edb0c62e86bee67180590309e5a72
5
5
  SHA512:
6
- metadata.gz: 84663736f3d286de79670253345064bd31213b58c5f3d752026986199b5b9d3597b5430039a9b784fa565d8a85f7c4a4307c9ce550f440f031a809e373d1ae96
7
- data.tar.gz: 98624d0e67daa0e3c9d1d633874c8c4b2d44591eb5fd1aa2daa4130d444e53951dc99d177454b3695645c60d8f4de96dc872f7075da39ab73e981a5208d1c036
6
+ metadata.gz: 4fd775cc768ce78c7ad93704bae6b33264042207452435883fccdd4076d166a553befb889005db63dae5b01e1da0d56b1a3e56857646da42fe221d00fe88b5fe
7
+ data.tar.gz: 945b1781b19e432f6cc866fb52b5838555efe5dd59f7d7e5abb9fb46024a663d649b822d6289421b6a8aee4d9e42c136bb75f9c4158f367f8d12231c58ebefff
@@ -5,7 +5,7 @@ AllCops:
5
5
  - bin/**/*
6
6
  - vendor/gems/**/*
7
7
 
8
- Lint/EndAlignment:
8
+ Layout/EndAlignment:
9
9
  EnforcedStyleAlignWith: variable
10
10
  Enabled: false
11
11
 
@@ -42,7 +42,7 @@ Style/Documentation:
42
42
  Style/DoubleNegation:
43
43
  Enabled: false
44
44
 
45
- Style/ExtraSpacing:
45
+ Layout/ExtraSpacing:
46
46
  AllowForAlignment: false
47
47
 
48
48
  Style/FrozenStringLiteralComment:
@@ -57,16 +57,16 @@ Style/HashSyntax:
57
57
  Style/IfUnlessModifier:
58
58
  Enabled: false
59
59
 
60
- Style/IndentArray:
60
+ Layout/IndentArray:
61
61
  EnforcedStyle: consistent
62
62
 
63
- Style/IndentHash:
63
+ Layout/IndentHash:
64
64
  EnforcedStyle: consistent
65
65
 
66
66
  Style/Lambda:
67
67
  EnforcedStyle: literal
68
68
 
69
- Style/MultilineMethodCallIndentation:
69
+ Layout/MultilineMethodCallIndentation:
70
70
  Enabled: false
71
71
 
72
72
  Style/NegatedIf:
@@ -78,16 +78,19 @@ Style/NegatedWhile:
78
78
  Style/StringLiterals:
79
79
  Enabled: false
80
80
 
81
- Style/TrailingCommaInLiteral:
81
+ Style/TrailingCommaInArrayLiteral:
82
+ EnforcedStyleForMultiline: consistent_comma
83
+
84
+ Style/TrailingCommaInHashLiteral:
82
85
  EnforcedStyleForMultiline: consistent_comma
83
86
 
84
87
  Style/Attr:
85
88
  Enabled: false
86
89
 
87
- Style/SpaceInLambdaLiteral:
90
+ Layout/SpaceInLambdaLiteral:
88
91
  EnforcedStyle: require_space
89
92
 
90
- Style/AlignParameters:
93
+ Layout/AlignParameters:
91
94
  EnforcedStyle: with_fixed_indentation
92
95
 
93
96
  Style/WordArray:
@@ -103,7 +106,7 @@ Style/TrailingUnderscoreVariable:
103
106
  Style/TernaryParentheses:
104
107
  Enabled: false
105
108
 
106
- Style/PredicateName:
109
+ Naming/PredicateName:
107
110
  Enabled: false
108
111
 
109
112
  Style/NumericPredicate:
@@ -115,14 +118,581 @@ Style/NumericLiterals:
115
118
  Style/ClassAndModuleChildren:
116
119
  Enabled: false
117
120
 
118
- Style/CaseIndentation:
121
+ Layout/CaseIndentation:
119
122
  EnforcedStyle: end
120
123
 
121
124
  Style/BracesAroundHashParameters:
122
125
  Enabled: false
123
126
 
124
- Style/IndentationWidth:
127
+ Layout/IndentationWidth:
125
128
  Enabled: false
126
129
 
127
130
  Style/BlockDelimiters:
128
131
  Enabled: false
132
+
133
+
134
+ # The following cops are added between 0.47.1 and 0.55.0.
135
+ # The configurations are default.
136
+ # If you want to use a cop by default, remove a configuration for the cop from here.
137
+ # If you want to disable a cop, change `Enabled` to false.
138
+
139
+ # Supports --auto-correct
140
+ Bundler/InsecureProtocolSource:
141
+ Description: The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated
142
+ because HTTP requests are insecure. Please change your source to 'https://rubygems.org'
143
+ if possible, or 'http://rubygems.org' if not.
144
+ Enabled: true
145
+ Include:
146
+ - "**/*.gemfile"
147
+ - "**/Gemfile"
148
+ - "**/gems.rb"
149
+
150
+ Gemspec/DuplicatedAssignment:
151
+ Description: An attribute assignment method calls should be listed only once in a
152
+ gemspec.
153
+ Enabled: true
154
+ Include:
155
+ - "**/*.gemspec"
156
+
157
+ # Supports --auto-correct
158
+ Gemspec/OrderedDependencies:
159
+ Description: Dependencies in the gemspec should be alphabetically sorted.
160
+ Enabled: true
161
+ Include:
162
+ - "**/*.gemspec"
163
+ TreatCommentsAsGroupSeparators: true
164
+
165
+ Gemspec/RequiredRubyVersion:
166
+ Description: Checks that `required_ruby_version` of gemspec and `TargetRubyVersion`
167
+ of .rubocop.yml are equal.
168
+ Enabled: true
169
+ Include:
170
+ - "**/*.gemspec"
171
+
172
+ # Supports --auto-correct
173
+ Layout/ClassStructure:
174
+ Description: Enforces a configured order of definitions within a class body.
175
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-classes
176
+ Enabled: false
177
+ Categories:
178
+ module_inclusion:
179
+ - include
180
+ - prepend
181
+ - extend
182
+ ExpectedOrder:
183
+ - module_inclusion
184
+ - constants
185
+ - public_class_methods
186
+ - initializer
187
+ - public_methods
188
+ - protected_methods
189
+ - private_methods
190
+
191
+ # Supports --auto-correct
192
+ Layout/EmptyComment:
193
+ Description: Checks empty comment.
194
+ Enabled: true
195
+ AllowBorderComment: true
196
+ AllowMarginComment: true
197
+
198
+ # Supports --auto-correct
199
+ Layout/EmptyLineAfterMagicComment:
200
+ Description: Add an empty line after magic comments to separate them from code.
201
+ StyleGuide: "#separate-magic-comments-from-code"
202
+ Enabled: true
203
+
204
+ # Supports --auto-correct
205
+ Layout/EmptyLinesAroundArguments:
206
+ Description: Keeps track of empty lines around method arguments.
207
+ Enabled: true
208
+
209
+ # Supports --auto-correct
210
+ Layout/EmptyLinesAroundBeginBody:
211
+ Description: Keeps track of empty lines around begin-end bodies.
212
+ StyleGuide: "#empty-lines-around-bodies"
213
+ Enabled: true
214
+
215
+ # Supports --auto-correct
216
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
217
+ Description: Keeps track of empty lines around exception handling keywords.
218
+ StyleGuide: "#empty-lines-around-bodies"
219
+ Enabled: true
220
+
221
+ # Supports --auto-correct
222
+ Layout/IndentHeredoc:
223
+ Description: This cops checks the indentation of the here document bodies.
224
+ StyleGuide: "#squiggly-heredocs"
225
+ Enabled: true
226
+ EnforcedStyle: auto_detection
227
+ SupportedStyles:
228
+ - auto_detection
229
+ - squiggly
230
+ - active_support
231
+ - powerpack
232
+ - unindent
233
+
234
+ # Supports --auto-correct
235
+ Layout/SpaceInsideArrayLiteralBrackets:
236
+ Description: Checks the spacing inside array literal brackets.
237
+ Enabled: true
238
+ EnforcedStyle: no_space
239
+ SupportedStyles:
240
+ - space
241
+ - no_space
242
+ - compact
243
+ EnforcedStyleForEmptyBrackets: no_space
244
+ SupportedStylesForEmptyBrackets:
245
+ - space
246
+ - no_space
247
+
248
+ # Supports --auto-correct
249
+ Layout/SpaceInsideReferenceBrackets:
250
+ Description: Checks the spacing inside referential brackets.
251
+ Enabled: true
252
+ EnforcedStyle: no_space
253
+ SupportedStyles:
254
+ - space
255
+ - no_space
256
+ EnforcedStyleForEmptyBrackets: no_space
257
+ SupportedStylesForEmptyBrackets:
258
+ - space
259
+ - no_space
260
+
261
+ Lint/AmbiguousBlockAssociation:
262
+ Description: Checks for ambiguous block association with method when param passed
263
+ without parentheses.
264
+ StyleGuide: "#syntax"
265
+ Enabled: true
266
+
267
+ # Supports --auto-correct
268
+ Lint/BigDecimalNew:
269
+ Description: "`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead."
270
+ Enabled: true
271
+
272
+ Lint/BooleanSymbol:
273
+ Description: Check for `:true` and `:false` symbols.
274
+ Enabled: true
275
+
276
+ Lint/InterpolationCheck:
277
+ Description: Raise warning for interpolation in single q strs
278
+ Enabled: true
279
+
280
+ Lint/MissingCopEnableDirective:
281
+ Description: Checks for a `# rubocop:enable` after `# rubocop:disable`
282
+ Enabled: true
283
+ MaximumRangeSize: .inf
284
+
285
+ Lint/NestedPercentLiteral:
286
+ Description: Checks for nested percent literals.
287
+ Enabled: true
288
+
289
+ Lint/NumberConversion:
290
+ Description: Checks unsafe usage of number conversion methods.
291
+ Enabled: false
292
+
293
+ # Supports --auto-correct
294
+ Lint/OrderedMagicComments:
295
+ Description: Checks the proper ordering of magic comments and whether a magic comment
296
+ is not placed before a shebang.
297
+ Enabled: true
298
+
299
+ # Supports --auto-correct
300
+ Lint/RedundantWithIndex:
301
+ Description: Checks for redundant `with_index`.
302
+ Enabled: true
303
+
304
+ # Supports --auto-correct
305
+ Lint/RedundantWithObject:
306
+ Description: Checks for redundant `with_object`.
307
+ Enabled: true
308
+
309
+ Lint/RegexpAsCondition:
310
+ Description: Do not use regexp literal as a condition. The regexp literal matches
311
+ `$_` implicitly.
312
+ Enabled: true
313
+
314
+ # Supports --auto-correct
315
+ Lint/RescueType:
316
+ Description: Avoid rescuing from non constants that could result in a `TypeError`.
317
+ Enabled: true
318
+
319
+ Lint/ReturnInVoidContext:
320
+ Description: Checks for return in void context.
321
+ Enabled: true
322
+
323
+ # Supports --auto-correct
324
+ Lint/ScriptPermission:
325
+ Description: Grant script file execute permission.
326
+ Enabled: true
327
+
328
+ Lint/ShadowedArgument:
329
+ Description: Avoid reassigning arguments before they were used.
330
+ Enabled: true
331
+ IgnoreImplicitReferences: false
332
+
333
+ # Supports --auto-correct
334
+ Lint/UnneededCopEnableDirective:
335
+ Description: Checks for rubocop:enable comments that can be removed.
336
+ Enabled: true
337
+
338
+ # Supports --auto-correct
339
+ Lint/UnneededRequireStatement:
340
+ Description: Checks for unnecessary `require` statement.
341
+ Enabled: true
342
+
343
+ Lint/UriEscapeUnescape:
344
+ Description: "`URI.escape` method is obsolete and should not be used. Instead, use
345
+ `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending
346
+ on your specific use case. Also `URI.unescape` method is obsolete and should not
347
+ be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component`
348
+ depending on your specific use case."
349
+ Enabled: true
350
+
351
+ # Supports --auto-correct
352
+ Lint/UriRegexp:
353
+ Description: Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.
354
+ Enabled: true
355
+
356
+ Naming/HeredocDelimiterCase:
357
+ Description: Use configured case for heredoc delimiters.
358
+ StyleGuide: "#heredoc-delimiters"
359
+ Enabled: true
360
+ EnforcedStyle: uppercase
361
+ SupportedStyles:
362
+ - lowercase
363
+ - uppercase
364
+
365
+ Naming/HeredocDelimiterNaming:
366
+ Description: Use descriptive heredoc delimiters.
367
+ StyleGuide: "#heredoc-delimiters"
368
+ Enabled: true
369
+ Blacklist:
370
+ - !ruby/regexp /(^|\s)(EO[A-Z]{1}|END)(\s|$)/
371
+
372
+ Naming/MemoizedInstanceVariableName:
373
+ Description: Memoized method name should match memo instance variable name.
374
+ Enabled: true
375
+
376
+ Naming/UncommunicativeBlockParamName:
377
+ Description: Checks for block parameter names that contain capital letters, end in
378
+ numbers, or do not meet a minimal length.
379
+ Enabled: true
380
+ MinNameLength: 1
381
+ AllowNamesEndingInNumbers: true
382
+ AllowedNames: []
383
+ ForbiddenNames: []
384
+
385
+ Naming/UncommunicativeMethodParamName:
386
+ Description: Checks for method parameter names that contain capital letters, end in
387
+ numbers, or do not meet a minimal length.
388
+ Enabled: true
389
+ MinNameLength: 3
390
+ AllowNamesEndingInNumbers: true
391
+ AllowedNames:
392
+ - io
393
+ - id
394
+ - to
395
+ - by
396
+ - 'on'
397
+ - in
398
+ - at
399
+ ForbiddenNames: []
400
+
401
+ Performance/Caller:
402
+ Description: Use `caller(n..n)` instead of `caller`.
403
+ Enabled: true
404
+
405
+ # Supports --auto-correct
406
+ Performance/DoubleStartEndWith:
407
+ Description: Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x,
408
+ ...) || str.{start,end}_with?(y, ...)`.
409
+ Enabled: true
410
+ IncludeActiveSupportAliases: false
411
+
412
+ Performance/UnfreezeString:
413
+ Description: Use unary plus to get an unfrozen string literal.
414
+ Enabled: true
415
+
416
+ # Supports --auto-correct
417
+ Performance/UriDefaultParser:
418
+ Description: Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
419
+ Enabled: true
420
+
421
+ # Supports --auto-correct
422
+ Rails/ActiveRecordAliases:
423
+ Description: 'Avoid Active Record aliases: Use `update` instead of `update_attributes`.
424
+ Use `update!` instead of `update_attributes!`.'
425
+ Enabled: true
426
+
427
+ # Supports --auto-correct
428
+ Rails/ActiveSupportAliases:
429
+ Description: 'Avoid ActiveSupport aliases of standard ruby methods: `String#starts_with?`,
430
+ `String#ends_with?`, `Array#append`, `Array#prepend`.'
431
+ Enabled: true
432
+
433
+ # Supports --auto-correct
434
+ Rails/ApplicationJob:
435
+ Description: Check that jobs subclass ApplicationJob.
436
+ Enabled: true
437
+
438
+ # Supports --auto-correct
439
+ Rails/ApplicationRecord:
440
+ Description: Check that models subclass ApplicationRecord.
441
+ Enabled: true
442
+
443
+ # Supports --auto-correct
444
+ Rails/Blank:
445
+ Description: Enforce using `blank?` and `present?`.
446
+ Enabled: true
447
+ NilOrEmpty: true
448
+ NotPresent: true
449
+ UnlessPresent: true
450
+
451
+ Rails/CreateTableWithTimestamps:
452
+ Description: Checks the migration for which timestamps are not included when creating
453
+ a new table.
454
+ Enabled: true
455
+ Include:
456
+ - db/migrate/*.rb
457
+
458
+ # Supports --auto-correct
459
+ Rails/EnvironmentComparison:
460
+ Description: Favor `Rails.env.production?` over `Rails.env == 'production'`
461
+ Enabled: true
462
+
463
+ Rails/HasManyOrHasOneDependent:
464
+ Description: Define the dependent option to the has_many and has_one associations.
465
+ StyleGuide: https://github.com/bbatsov/rails-style-guide#has_many-has_one-dependent-option
466
+ Enabled: true
467
+ Include:
468
+ - app/models/**/*.rb
469
+
470
+ Rails/InverseOf:
471
+ Description: Checks for associations where the inverse cannot be determined automatically.
472
+ Enabled: true
473
+ Include:
474
+ - app/models/**/*.rb
475
+
476
+ Rails/LexicallyScopedActionFilter:
477
+ Description: Checks that methods specified in the filter's `only` or `except` options
478
+ are explicitly defined in the controller.
479
+ StyleGuide: https://github.com/bbatsov/rails-style-guide#lexically-scoped-action-filter
480
+ Enabled: true
481
+ Include:
482
+ - app/controllers/**/*.rb
483
+
484
+ # Supports --auto-correct
485
+ Rails/Presence:
486
+ Description: Checks code that can be written more easily using `Object#presence` defined
487
+ by Active Support.
488
+ Enabled: true
489
+
490
+ # Supports --auto-correct
491
+ Rails/Present:
492
+ Description: Enforce using `blank?` and `present?`.
493
+ Enabled: true
494
+ NotNilAndNotEmpty: true
495
+ NotBlank: true
496
+ UnlessBlank: true
497
+
498
+ # Supports --auto-correct
499
+ Rails/RedundantReceiverInWithOptions:
500
+ Description: Checks for redundant receiver in `with_options`.
501
+ Enabled: true
502
+
503
+ # Supports --auto-correct
504
+ Rails/RelativeDateConstant:
505
+ Description: Do not assign relative date to constants.
506
+ Enabled: true
507
+
508
+ Rails/UnknownEnv:
509
+ Description: Use correct environment name.
510
+ Enabled: true
511
+ Environments:
512
+ - development
513
+ - test
514
+ - production
515
+
516
+ Security/Open:
517
+ Description: The use of Kernel#open represents a serious security risk.
518
+ Enabled: true
519
+
520
+ # Supports --auto-correct
521
+ Style/ColonMethodDefinition:
522
+ Description: 'Do not use :: for defining class methods.'
523
+ StyleGuide: "#colon-method-definition"
524
+ Enabled: true
525
+
526
+ Style/CommentedKeyword:
527
+ Description: Do not place comments on the same line as certain keywords.
528
+ Enabled: true
529
+
530
+ Style/DateTime:
531
+ Description: Use Date or Time over DateTime.
532
+ StyleGuide: "#date--time"
533
+ Enabled: true
534
+
535
+ # Supports --auto-correct
536
+ Style/Dir:
537
+ Description: Use the `__dir__` method to retrieve the canonicalized absolute path
538
+ to the current file.
539
+ Enabled: true
540
+
541
+ # Supports --auto-correct
542
+ Style/EmptyBlockParameter:
543
+ Description: Omit pipes for empty block parameters.
544
+ Enabled: true
545
+
546
+ # Supports --auto-correct
547
+ Style/EmptyLambdaParameter:
548
+ Description: Omit parens for empty lambda parameters.
549
+ Enabled: true
550
+
551
+ # Supports --auto-correct
552
+ Style/EmptyLineAfterGuardClause:
553
+ Description: Add empty line after guard clause.
554
+ Enabled: false
555
+
556
+ Style/EvalWithLocation:
557
+ Description: Pass `__FILE__` and `__LINE__` to `eval` method, as they are used by
558
+ backtraces.
559
+ Enabled: true
560
+
561
+ # Supports --auto-correct
562
+ Style/ExpandPathArguments:
563
+ Description: Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`.
564
+ Enabled: true
565
+
566
+ Style/FormatStringToken:
567
+ Description: Use a consistent style for format string tokens.
568
+ Enabled: true
569
+ EnforcedStyle: annotated
570
+ SupportedStyles:
571
+ - annotated
572
+ - template
573
+ - unannotated
574
+
575
+ # Supports --auto-correct
576
+ Style/InverseMethods:
577
+ Description: Use the inverse method instead of `!.method` if an inverse method is
578
+ defined.
579
+ Enabled: true
580
+ InverseMethods:
581
+ :any?: :none?
582
+ :even?: :odd?
583
+ :==: :!=
584
+ :=~: :!~
585
+ :<: :>=
586
+ :>: :<=
587
+ InverseBlocks:
588
+ :select: :reject
589
+ :select!: :reject!
590
+
591
+ # Supports --auto-correct
592
+ Style/MinMax:
593
+ Description: Use `Enumerable#minmax` instead of `Enumerable#min` and `Enumerable#max`
594
+ in conjunction.'
595
+ Enabled: true
596
+
597
+ # Supports --auto-correct
598
+ Style/MixinGrouping:
599
+ Description: Checks for grouping of mixins in `class` and `module` bodies.
600
+ StyleGuide: "#mixin-grouping"
601
+ Enabled: true
602
+ EnforcedStyle: separated
603
+ SupportedStyles:
604
+ - separated
605
+ - grouped
606
+
607
+ Style/MixinUsage:
608
+ Description: Checks that `include`, `extend` and `prepend` exists at the top level.
609
+ Enabled: true
610
+
611
+ Style/MultipleComparison:
612
+ Description: Avoid comparing a variable with multiple items in a conditional, use
613
+ Array#include? instead.
614
+ Enabled: true
615
+
616
+ # Supports --auto-correct
617
+ Style/OrAssignment:
618
+ Description: Recommend usage of double pipe equals (||=) where applicable.
619
+ StyleGuide: "#double-pipe-for-uninit"
620
+ Enabled: true
621
+
622
+ # Supports --auto-correct
623
+ Style/RandomWithOffset:
624
+ Description: Prefer to use ranges when generating random numbers instead of integers
625
+ with offsets.
626
+ StyleGuide: "#random-numbers"
627
+ Enabled: true
628
+
629
+ # Supports --auto-correct
630
+ Style/RedundantConditional:
631
+ Description: Don't return true/false from a conditional.
632
+ Enabled: true
633
+
634
+ # Supports --auto-correct
635
+ Style/RescueStandardError:
636
+ Description: Avoid rescuing without specifying an error class.
637
+ Enabled: true
638
+ EnforcedStyle: explicit
639
+ SupportedStyles:
640
+ - implicit
641
+ - explicit
642
+
643
+ # Supports --auto-correct
644
+ Style/ReturnNil:
645
+ Description: Use return instead of return nil.
646
+ Enabled: false
647
+ EnforcedStyle: return
648
+ SupportedStyles:
649
+ - return
650
+ - return_nil
651
+
652
+ # Supports --auto-correct
653
+ Style/StderrPuts:
654
+ Description: Use `warn` instead of `$stderr.puts`.
655
+ StyleGuide: "#warn"
656
+ Enabled: true
657
+
658
+ # Supports --auto-correct
659
+ Style/StringHashKeys:
660
+ Description: Prefer symbols instead of strings as hash keys.
661
+ StyleGuide: "#symbols-as-keys"
662
+ Enabled: false
663
+
664
+ # Supports --auto-correct
665
+ Style/TrailingBodyOnClass:
666
+ Description: Class body goes below class statement.
667
+ Enabled: true
668
+
669
+ # Supports --auto-correct
670
+ Style/TrailingBodyOnMethodDefinition:
671
+ Description: Method body goes below definition.
672
+ Enabled: true
673
+
674
+ # Supports --auto-correct
675
+ Style/TrailingBodyOnModule:
676
+ Description: Module body goes below module statement.
677
+ Enabled: true
678
+
679
+ # Supports --auto-correct
680
+ Style/TrailingMethodEndStatement:
681
+ Description: Checks for trailing end statement on line of method body.
682
+ Enabled: true
683
+
684
+ # Supports --auto-correct
685
+ Style/UnpackFirst:
686
+ Description: Checks for accessing the first element of `String#unpack` instead of
687
+ using `unpack1`
688
+ Enabled: true
689
+
690
+ # Supports --auto-correct
691
+ Style/YodaCondition:
692
+ Description: Do not use literals as the first operand of a comparison.
693
+ Reference: https://en.wikipedia.org/wiki/Yoda_conditions
694
+ Enabled: true
695
+ EnforcedStyle: all_comparison_operators
696
+ SupportedStyles:
697
+ - all_comparison_operators
698
+ - equality_operators_only