her 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +19 -1279
  3. data/.rubocop_todo.yml +232 -0
  4. data/README.md +16 -0
  5. data/her.gemspec +3 -2
  6. data/lib/her/api.rb +8 -7
  7. data/lib/her/collection.rb +2 -1
  8. data/lib/her/errors.rb +3 -1
  9. data/lib/her/json_api/model.rb +8 -12
  10. data/lib/her/middleware.rb +1 -1
  11. data/lib/her/middleware/accept_json.rb +1 -0
  12. data/lib/her/middleware/first_level_parse_json.rb +6 -5
  13. data/lib/her/middleware/json_api_parser.rb +6 -5
  14. data/lib/her/middleware/parse_json.rb +2 -1
  15. data/lib/her/middleware/second_level_parse_json.rb +6 -5
  16. data/lib/her/model/associations.rb +6 -6
  17. data/lib/her/model/associations/association.rb +7 -9
  18. data/lib/her/model/associations/association_proxy.rb +2 -3
  19. data/lib/her/model/associations/belongs_to_association.rb +1 -1
  20. data/lib/her/model/attributes.rb +6 -6
  21. data/lib/her/model/base.rb +2 -2
  22. data/lib/her/model/http.rb +1 -1
  23. data/lib/her/model/introspection.rb +5 -3
  24. data/lib/her/model/nested_attributes.rb +1 -1
  25. data/lib/her/model/orm.rb +9 -8
  26. data/lib/her/model/parse.rb +9 -12
  27. data/lib/her/model/paths.rb +3 -4
  28. data/lib/her/model/relation.rb +5 -4
  29. data/lib/her/version.rb +1 -1
  30. data/spec/api_spec.rb +3 -0
  31. data/spec/middleware/accept_json_spec.rb +1 -0
  32. data/spec/middleware/first_level_parse_json_spec.rb +2 -1
  33. data/spec/middleware/json_api_parser_spec.rb +1 -0
  34. data/spec/middleware/second_level_parse_json_spec.rb +1 -0
  35. data/spec/model/associations/association_proxy_spec.rb +1 -0
  36. data/spec/model/associations_spec.rb +4 -3
  37. data/spec/model/attributes_spec.rb +5 -3
  38. data/spec/model/callbacks_spec.rb +14 -15
  39. data/spec/model/dirty_spec.rb +1 -0
  40. data/spec/model/http_spec.rb +1 -0
  41. data/spec/model/introspection_spec.rb +3 -2
  42. data/spec/model/nested_attributes_spec.rb +1 -0
  43. data/spec/model/orm_spec.rb +22 -16
  44. data/spec/model/parse_spec.rb +3 -0
  45. data/spec/model/paths_spec.rb +1 -0
  46. data/spec/model/relation_spec.rb +3 -2
  47. data/spec/model/validations_spec.rb +1 -0
  48. data/spec/model_spec.rb +1 -0
  49. data/spec/support/extensions/array.rb +1 -0
  50. data/spec/support/extensions/hash.rb +1 -0
  51. metadata +12 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 109d53a5d927fd7ee67674af4b5944f06c2c6de4
4
- data.tar.gz: cef631d95fa6b495bd92c354e5a9122d296b42a6
3
+ metadata.gz: a72cb092e9ad9719279c17ffea56818bc6776996
4
+ data.tar.gz: 31e57aa89987fdcaf82e74c017827038addc7302
5
5
  SHA512:
6
- metadata.gz: 4e229413c7297cd7c5864880d6a98658fd194eb2deac87724841e4bc6f58dfa7a7a42056d092a9250f0f99506a4e6d67051ce63f2970d0e1281ac881b37bc587
7
- data.tar.gz: b5fb836f54c4fbd89c201f4a213078900357eb0dfe57e3977ff2966daec1c5e7a7a0236d016bb055a45ce8a1d342e3d4dcdbd217ce7fe5cb8887a122f343efe5
6
+ metadata.gz: c1b80f48494a10e96b5a410adacc1b49bac9e4736490eb4700fef4bcbedc350658a432d78ea455e9a36ff95fda87054fe71123eb2ec160b82d08cc00c6cec599
7
+ data.tar.gz: 79ece2883073b3c6903165b3e9aa82f3a25f757b49924e38e0bcd36c1589895addf3aa8b18f46549d5aa20ece04a43e38adf66af30fd02feabae4781fdc3660b
@@ -1,1291 +1,31 @@
1
- # This is the default configuration file. Enabling and disabling is configured
2
- # in separate files. This file adds all other parameters apart from Enabled.
1
+ inherit_from: .rubocop_todo.yml
3
2
 
4
- inherit_from:
5
- # - enabled.yml
6
- # - disabled.yml
3
+ Layout/CaseIndentation:
4
+ EnforcedStyle: end
7
5
 
8
- # Common configuration.
9
- AllCops:
10
- # Include common Ruby source files.
11
- Include:
12
- - '**/*.gemspec'
13
- - '**/*.podspec'
14
- - '**/*.jbuilder'
15
- - '**/*.rake'
16
- - '**/*.opal'
17
- - '**/config.ru'
18
- - '**/Gemfile'
19
- - '**/Rakefile'
20
- - '**/Capfile'
21
- - '**/Guardfile'
22
- - '**/Podfile'
23
- - '**/Thorfile'
24
- - '**/Vagrantfile'
25
- - '**/Berksfile'
26
- - '**/Cheffile'
27
- - '**/Vagabondfile'
28
- - '**/Fastfile'
29
- - '**/*Fastfile'
30
- Exclude:
31
- - 'vendor/**/*'
32
- # Default formatter will be used if no -f/--format option is given.
33
- DefaultFormatter: progress
34
- # Cop names are not displayed in offense messages by default. Change behavior
35
- # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
36
- # option.
37
- DisplayCopNames: false
38
- # Style guide URLs are not displayed in offense messages by default. Change
39
- # behavior by overriding DisplayStyleGuide, or by giving the
40
- # -S/--display-style-guide option.
41
- DisplayStyleGuide: false
42
- # When specifying style guide URLs, any paths and/or fragments will be
43
- # evaluated relative to the base URL.
44
- # StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
45
- # Extra details are not displayed in offense messages by default. Change
46
- # behavior by overriding ExtraDetails, or by giving the
47
- # -E/--extra-details option.
48
- ExtraDetails: false
49
- # Additional cops that do not reference a style guide rule may be enabled by
50
- # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
51
- # the --only-guide-cops option.
52
- StyleGuideCopsOnly: false
53
- # All cops except the ones in disabled.yml are enabled by default. Change
54
- # this behavior by overriding DisabledByDefault. When DisabledByDefault is
55
- # true, all cops in the default configuration are disabled, and and only cops
56
- # in user configuration are enabled. This makes cops opt-in instead of
57
- # opt-out. Note that when DisabledByDefault is true, cops in user
58
- # configuration will be enabled even if they don't set the Enabled parameter.
59
- DisabledByDefault: false
60
- # Enables the result cache if true. Can be overridden by the --cache command
61
- # line option.
62
- UseCache: true
63
- # Threshold for how many files can be stored in the result cache before some
64
- # of the files are automatically removed.
65
- MaxFilesInCache: 20000
66
- # The cache will be stored in "rubocop_cache" under this directory. The name
67
- # "/tmp" is special and will be converted to the system temporary directory,
68
- # which is "/tmp" on Unix-like systems, but could be something else on other
69
- # systems.
70
- CacheRootDirectory: /tmp
71
- # The default cache root directory is /tmp, which on most systems is
72
- # writable by any system user. This means that it is possible for a
73
- # malicious user to anticipate the location of Rubocop's cache directory,
74
- # and create a symlink in its place that could cause Rubocop to overwrite
75
- # unintended files, or read malicious input. If you are certain that your
76
- # cache location is secure from this kind of attack, and wish to use a
77
- # symlinked cache location, set this value to "true".
78
- AllowSymlinksInCacheRootDirectory: false
79
- # What MRI version of the Ruby interpreter is the inspected code intended to
80
- # run on? (If there is more than one, set this to the lowest version.)
81
- # If a value is specified for TargetRubyVersion then it is used.
82
- # Else if .ruby-version exists and it contains an MRI version it is used.
83
- # Otherwise we fallback to the oldest officially supported Ruby version (2.0).
84
- TargetRubyVersion: ~
6
+ Layout/EmptyLinesAroundClassBody:
7
+ EnforcedStyle: beginning_only
85
8
 
86
- # Indent private/protected/public as deep as method definitions
87
- Style/AccessModifierIndentation:
88
- EnforcedStyle: indent
89
- SupportedStyles:
90
- - outdent
91
- - indent
92
- # By default, the indentation width from Style/IndentationWidth is used
93
- # But it can be overridden by setting this parameter
94
- IndentationWidth: ~
9
+ Lint/AmbiguousBlockAssociation:
10
+ Enabled: false
95
11
 
96
- Style/Alias:
97
- EnforcedStyle: prefer_alias
98
- SupportedStyles:
99
- - prefer_alias
100
- - prefer_alias_method
12
+ Lint/AmbiguousOperator:
13
+ Enabled: false
101
14
 
102
- # Align the elements of a hash literal if they span more than one line.
103
- Style/AlignHash:
104
- # Alignment of entries using hash rocket as separator. Valid values are:
105
- #
106
- # key - left alignment of keys
107
- # 'a' => 2
108
- # 'bb' => 3
109
- # separator - alignment of hash rockets, keys are right aligned
110
- # 'a' => 2
111
- # 'bb' => 3
112
- # table - left alignment of keys, hash rockets, and values
113
- # 'a' => 2
114
- # 'bb' => 3
115
- EnforcedHashRocketStyle: key
116
- # Alignment of entries using colon as separator. Valid values are:
117
- #
118
- # key - left alignment of keys
119
- # a: 0
120
- # bb: 1
121
- # separator - alignment of colons, keys are right aligned
122
- # a: 0
123
- # bb: 1
124
- # table - left alignment of keys and values
125
- # a: 0
126
- # bb: 1
127
- EnforcedColonStyle: key
128
- # Select whether hashes that are the last argument in a method call should be
129
- # inspected? Valid values are:
130
- #
131
- # always_inspect - Inspect both implicit and explicit hashes.
132
- # Registers an offense for:
133
- # function(a: 1,
134
- # b: 2)
135
- # Registers an offense for:
136
- # function({a: 1,
137
- # b: 2})
138
- # always_ignore - Ignore both implicit and explicit hashes.
139
- # Accepts:
140
- # function(a: 1,
141
- # b: 2)
142
- # Accepts:
143
- # function({a: 1,
144
- # b: 2})
145
- # ignore_implicit - Ignore only implicit hashes.
146
- # Accepts:
147
- # function(a: 1,
148
- # b: 2)
149
- # Registers an offense for:
150
- # function({a: 1,
151
- # b: 2})
152
- # ignore_explicit - Ignore only explicit hashes.
153
- # Accepts:
154
- # function({a: 1,
155
- # b: 2})
156
- # Registers an offense for:
157
- # function(a: 1,
158
- # b: 2)
159
- EnforcedLastArgumentHashStyle: always_inspect
160
- SupportedLastArgumentHashStyles:
161
- - always_inspect
162
- - always_ignore
163
- - ignore_implicit
164
- - ignore_explicit
165
-
166
- Style/AlignParameters:
167
- # Alignment of parameters in multi-line method calls.
168
- #
169
- # The `with_first_parameter` style aligns the following lines along the same
170
- # column as the first parameter.
171
- #
172
- # method_call(a,
173
- # b)
174
- #
175
- # The `with_fixed_indentation` style aligns the following lines with one
176
- # level of indentation relative to the start of the line with the method call.
177
- #
178
- # method_call(a,
179
- # b)
180
- EnforcedStyle: with_first_parameter
181
- SupportedStyles:
182
- - with_first_parameter
183
- - with_fixed_indentation
184
- # By default, the indentation width from Style/IndentationWidth is used
185
- # But it can be overridden by setting this parameter
186
- IndentationWidth: ~
187
-
188
- Style/AndOr:
189
- # Whether `and` and `or` are banned only in conditionals (conditionals)
190
- # or completely (always).
191
- EnforcedStyle: always
192
- SupportedStyles:
193
- - always
194
- - conditionals
195
-
196
-
197
- # Checks if usage of %() or %Q() matches configuration.
198
- Style/BarePercentLiterals:
199
- EnforcedStyle: bare_percent
200
- SupportedStyles:
201
- - percent_q
202
- - bare_percent
203
-
204
- Style/BlockDelimiters:
205
- EnforcedStyle: line_count_based
206
- SupportedStyles:
207
- # The `line_count_based` style enforces braces around single line blocks and
208
- # do..end around multi-line blocks.
209
- - line_count_based
210
- # The `semantic` style enforces braces around functional blocks, where the
211
- # primary purpose of the block is to return a value and do..end for
212
- # procedural blocks, where the primary purpose of the block is its
213
- # side-effects.
214
- #
215
- # This looks at the usage of a block's method to determine its type (e.g. is
216
- # the result of a `map` assigned to a variable or passed to another
217
- # method) but exceptions are permitted in the `ProceduralMethods`,
218
- # `FunctionalMethods` and `IgnoredMethods` sections below.
219
- - semantic
220
- # The `braces_for_chaining` style enforces braces around single line blocks
221
- # and do..end around multi-line blocks, except for multi-line blocks whose
222
- # return value is being chained with another method (in which case braces
223
- # are enforced).
224
- - braces_for_chaining
225
- ProceduralMethods:
226
- # Methods that are known to be procedural in nature but look functional from
227
- # their usage, e.g.
228
- #
229
- # time = Benchmark.realtime do
230
- # foo.bar
231
- # end
232
- #
233
- # Here, the return value of the block is discarded but the return value of
234
- # `Benchmark.realtime` is used.
235
- - benchmark
236
- - bm
237
- - bmbm
238
- - create
239
- - each_with_object
240
- - measure
241
- - new
242
- - realtime
243
- - tap
244
- - with_object
245
- FunctionalMethods:
246
- # Methods that are known to be functional in nature but look procedural from
247
- # their usage, e.g.
248
- #
249
- # let(:foo) { Foo.new }
250
- #
251
- # Here, the return value of `Foo.new` is used to define a `foo` helper but
252
- # doesn't appear to be used from the return value of `let`.
253
- - let
254
- - let!
255
- - subject
256
- - watch
257
- IgnoredMethods:
258
- # Methods that can be either procedural or functional and cannot be
259
- # categorised from their usage alone, e.g.
260
- #
261
- # foo = lambda do |x|
262
- # puts "Hello, #{x}"
263
- # end
264
- #
265
- # foo = lambda do |x|
266
- # x * 100
267
- # end
268
- #
269
- # Here, it is impossible to tell from the return value of `lambda` whether
270
- # the inner block's return value is significant.
271
- - lambda
272
- - proc
273
- - it
274
-
275
- Style/BracesAroundHashParameters:
276
- EnforcedStyle: no_braces
277
- SupportedStyles:
278
- # The `braces` style enforces braces around all method parameters that are
279
- # hashes.
280
- - braces
281
- # The `no_braces` style checks that the last parameter doesn't have braces
282
- # around it.
283
- - no_braces
284
- # The `context_dependent` style checks that the last parameter doesn't have
285
- # braces around it, but requires braces if the second to last parameter is
286
- # also a hash literal.
287
- - context_dependent
288
-
289
- # Indentation of `when`.
290
- Style/CaseIndentation:
291
- IndentWhenRelativeTo: case
292
- SupportedStyles:
293
- - case
294
- - end
295
- IndentOneStep: false
296
- # By default, the indentation width from Style/IndentationWidth is used
297
- # But it can be overridden by setting this parameter
298
- # This only matters if IndentOneStep is true
299
- IndentationWidth: ~
300
-
301
- Style/ClassAndModuleChildren:
302
- # Checks the style of children definitions at classes and modules.
303
- #
304
- # Basically there are two different styles:
305
- #
306
- # `nested` - have each child on a separate line
307
- # class Foo
308
- # class Bar
309
- # end
310
- # end
311
- #
312
- # `compact` - combine definitions as much as possible
313
- # class Foo::Bar
314
- # end
315
- #
316
- # The compact style is only forced, for classes / modules with one child.
317
- EnforcedStyle: nested
318
- SupportedStyles:
319
- - nested
320
- - compact
321
-
322
- Style/ClassCheck:
323
- EnforcedStyle: is_a?
324
- SupportedStyles:
325
- - is_a?
326
- - kind_of?
327
-
328
- # Align with the style guide.
329
- Style/CollectionMethods:
330
- # Mapping from undesired method to desired_method
331
- # e.g. to use `detect` over `find`:
332
- #
333
- # CollectionMethods:
334
- # PreferredMethods:
335
- # find: detect
336
- PreferredMethods:
337
- collect: 'map'
338
- collect!: 'map!'
339
- inject: 'reduce'
340
- detect: 'find'
341
- find_all: 'select'
342
-
343
- # Use ` or %x around command literals.
344
- Style/CommandLiteral:
345
- EnforcedStyle: backticks
346
- # backticks: Always use backticks.
347
- # percent_x: Always use %x.
348
- # mixed: Use backticks on single-line commands, and %x on multi-line commands.
349
- SupportedStyles:
350
- - backticks
351
- - percent_x
352
- - mixed
353
- # If false, the cop will always recommend using %x if one or more backticks
354
- # are found in the command string.
355
- AllowInnerBackticks: false
356
-
357
- # Checks formatting of special comments
358
- Style/CommentAnnotation:
359
- Keywords:
360
- - TODO
361
- - FIXME
362
- - OPTIMIZE
363
- - HACK
364
- - REVIEW
365
-
366
- Style/ConditionalAssignment:
367
- EnforcedStyle: assign_to_condition
368
- SupportedStyles:
369
- - assign_to_condition
370
- - assign_inside_condition
371
- # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
372
- # will only register an offense when all branches of a condition are
373
- # a single line.
374
- # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
375
- # will only register an offense for assignment to a condition that has
376
- # at least one multiline branch.
377
- SingleLineConditionsOnly: true
378
-
379
- # Checks that you have put a copyright in a comment before any code.
380
- #
381
- # You can override the default Notice in your .rubocop.yml file.
382
- #
383
- # In order to use autocorrect, you must supply a value for the
384
- # AutocorrectNotice key that matches the regexp Notice. A blank
385
- # AutocorrectNotice will cause an error during autocorrect.
386
- #
387
- # Autocorrect will add a copyright notice in a comment at the top
388
- # of the file immediately after any shebang or encoding comments.
389
- #
390
- # Example rubocop.yml:
391
- #
392
- # Style/Copyright:
393
- # Enabled: true
394
- # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
395
- # AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
396
- #
397
- Style/Copyright:
398
- Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
399
- AutocorrectNotice: ''
400
-
401
- Style/DocumentationMethod:
402
- RequireForNonPublicMethods: false
403
-
404
- # Multi-line method chaining should be done with leading dots.
405
- Style/DotPosition:
406
- EnforcedStyle: leading
407
- SupportedStyles:
408
- - leading
409
- - trailing
410
-
411
- # Warn on empty else statements
412
- # empty - warn only on empty else
413
- # nil - warn on else with nil in it
414
- # both - warn on empty else and else with nil in it
415
- Style/EmptyElse:
416
- EnforcedStyle: both
417
- SupportedStyles:
418
- - empty
419
- - nil
420
- - both
421
-
422
- # Use empty lines between defs.
423
- Style/EmptyLineBetweenDefs:
424
- # If true, this parameter means that single line method definitions don't
425
- # need an empty line between them.
426
- AllowAdjacentOneLineDefs: false
427
-
428
- Style/EmptyLinesAroundBlockBody:
429
- EnforcedStyle: no_empty_lines
430
- SupportedStyles:
431
- - empty_lines
432
- - no_empty_lines
433
-
434
- Style/EmptyLinesAroundClassBody:
435
- EnforcedStyle: no_empty_lines
436
- SupportedStyles:
437
- - empty_lines
438
- - no_empty_lines
439
-
440
- Style/EmptyLinesAroundModuleBody:
441
- EnforcedStyle: no_empty_lines
442
- SupportedStyles:
443
- - empty_lines
444
- - no_empty_lines
445
-
446
- # Checks whether the source file has a utf-8 encoding comment or not
447
- # AutoCorrectEncodingComment must match the regex
448
- # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
449
- Style/Encoding:
450
- EnforcedStyle: never
451
- SupportedStyles:
452
- - when_needed
453
- - always
454
- - never
455
- AutoCorrectEncodingComment: '# encoding: utf-8'
456
-
457
- Style/ExtraSpacing:
458
- # When true, allows most uses of extra spacing if the intent is to align
459
- # things with the previous or next line, not counting empty lines or comment
460
- # lines.
461
- AllowForAlignment: true
462
- # When true, forces the alignment of = in assignments on consecutive lines.
463
- ForceEqualSignAlignment: false
464
-
465
- Style/FileName:
466
- # File names listed in AllCops:Include are excluded by default. Add extra
467
- # excludes here.
468
- Exclude: []
469
- # When true, requires that each source file should define a class or module
470
- # with a name which matches the file name (converted to ... case).
471
- # It further expects it to be nested inside modules which match the names
472
- # of subdirectories in its path.
473
- ExpectMatchingDefinition: false
474
- # If non-nil, expect all source file names to match the following regex.
475
- # Only the file name itself is matched, not the entire file path.
476
- # Use anchors as necessary if you want to match the entire name rather than
477
- # just a part of it.
478
- Regex: ~
479
- # With `IgnoreExecutableScripts` set to `true`, this cop does not
480
- # report offending filenames for executable scripts (i.e. source
481
- # files with a shebang in the first line).
482
- IgnoreExecutableScripts: true
483
-
484
- Style/FirstParameterIndentation:
485
- EnforcedStyle: special_for_inner_method_call_in_parentheses
486
- SupportedStyles:
487
- # The first parameter should always be indented one step more than the
488
- # preceding line.
489
- - consistent
490
- # The first parameter should normally be indented one step more than the
491
- # preceding line, but if it's a parameter for a method call that is itself
492
- # a parameter in a method call, then the inner parameter should be indented
493
- # relative to the inner method.
494
- - special_for_inner_method_call
495
- # Same as special_for_inner_method_call except that the special rule only
496
- # applies if the outer method call encloses its arguments in parentheses.
497
- - special_for_inner_method_call_in_parentheses
498
- # By default, the indentation width from Style/IndentationWidth is used
499
- # But it can be overridden by setting this parameter
500
- IndentationWidth: ~
501
-
502
- # Checks use of for or each in multiline loops.
503
- Style/For:
504
- EnforcedStyle: each
505
- SupportedStyles:
506
- - for
507
- - each
508
-
509
- # Enforce the method used for string formatting.
510
- Style/FormatString:
511
- EnforcedStyle: format
512
- SupportedStyles:
513
- - format
514
- - sprintf
515
- - percent
15
+ Lint/AssignmentInCondition:
16
+ Enabled: false
516
17
 
517
- Style/FrozenStringLiteralComment:
518
- EnforcedStyle: when_needed
519
- SupportedStyles:
520
- # `when_needed` will add the frozen string literal comment to files
521
- # only when the `TargetRubyVersion` is set to 2.3+.
522
- - when_needed
523
- # `always` will always add the frozen string literal comment to a file
524
- # regardless of the Ruby version or if `freeze` or `<<` are called on a
525
- # string literal. If you run code against multiple versions of Ruby, it is
526
- # possible that this will create errors in Ruby 2.3.0+.
527
- - always
18
+ Naming/UncommunicativeMethodParamName:
19
+ AllowedNames: io, id, to, by
528
20
 
529
- # Built-in global variables are allowed by default.
530
- Style/GlobalVars:
531
- AllowedVariables: []
21
+ Style/AsciiComments:
22
+ Enabled: false
532
23
 
533
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
534
- # needs to have to trigger this cop
535
24
  Style/GuardClause:
536
- MinBodyLength: 1
537
-
538
- Style/HashSyntax:
539
- EnforcedStyle: ruby19
540
- SupportedStyles:
541
- # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
542
- - ruby19
543
- # checks for hash rocket syntax for all hashes
544
- - hash_rockets
545
- # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
546
- - no_mixed_keys
547
- # enforces both ruby19 and no_mixed_keys styles
548
- - ruby19_no_mixed_keys
549
- # Force hashes that have a symbol value to use hash rockets
550
- UseHashRocketsWithSymbolValues: false
551
- # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
552
- PreferHashRocketsForNonAlnumEndingSymbols: false
553
-
554
- Style/IfUnlessModifier:
555
- MaxLineLength: 80
556
-
557
- Style/IndentationConsistency:
558
- # The difference between `rails` and `normal` is that the `rails` style
559
- # prescribes that in classes and modules the `protected` and `private`
560
- # modifier keywords shall be indented the same as public methods and that
561
- # protected and private members shall be indented one step more than the
562
- # modifiers. Other than that, both styles mean that entities on the same
563
- # logical depth shall have the same indentation.
564
- EnforcedStyle: normal
565
- SupportedStyles:
566
- - normal
567
- - rails
568
-
569
- Style/IndentationWidth:
570
- # Number of spaces for each indentation level.
571
- Width: 2
572
-
573
- # Checks the indentation of the first element in an array literal.
574
- Style/IndentArray:
575
- # The value `special_inside_parentheses` means that array literals with
576
- # brackets that have their opening bracket on the same line as a surrounding
577
- # opening round parenthesis, shall have their first element indented relative
578
- # to the first position inside the parenthesis.
579
- #
580
- # The value `consistent` means that the indentation of the first element shall
581
- # always be relative to the first position of the line where the opening
582
- # bracket is.
583
- #
584
- # The value `align_brackets` means that the indentation of the first element
585
- # shall always be relative to the position of the opening bracket.
586
- EnforcedStyle: special_inside_parentheses
587
- SupportedStyles:
588
- - special_inside_parentheses
589
- - consistent
590
- - align_brackets
591
- # By default, the indentation width from Style/IndentationWidth is used
592
- # But it can be overridden by setting this parameter
593
- IndentationWidth: ~
594
-
595
- # Checks the indentation of assignment RHS, when on a different line from LHS
596
- Style/IndentAssignment:
597
- # By default, the indentation width from Style/IndentationWidth is used
598
- # But it can be overridden by setting this parameter
599
- IndentationWidth: ~
600
-
601
- # Checks the indentation of the first key in a hash literal.
602
- Style/IndentHash:
603
- # The value `special_inside_parentheses` means that hash literals with braces
604
- # that have their opening brace on the same line as a surrounding opening
605
- # round parenthesis, shall have their first key indented relative to the
606
- # first position inside the parenthesis.
607
- #
608
- # The value `consistent` means that the indentation of the first key shall
609
- # always be relative to the first position of the line where the opening
610
- # brace is.
611
- #
612
- # The value `align_braces` means that the indentation of the first key shall
613
- # always be relative to the position of the opening brace.
614
- EnforcedStyle: special_inside_parentheses
615
- SupportedStyles:
616
- - special_inside_parentheses
617
- - consistent
618
- - align_braces
619
- # By default, the indentation width from Style/IndentationWidth is used
620
- # But it can be overridden by setting this parameter
621
- IndentationWidth: ~
622
-
623
- Style/Lambda:
624
- EnforcedStyle: line_count_dependent
625
- SupportedStyles:
626
- - line_count_dependent
627
- - lambda
628
- - literal
629
-
630
- Style/LambdaCall:
631
- EnforcedStyle: call
632
- SupportedStyles:
633
- - call
634
- - braces
635
-
636
- Style/Next:
637
- # With `always` all conditions at the end of an iteration needs to be
638
- # replaced by next - with `skip_modifier_ifs` the modifier if like this one
639
- # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
640
- EnforcedStyle: skip_modifier_ifs
641
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
642
- # needs to have to trigger this cop
643
- MinBodyLength: 3
644
- SupportedStyles:
645
- - skip_modifier_ifs
646
- - always
647
-
648
- Style/NonNilCheck:
649
- # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
650
- # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
651
- # **usually** OK, but might change behavior.
652
- #
653
- # With `IncludeSemanticChanges` set to `false`, this cop does not report
654
- # offenses for `!x.nil?` and does no changes that might change behavior.
655
- IncludeSemanticChanges: false
656
-
657
- Style/NumericPredicate:
658
- EnforcedStyle: predicate
659
- SupportedStyles:
660
- - predicate
661
- - comparison
662
- # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
663
- # false positives.
664
- Exclude:
665
- - 'spec/**/*'
666
-
667
- Style/MethodDefParentheses:
668
- EnforcedStyle: require_parentheses
669
- SupportedStyles:
670
- - require_parentheses
671
- - require_no_parentheses
672
- - require_no_parentheses_except_multiline
673
-
674
- Style/MethodName:
675
- EnforcedStyle: snake_case
676
- SupportedStyles:
677
- - snake_case
678
- - camelCase
679
-
680
- Style/ModuleFunction:
681
- EnforcedStyle: module_function
682
- SupportedStyles:
683
- - module_function
684
- - extend_self
685
-
686
- Style/MultilineArrayBraceLayout:
687
- EnforcedStyle: symmetrical
688
- SupportedStyles:
689
- # symmetrical: closing brace is positioned in same way as opening brace
690
- # new_line: closing brace is always on a new line
691
- # same_line: closing brace is always on the same line as last element
692
- - symmetrical
693
- - new_line
694
- - same_line
695
-
696
- Style/MultilineAssignmentLayout:
697
- # The types of assignments which are subject to this rule.
698
- SupportedTypes:
699
- - block
700
- - case
701
- - class
702
- - if
703
- - kwbegin
704
- - module
705
- EnforcedStyle: new_line
706
- SupportedStyles:
707
- # Ensures that the assignment operator and the rhs are on the same line for
708
- # the set of supported types.
709
- - same_line
710
- # Ensures that the assignment operator and the rhs are on separate lines
711
- # for the set of supported types.
712
- - new_line
713
-
714
- Style/MultilineHashBraceLayout:
715
- EnforcedStyle: symmetrical
716
- SupportedStyles:
717
- # symmetrical: closing brace is positioned in same way as opening brace
718
- # new_line: closing brace is always on a new line
719
- # same_line: closing brace is always on same line as last element
720
- - symmetrical
721
- - new_line
722
- - same_line
723
-
724
- Style/MultilineMethodCallBraceLayout:
725
- EnforcedStyle: symmetrical
726
- SupportedStyles:
727
- # symmetrical: closing brace is positioned in same way as opening brace
728
- # new_line: closing brace is always on a new line
729
- # same_line: closing brace is always on the same line as last argument
730
- - symmetrical
731
- - new_line
732
- - same_line
733
-
734
- Style/MultilineMethodCallIndentation:
735
- EnforcedStyle: aligned
736
- SupportedStyles:
737
- - aligned
738
- - indented
739
- - indented_relative_to_receiver
740
- # By default, the indentation width from Style/IndentationWidth is used
741
- # But it can be overridden by setting this parameter
742
- IndentationWidth: ~
743
-
744
- Style/MultilineMethodDefinitionBraceLayout:
745
- EnforcedStyle: symmetrical
746
- SupportedStyles:
747
- # symmetrical: closing brace is positioned in same way as opening brace
748
- # new_line: closing brace is always on a new line
749
- # same_line: closing brace is always on the same line as last parameter
750
- - symmetrical
751
- - new_line
752
- - same_line
753
-
754
- Style/MultilineOperationIndentation:
755
- EnforcedStyle: aligned
756
- SupportedStyles:
757
- - aligned
758
- - indented
759
- # By default, the indentation width from Style/IndentationWidth is used
760
- # But it can be overridden by setting this parameter
761
- IndentationWidth: ~
762
-
763
- Style/NumericLiterals:
764
- MinDigits: 5
765
-
766
- Style/NumericLiteralPrefix:
767
- EnforcedOctalStyle: zero_with_o
768
- SupportedOctalStyles:
769
- - zero_with_o
770
- - zero_only
771
-
772
- Style/OptionHash:
773
- # A list of parameter names that will be flagged by this cop.
774
- SuspiciousParamNames:
775
- - options
776
- - opts
777
- - args
778
- - params
779
- - parameters
780
-
781
- # Allow safe assignment in conditions.
782
- Style/ParenthesesAroundCondition:
783
- AllowSafeAssignment: true
784
-
785
- Style/PercentLiteralDelimiters:
786
- PreferredDelimiters:
787
- '%': ()
788
- '%i': ()
789
- '%q': ()
790
- '%Q': ()
791
- '%r': '{}'
792
- '%s': ()
793
- '%w': ()
794
- '%W': ()
795
- '%x': ()
796
-
797
- Style/PercentQLiterals:
798
- EnforcedStyle: lower_case_q
799
- SupportedStyles:
800
- - lower_case_q # Use %q when possible, %Q when necessary
801
- - upper_case_q # Always use %Q
802
-
803
- Style/PredicateName:
804
- # Predicate name prefixes.
805
- NamePrefix:
806
- - is_
807
- - has_
808
- - have_
809
- # Predicate name prefixes that should be removed.
810
- NamePrefixBlacklist:
811
- - is_
812
- - has_
813
- - have_
814
- # Predicate names which, despite having a blacklisted prefix, or no ?,
815
- # should still be accepted
816
- NameWhitelist:
817
- - is_a?
818
- # Exclude Rspec specs because there is a strong convetion to write spec
819
- # helpers in the form of `have_something` or `be_something`.
820
- Exclude:
821
- - 'spec/**/*'
822
-
823
- Style/RaiseArgs:
824
- EnforcedStyle: exploded
825
- SupportedStyles:
826
- - compact # raise Exception.new(msg)
827
- - exploded # raise Exception, msg
828
-
829
- Style/RedundantReturn:
830
- # When true allows code like `return x, y`.
831
- AllowMultipleReturnValues: false
832
-
833
- # Use / or %r around regular expressions.
834
- Style/RegexpLiteral:
835
- EnforcedStyle: slashes
836
- # slashes: Always use slashes.
837
- # percent_r: Always use %r.
838
- # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
839
- SupportedStyles:
840
- - slashes
841
- - percent_r
842
- - mixed
843
- # If false, the cop will always recommend using %r if one or more slashes
844
- # are found in the regexp string.
845
- AllowInnerSlashes: false
846
-
847
- # Style/SafeNavigation:
848
- # # Safe navigation may cause a statement to start returning `nil` in addition
849
- # # to whatever it used to return.
850
- # ConvertCodeThatCanStartToReturnNil: false
851
-
852
- Style/Semicolon:
853
- # Allow ; to separate several expressions on the same line.
854
- AllowAsExpressionSeparator: false
25
+ Enabled: false
855
26
 
856
- Style/SignalException:
857
- EnforcedStyle: only_raise
858
- SupportedStyles:
859
- - only_raise
860
- - only_fail
861
- - semantic
862
-
863
- Style/SingleLineBlockParams:
864
- Methods:
865
- - reduce:
866
- - a
867
- - e
868
- - inject:
869
- - a
870
- - e
871
-
872
- Style/SingleLineMethods:
873
- AllowIfMethodIsEmpty: true
874
-
875
- Style/SpaceBeforeFirstArg:
876
- # When true, allows most uses of extra spacing if the intent is to align
877
- # things with the previous or next line, not counting empty lines or comment
878
- # lines.
879
- AllowForAlignment: true
880
-
881
- Style/SpecialGlobalVars:
882
- EnforcedStyle: use_english_names
883
- SupportedStyles:
884
- - use_perl_names
885
- - use_english_names
886
-
887
- Style/StabbyLambdaParentheses:
888
- EnforcedStyle: require_parentheses
889
- SupportedStyles:
890
- - require_parentheses
891
- - require_no_parentheses
892
-
893
- Style/StringLiterals:
894
- EnforcedStyle: double_quotes
895
- SupportedStyles:
896
- - single_quotes
897
- - double_quotes
898
- # If true, strings which span multiple lines using \ for continuation must
899
- # use the same type of quotes on each line.
900
- ConsistentQuotesInMultiline: false
901
-
902
- Style/StringLiteralsInInterpolation:
903
- EnforcedStyle: single_quotes
904
- SupportedStyles:
905
- - single_quotes
906
- - double_quotes
907
-
908
- Style/StringMethods:
909
- # Mapping from undesired method to desired_method
910
- # e.g. to use `to_sym` over `intern`:
911
- #
912
- # StringMethods:
913
- # PreferredMethods:
914
- # intern: to_sym
915
- PreferredMethods:
916
- intern: to_sym
917
-
918
- Style/SpaceAroundBlockParameters:
919
- EnforcedStyleInsidePipes: no_space
920
- SupportedStyles:
921
- - space
922
- - no_space
923
-
924
- Style/SpaceAroundEqualsInParameterDefault:
925
- EnforcedStyle: space
926
- SupportedStyles:
927
- - space
928
- - no_space
929
-
930
- Style/SpaceAroundOperators:
931
- # When true, allows most uses of extra spacing if the intent is to align
932
- # with an operator on the previous or next line, not counting empty lines
933
- # or comment lines.
934
- AllowForAlignment: true
935
-
936
- Style/SpaceBeforeBlockBraces:
937
- EnforcedStyle: space
938
- SupportedStyles:
939
- - space
940
- - no_space
941
-
942
- Style/SpaceInsideBlockBraces:
943
- EnforcedStyle: space
944
- SupportedStyles:
945
- - space
946
- - no_space
947
- # Valid values are: space, no_space
948
- EnforcedStyleForEmptyBraces: no_space
949
- # Space between { and |. Overrides EnforcedStyle if there is a conflict.
950
- SpaceBeforeBlockParameters: true
951
-
952
- Style/SpaceInsideHashLiteralBraces:
953
- EnforcedStyle: space
954
- EnforcedStyleForEmptyBraces: no_space
955
- SupportedStyles:
956
- - space
957
- - no_space
958
- # 'compact' normally requires a space inside hash braces, with the exception
959
- # that successive left braces or right braces are collapsed together
960
- - compact
961
-
962
- Style/SpaceInsideStringInterpolation:
963
- EnforcedStyle: no_space
964
- SupportedStyles:
965
- - space
966
- - no_space
27
+ Style/RescueModifier:
28
+ Enabled: false
967
29
 
968
30
  Style/SymbolArray:
969
- EnforcedStyle: percent
970
- SupportedStyles:
971
- - percent
972
- - brackets
973
-
974
- Style/SymbolProc:
975
- # A list of method names to be ignored by the check.
976
- # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
977
- IgnoredMethods:
978
- - respond_to
979
- - define_method
980
-
981
- Style/TernaryParentheses:
982
- EnforcedStyle: require_no_parentheses
983
- SupportedStyles:
984
- - require_parentheses
985
- - require_no_parentheses
986
- AllowSafeAssignment: true
987
-
988
- Style/TrailingBlankLines:
989
- EnforcedStyle: final_newline
990
- SupportedStyles:
991
- - final_newline
992
- - final_blank_line
993
-
994
- Style/TrailingCommaInArguments:
995
- # If `comma`, the cop requires a comma after the last argument, but only for
996
- # parenthesized method calls where each argument is on its own line.
997
- # If `consistent_comma`, the cop requires a comma after the last argument,
998
- # for all parenthesized method calls with arguments.
999
- EnforcedStyleForMultiline: no_comma
1000
- SupportedStyles:
1001
- - comma
1002
- - consistent_comma
1003
- - no_comma
1004
-
1005
- Style/TrailingCommaInLiteral:
1006
- # If `comma`, the cop requires a comma after the last item in an array or
1007
- # hash, but only when each item is on its own line.
1008
- # If `consistent_comma`, the cop requires a comma after the last item of all
1009
- # non-empty array and hash literals.
1010
- EnforcedStyleForMultiline: no_comma
1011
- SupportedStyles:
1012
- - comma
1013
- - consistent_comma
1014
- - no_comma
1015
-
1016
- # TrivialAccessors requires exact name matches and doesn't allow
1017
- # predicated methods by default.
1018
- Style/TrivialAccessors:
1019
- # When set to false the cop will suggest the use of accessor methods
1020
- # in situations like:
1021
- #
1022
- # def name
1023
- # @other_name
1024
- # end
1025
- #
1026
- # This way you can uncover "hidden" attributes in your code.
1027
- ExactNameMatch: true
1028
- AllowPredicates: true
1029
- # Allows trivial writers that don't end in an equal sign. e.g.
1030
- #
1031
- # def on_exception(action)
1032
- # @on_exception=action
1033
- # end
1034
- # on_exception :restart
1035
- #
1036
- # Commonly used in DSLs
1037
- AllowDSLWriters: false
1038
- IgnoreClassMethods: false
1039
- Whitelist:
1040
- - to_ary
1041
- - to_a
1042
- - to_c
1043
- - to_enum
1044
- - to_h
1045
- - to_hash
1046
- - to_i
1047
- - to_int
1048
- - to_io
1049
- - to_open
1050
- - to_path
1051
- - to_proc
1052
- - to_r
1053
- - to_regexp
1054
- - to_str
1055
- - to_s
1056
- - to_sym
1057
-
1058
- Style/VariableName:
1059
- EnforcedStyle: snake_case
1060
- SupportedStyles:
1061
- - snake_case
1062
- - camelCase
1063
-
1064
- Style/VariableNumber:
1065
- EnforcedStyle: normalcase
1066
- SupportedStyles:
1067
- - snake_case
1068
- - normalcase
1069
- - non_integer
1070
-
1071
- Style/WhileUntilModifier:
1072
- MaxLineLength: 80
1073
-
1074
- # WordArray enforces how array literals of word-like strings should be expressed.
1075
- Style/WordArray:
1076
- EnforcedStyle: percent
1077
- SupportedStyles:
1078
- # percent style: %w(word1 word2)
1079
- - percent
1080
- # bracket style: ['word1', 'word2']
1081
- - brackets
1082
- # The MinSize option causes the WordArray rule to be ignored for arrays
1083
- # smaller than a certain size. The rule is only applied to arrays
1084
- # whose element count is greater than or equal to MinSize.
1085
- MinSize: 0
1086
- # The regular expression WordRegex decides what is considered a word.
1087
- WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1088
-
1089
- ##################### Metrics ##################################
1090
-
1091
- Metrics/AbcSize:
1092
- # The ABC size is a calculated magnitude, so this number can be an Integer or
1093
- # a Float.
1094
- Max: 15
1095
-
1096
- Metrics/BlockNesting:
1097
- Max: 3
1098
-
1099
- Metrics/ClassLength:
1100
- CountComments: false # count full line comments?
1101
- Max: 100
1102
-
1103
- Metrics/ModuleLength:
1104
- CountComments: false # count full line comments?
1105
- Max: 100
1106
-
1107
- # Avoid complex methods.
1108
- Metrics/CyclomaticComplexity:
1109
- Max: 6
1110
-
1111
- Metrics/LineLength:
1112
- Max: 120
1113
- # To make it possible to copy or click on URIs in the code, we allow lines
1114
- # containing a URI to be longer than Max.
1115
- AllowHeredoc: true
1116
- AllowURI: true
1117
- URISchemes:
1118
- - http
1119
- - https
1120
-
1121
- Metrics/MethodLength:
1122
- CountComments: false # count full line comments?
1123
- Max: 10
1124
-
1125
- Metrics/ParameterLists:
1126
- Max: 5
1127
- CountKeywordArgs: true
1128
-
1129
- Metrics/PerceivedComplexity:
1130
- Max: 7
1131
-
1132
- ##################### Lint ##################################
1133
-
1134
- # Allow safe assignment in conditions.
1135
- Lint/AssignmentInCondition:
1136
- AllowSafeAssignment: true
1137
-
1138
- # checks whether the end keywords are aligned properly for `do` `end` blocks.
1139
- Lint/BlockAlignment:
1140
- # The value `start_of_block` means that the `end` should be aligned with line
1141
- # where the `do` keyword appears.
1142
- # The value `start_of_line` means it should be aligned with the whole
1143
- # expression's starting line.
1144
- # The value `either` means both are allowed.
1145
- AlignWith: either
1146
- SupportedStyles:
1147
- - either
1148
- - start_of_block
1149
- - start_of_line
1150
-
1151
- # Align ends correctly.
1152
- Lint/EndAlignment:
1153
- # The value `keyword` means that `end` should be aligned with the matching
1154
- # keyword (if, while, etc.).
1155
- # The value `variable` means that in assignments, `end` should be aligned
1156
- # with the start of the variable on the left hand side of `=`. In all other
1157
- # situations, `end` should still be aligned with the keyword.
1158
- # The value `start_of_line` means that `end` should be aligned with the start
1159
- # of the line which the matching keyword appears on.
1160
- AlignWith: keyword
1161
- SupportedStyles:
1162
- - keyword
1163
- - variable
1164
- - start_of_line
1165
- AutoCorrect: false
1166
-
1167
- Lint/DefEndAlignment:
1168
- # The value `def` means that `end` should be aligned with the def keyword.
1169
- # The value `start_of_line` means that `end` should be aligned with method
1170
- # calls like `private`, `public`, etc, if present in front of the `def`
1171
- # keyword on the same line.
1172
- AlignWith: start_of_line
1173
- SupportedStyles:
1174
- - start_of_line
1175
- - def
1176
- AutoCorrect: false
1177
-
1178
- Lint/InheritException:
1179
- # The default base class in favour of `Exception`.
1180
- EnforcedStyle: runtime_error
1181
- SupportedStyles:
1182
- - runtime_error
1183
- - standard_error
1184
-
1185
- # Checks for unused block arguments
1186
- Lint/UnusedBlockArgument:
1187
- IgnoreEmptyBlocks: true
1188
- AllowUnusedKeywordArguments: false
1189
-
1190
- # Checks for unused method arguments.
1191
- Lint/UnusedMethodArgument:
1192
- AllowUnusedKeywordArguments: false
1193
- IgnoreEmptyMethods: true
1194
-
1195
- ##################### Performance ############################
1196
-
1197
- Performance/RedundantMerge:
1198
- # Max number of key-value pairs to consider an offense
1199
- MaxKeyValuePairs: 2
1200
-
1201
- ##################### Rails ##################################
1202
-
1203
- Rails/ActionFilter:
1204
- EnforcedStyle: action
1205
- SupportedStyles:
1206
- - action
1207
- - filter
1208
- Include:
1209
- - app/controllers/**/*.rb
1210
-
1211
- Rails/Date:
1212
- # The value `strict` disallows usage of `Date.today`, `Date.current`,
1213
- # `Date#to_time` etc.
1214
- # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
1215
- # (but not `Date.today`) which are overridden by ActiveSupport to handle current
1216
- # time zone.
1217
- EnforcedStyle: flexible
1218
- SupportedStyles:
1219
- - strict
1220
- - flexible
1221
-
1222
- Rails/Exit:
1223
- Include:
1224
- - app/**/*.rb
1225
- - config/**/*.rb
1226
- - lib/**/*.rb
1227
- Exclude:
1228
- - lib/**/*.rake
1229
-
1230
- Rails/FindBy:
1231
- Include:
1232
- - app/models/**/*.rb
1233
-
1234
- Rails/FindEach:
1235
- Include:
1236
- - app/models/**/*.rb
1237
-
1238
- Rails/HasAndBelongsToMany:
1239
- Include:
1240
- - app/models/**/*.rb
1241
-
1242
- Rails/NotNullColumn:
1243
- Include:
1244
- - db/migrate/*.rb
1245
-
1246
- Rails/Output:
1247
- Include:
1248
- - app/**/*.rb
1249
- - config/**/*.rb
1250
- - db/**/*.rb
1251
- - lib/**/*.rb
1252
-
1253
- Rails/ReadWriteAttribute:
1254
- Include:
1255
- - app/models/**/*.rb
1256
-
1257
- Rails/RequestReferer:
1258
- EnforcedStyle: referer
1259
- SupportedStyles:
1260
- - referer
1261
- - referrer
1262
-
1263
- Rails/SafeNavigation:
1264
- # This will convert usages of `try` to use safe navigation as well as `try!`.
1265
- # `try` and `try!` work slighly differently. `try!` and safe navigation will
1266
- # both raise a `NoMethodError` if the receiver of the method call does not
1267
- # implement the intended method. `try` will not raise an exception for this.
1268
- ConvertTry: false
1269
-
1270
- Rails/ScopeArgs:
1271
- Include:
1272
- - app/models/**/*.rb
1273
-
1274
- Rails/TimeZone:
1275
- # The value `strict` means that `Time` should be used with `zone`.
1276
- # The value `flexible` allows usage of `in_time_zone` instead of `zone`.
1277
- EnforcedStyle: flexible
1278
- SupportedStyles:
1279
- - strict
1280
- - flexible
1281
-
1282
- Rails/UniqBeforePluck:
1283
- EnforcedMode: conservative
1284
- SupportedModes:
1285
- - conservative
1286
- - aggressive
1287
- AutoCorrect: false
1288
-
1289
- Rails/Validation:
1290
- Include:
1291
- - app/models/**/*.rb
31
+ Enabled: false