virtus-extras 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cd111f7585655e7c9d5c4853e5ac3a6d0f875867
4
+ data.tar.gz: a239262bcd3577b4406af23717622744be5b35bd
5
+ SHA512:
6
+ metadata.gz: 776e8e5290ff90b376b8fd4e0df58c01e482e5302f87a35a8d8672fe208b6b8d466e6287553f94c48a1a63e707077202405b389373c9435a8feb44f136c0f77e
7
+ data.tar.gz: 44f9c2876a6ee345a7896d289a2a50ae43a25bd07406b751158044c31b02fba416f2e5f2f90d03ce930f34ab25b96c8272407a6f7390eedacf1b4021771a8efe
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,1062 @@
1
+ AllCops:
2
+ Include:
3
+ - "**/*.gemspec"
4
+ - "**/*.podspec"
5
+ - "**/*.jbuilder"
6
+ - "**/*.rake"
7
+ - "**/*.opal"
8
+ - "**/Gemfile"
9
+ - "**/Rakefile"
10
+ - "**/Capfile"
11
+ - "**/Guardfile"
12
+ - "**/Podfile"
13
+ - "**/Thorfile"
14
+ - "**/Vagrantfile"
15
+ - "**/Berksfile"
16
+ - "**/Cheffile"
17
+ - "**/Vagabondfile"
18
+ Exclude:
19
+ - bin/*
20
+ RunRailsCops: false
21
+ DisplayCopNames: false
22
+ StyleGuideCopsOnly: false
23
+ Style/AccessModifierIndentation:
24
+ Description: Check indentation of private/protected visibility modifiers.
25
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
26
+ Enabled: true
27
+ EnforcedStyle: indent
28
+ SupportedStyles:
29
+ - outdent
30
+ - indent
31
+ Style/AlignHash:
32
+ Description: Align the elements of a hash literal if they span more than one line.
33
+ Enabled: true
34
+ EnforcedHashRocketStyle: key
35
+ EnforcedColonStyle: key
36
+ EnforcedLastArgumentHashStyle: always_inspect
37
+ SupportedLastArgumentHashStyles:
38
+ - always_inspect
39
+ - always_ignore
40
+ - ignore_implicit
41
+ - ignore_explicit
42
+ Style/AlignParameters:
43
+ Description: Align the parameters of a method call if they span more than one line.
44
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
45
+ Enabled: true
46
+ EnforcedStyle: with_first_parameter
47
+ SupportedStyles:
48
+ - with_first_parameter
49
+ - with_fixed_indentation
50
+ Style/AndOr:
51
+ Description: Use &&/|| instead of and/or.
52
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
53
+ Enabled: true
54
+ EnforcedStyle: always
55
+ SupportedStyles:
56
+ - always
57
+ - conditionals
58
+ Style/BarePercentLiterals:
59
+ Description: Checks if usage of %() or %Q() matches configuration.
60
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
61
+ Enabled: true
62
+ EnforcedStyle: bare_percent
63
+ SupportedStyles:
64
+ - percent_q
65
+ - bare_percent
66
+ Style/BracesAroundHashParameters:
67
+ Description: Enforce braces style around hash parameters.
68
+ Enabled: true
69
+ EnforcedStyle: no_braces
70
+ SupportedStyles:
71
+ - braces
72
+ - no_braces
73
+ - context_dependent
74
+ Style/CaseIndentation:
75
+ Description: Indentation of when in a case/when/[else/]end.
76
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
77
+ Enabled: true
78
+ IndentWhenRelativeTo: case
79
+ SupportedStyles:
80
+ - case
81
+ - end
82
+ IndentOneStep: false
83
+ Style/ClassAndModuleChildren:
84
+ Description: Checks style of children classes and modules.
85
+ Enabled: false
86
+ EnforcedStyle: nested
87
+ SupportedStyles:
88
+ - nested
89
+ - compact
90
+ Style/ClassCheck:
91
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
92
+ Enabled: true
93
+ EnforcedStyle: is_a?
94
+ SupportedStyles:
95
+ - is_a?
96
+ - kind_of?
97
+ Style/CollectionMethods:
98
+ Description: Preferred collection methods.
99
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
100
+ Enabled: true
101
+ PreferredMethods:
102
+ collect: map
103
+ collect!: map!
104
+ find: detect
105
+ find_all: select
106
+ reduce: inject
107
+ Style/CommentAnnotation:
108
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
109
+ REVIEW).
110
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
111
+ Enabled: false
112
+ Keywords:
113
+ - TODO
114
+ - FIXME
115
+ - OPTIMIZE
116
+ - HACK
117
+ - REVIEW
118
+ Style/DotPosition:
119
+ Description: Checks the position of the dot in multi-line method calls.
120
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
121
+ Enabled: true
122
+ EnforcedStyle: leading
123
+ SupportedStyles:
124
+ - leading
125
+ - trailing
126
+ Style/EmptyLineBetweenDefs:
127
+ Description: Use empty lines between defs.
128
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
129
+ Enabled: true
130
+ AllowAdjacentOneLineDefs: false
131
+ Style/EmptyLinesAroundBlockBody:
132
+ Description: Keeps track of empty lines around block bodies.
133
+ Enabled: true
134
+ EnforcedStyle: no_empty_lines
135
+ SupportedStyles:
136
+ - empty_lines
137
+ - no_empty_lines
138
+ Style/EmptyLinesAroundClassBody:
139
+ Description: Keeps track of empty lines around class bodies.
140
+ Enabled: true
141
+ EnforcedStyle: no_empty_lines
142
+ SupportedStyles:
143
+ - empty_lines
144
+ - no_empty_lines
145
+ Style/EmptyLinesAroundModuleBody:
146
+ Description: Keeps track of empty lines around module bodies.
147
+ Enabled: true
148
+ EnforcedStyle: no_empty_lines
149
+ SupportedStyles:
150
+ - empty_lines
151
+ - no_empty_lines
152
+ Style/Encoding:
153
+ Description: Use UTF-8 as the source file encoding.
154
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
155
+ Enabled: false
156
+ EnforcedStyle: always
157
+ SupportedStyles:
158
+ - when_needed
159
+ - always
160
+ Style/FileName:
161
+ Description: Use snake_case for source file names.
162
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
163
+ Enabled: false
164
+ Exclude: []
165
+ Style/FirstParameterIndentation:
166
+ Description: Checks the indentation of the first parameter in a method call.
167
+ Enabled: true
168
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
169
+ SupportedStyles:
170
+ - consistent
171
+ - special_for_inner_method_call
172
+ - special_for_inner_method_call_in_parentheses
173
+ Style/For:
174
+ Description: Checks use of for or each in multiline loops.
175
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
176
+ Enabled: true
177
+ EnforcedStyle: each
178
+ SupportedStyles:
179
+ - for
180
+ - each
181
+ Style/FormatString:
182
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
183
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
184
+ Enabled: false
185
+ EnforcedStyle: format
186
+ SupportedStyles:
187
+ - format
188
+ - sprintf
189
+ - percent
190
+ Style/GlobalVars:
191
+ Description: Do not introduce global variables.
192
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
193
+ Enabled: false
194
+ AllowedVariables: []
195
+ Style/GuardClause:
196
+ Description: Check for conditionals that can be replaced with guard clauses
197
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
198
+ Enabled: false
199
+ MinBodyLength: 1
200
+ Style/HashSyntax:
201
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
202
+ 1, :b => 2 }.'
203
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
204
+ Enabled: true
205
+ EnforcedStyle: hash_rockets
206
+ SupportedStyles:
207
+ - ruby19
208
+ - hash_rockets
209
+ Style/IfUnlessModifier:
210
+ Description: Favor modifier if/unless usage when you have a single-line body.
211
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
212
+ Enabled: false
213
+ MaxLineLength: 80
214
+ Style/IndentationWidth:
215
+ Description: Use 2 spaces for indentation.
216
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
217
+ Enabled: true
218
+ Width: 2
219
+ Style/IndentHash:
220
+ Description: Checks the indentation of the first key in a hash literal.
221
+ Enabled: true
222
+ EnforcedStyle: special_inside_parentheses
223
+ SupportedStyles:
224
+ - special_inside_parentheses
225
+ - consistent
226
+ Style/LambdaCall:
227
+ Description: Use lambda.call(...) instead of lambda.(...).
228
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
229
+ Enabled: false
230
+ EnforcedStyle: call
231
+ SupportedStyles:
232
+ - call
233
+ - braces
234
+ Style/Next:
235
+ Description: Use `next` to skip iteration instead of a condition at the end.
236
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
237
+ Enabled: false
238
+ EnforcedStyle: skip_modifier_ifs
239
+ MinBodyLength: 3
240
+ SupportedStyles:
241
+ - skip_modifier_ifs
242
+ - always
243
+ Style/NonNilCheck:
244
+ Description: Checks for redundant nil checks.
245
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
246
+ Enabled: true
247
+ IncludeSemanticChanges: false
248
+ Style/MethodDefParentheses:
249
+ Description: Checks if the method definitions have or don't have parentheses.
250
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
251
+ Enabled: true
252
+ EnforcedStyle: require_parentheses
253
+ SupportedStyles:
254
+ - require_parentheses
255
+ - require_no_parentheses
256
+ Style/MethodName:
257
+ Description: Use the configured style when naming methods.
258
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
259
+ Enabled: true
260
+ EnforcedStyle: snake_case
261
+ SupportedStyles:
262
+ - snake_case
263
+ - camelCase
264
+ Style/MultilineOperationIndentation:
265
+ Description: Checks indentation of binary operations that span more than one line.
266
+ Enabled: true
267
+ EnforcedStyle: aligned
268
+ SupportedStyles:
269
+ - aligned
270
+ - indented
271
+ Style/NumericLiterals:
272
+ Description: Add underscores to large numeric literals to improve their readability.
273
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
274
+ Enabled: false
275
+ MinDigits: 5
276
+ Style/ParenthesesAroundCondition:
277
+ Description: Don't use parentheses around the condition of an if/unless/while.
278
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
279
+ Enabled: true
280
+ AllowSafeAssignment: true
281
+ Style/PercentLiteralDelimiters:
282
+ Description: Use `%`-literal delimiters consistently
283
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
284
+ Enabled: false
285
+ PreferredDelimiters:
286
+ "%": "()"
287
+ "%i": "()"
288
+ "%q": "()"
289
+ "%Q": "()"
290
+ "%r": "{}"
291
+ "%s": "()"
292
+ "%w": "()"
293
+ "%W": "()"
294
+ "%x": "()"
295
+ Style/PercentQLiterals:
296
+ Description: Checks if uses of %Q/%q match the configured preference.
297
+ Enabled: true
298
+ EnforcedStyle: lower_case_q
299
+ SupportedStyles:
300
+ - lower_case_q
301
+ - upper_case_q
302
+ Style/PredicateName:
303
+ Description: Check the names of predicate methods.
304
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
305
+ Enabled: true
306
+ NamePrefix:
307
+ - is_
308
+ - has_
309
+ - have_
310
+ NamePrefixBlacklist:
311
+ - is_
312
+ Style/RaiseArgs:
313
+ Description: Checks the arguments passed to raise/fail.
314
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
315
+ Enabled: false
316
+ EnforcedStyle: exploded
317
+ SupportedStyles:
318
+ - compact
319
+ - exploded
320
+ Style/RedundantReturn:
321
+ Description: Don't use return where it's not required.
322
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
323
+ Enabled: true
324
+ AllowMultipleReturnValues: false
325
+ Style/RegexpLiteral:
326
+ Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
327
+ characters. Use %r only for regular expressions matching more than `MaxSlashes`
328
+ '/' character.
329
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
330
+ Enabled: false
331
+ MaxSlashes: 1
332
+ Style/Semicolon:
333
+ Description: Don't use semicolons to terminate expressions.
334
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
335
+ Enabled: true
336
+ AllowAsExpressionSeparator: false
337
+ Style/SignalException:
338
+ Description: Checks for proper usage of fail and raise.
339
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
340
+ Enabled: false
341
+ EnforcedStyle: semantic
342
+ SupportedStyles:
343
+ - only_raise
344
+ - only_fail
345
+ - semantic
346
+ Style/SingleLineBlockParams:
347
+ Description: Enforces the names of some block params.
348
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
349
+ Enabled: false
350
+ Methods:
351
+ - reduce:
352
+ - a
353
+ - e
354
+ - inject:
355
+ - a
356
+ - e
357
+ Style/SingleLineMethods:
358
+ Description: Avoid single-line methods.
359
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
360
+ Enabled: false
361
+ AllowIfMethodIsEmpty: true
362
+ Style/StringLiterals:
363
+ Description: Checks if uses of quotes match the configured preference.
364
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
365
+ Enabled: true
366
+ EnforcedStyle: single_quotes
367
+ SupportedStyles:
368
+ - single_quotes
369
+ - double_quotes
370
+ Style/StringLiteralsInInterpolation:
371
+ Description: Checks if uses of quotes inside expressions in interpolated strings
372
+ match the configured preference.
373
+ Enabled: true
374
+ EnforcedStyle: single_quotes
375
+ SupportedStyles:
376
+ - single_quotes
377
+ - double_quotes
378
+ Style/SpaceAroundBlockParameters:
379
+ Description: Checks the spacing inside and after block parameters pipes.
380
+ Enabled: true
381
+ EnforcedStyleInsidePipes: no_space
382
+ SupportedStyles:
383
+ - space
384
+ - no_space
385
+ Style/SpaceAroundEqualsInParameterDefault:
386
+ Description: Checks that the equals signs in parameter default assignments have
387
+ or don't have surrounding space depending on configuration.
388
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
389
+ Enabled: true
390
+ EnforcedStyle: space
391
+ SupportedStyles:
392
+ - space
393
+ - no_space
394
+ Style/SpaceBeforeBlockBraces:
395
+ Description: Checks that the left block brace has or doesn't have space before it.
396
+ Enabled: true
397
+ EnforcedStyle: space
398
+ SupportedStyles:
399
+ - space
400
+ - no_space
401
+ Style/SpaceInsideBlockBraces:
402
+ Description: Checks that block braces have or don't have surrounding space. For
403
+ blocks taking parameters, checks that the left brace has or doesn't have trailing
404
+ space.
405
+ Enabled: true
406
+ EnforcedStyle: space
407
+ SupportedStyles:
408
+ - space
409
+ - no_space
410
+ EnforcedStyleForEmptyBraces: no_space
411
+ SpaceBeforeBlockParameters: true
412
+ Style/SpaceInsideHashLiteralBraces:
413
+ Description: Use spaces inside hash literal braces - or don't.
414
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
415
+ Enabled: true
416
+ EnforcedStyle: space
417
+ EnforcedStyleForEmptyBraces: no_space
418
+ SupportedStyles:
419
+ - space
420
+ - no_space
421
+ Style/SymbolProc:
422
+ Description: Use symbols as procs instead of blocks when possible.
423
+ Enabled: true
424
+ IgnoredMethods:
425
+ - respond_to
426
+ Style/TrailingBlankLines:
427
+ Description: Checks trailing blank lines and final newline.
428
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
429
+ Enabled: true
430
+ EnforcedStyle: final_newline
431
+ SupportedStyles:
432
+ - final_newline
433
+ - final_blank_line
434
+ Style/TrailingComma:
435
+ Description: Checks for trailing comma in parameter lists and literals.
436
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
437
+ Enabled: false
438
+ EnforcedStyleForMultiline: no_comma
439
+ SupportedStyles:
440
+ - comma
441
+ - no_comma
442
+ Style/TrivialAccessors:
443
+ Description: Prefer attr_* methods to trivial readers/writers.
444
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
445
+ Enabled: false
446
+ ExactNameMatch: false
447
+ AllowPredicates: false
448
+ AllowDSLWriters: false
449
+ Whitelist:
450
+ - to_ary
451
+ - to_a
452
+ - to_c
453
+ - to_enum
454
+ - to_h
455
+ - to_hash
456
+ - to_i
457
+ - to_int
458
+ - to_io
459
+ - to_open
460
+ - to_path
461
+ - to_proc
462
+ - to_r
463
+ - to_regexp
464
+ - to_str
465
+ - to_s
466
+ - to_sym
467
+ Style/VariableName:
468
+ Description: Use the configured style when naming variables.
469
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
470
+ Enabled: true
471
+ EnforcedStyle: snake_case
472
+ SupportedStyles:
473
+ - snake_case
474
+ - camelCase
475
+ Style/WhileUntilModifier:
476
+ Description: Favor modifier while/until usage when you have a single-line body.
477
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
478
+ Enabled: false
479
+ MaxLineLength: 80
480
+ Style/WordArray:
481
+ Description: Use %w or %W for arrays of words.
482
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
483
+ Enabled: false
484
+ MinSize: 0
485
+ WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
486
+ Metrics/AbcSize:
487
+ Description: A calculated magnitude based on number of assignments, branches, and
488
+ conditions.
489
+ Enabled: true
490
+ Max: 15
491
+ Metrics/BlockNesting:
492
+ Description: Avoid excessive block nesting
493
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
494
+ Enabled: false
495
+ Max: 3
496
+ Metrics/ClassLength:
497
+ Description: Avoid classes longer than 100 lines of code.
498
+ Enabled: false
499
+ CountComments: false
500
+ Max: 100
501
+ Metrics/CyclomaticComplexity:
502
+ Description: A complexity metric that is strongly correlated to the number of test
503
+ cases needed to validate a method.
504
+ Enabled: false
505
+ Max: 6
506
+ Metrics/LineLength:
507
+ Description: Limit lines to 80 characters.
508
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
509
+ Enabled: true
510
+ Max: 80
511
+ AllowURI: true
512
+ URISchemes:
513
+ - http
514
+ - https
515
+ Metrics/MethodLength:
516
+ Description: Avoid methods longer than 10 lines of code.
517
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
518
+ Enabled: false
519
+ CountComments: false
520
+ Max: 10
521
+ Metrics/ParameterLists:
522
+ Description: Avoid parameter lists longer than three or four parameters.
523
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
524
+ Enabled: false
525
+ Max: 5
526
+ CountKeywordArgs: true
527
+ Metrics/PerceivedComplexity:
528
+ Description: A complexity metric geared towards measuring complexity for a human
529
+ reader.
530
+ Enabled: false
531
+ Max: 7
532
+ Lint/AssignmentInCondition:
533
+ Description: Don't use assignment in conditions.
534
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
535
+ Enabled: false
536
+ AllowSafeAssignment: true
537
+ Lint/EndAlignment:
538
+ Description: Align ends correctly.
539
+ Enabled: true
540
+ AlignWith: keyword
541
+ SupportedStyles:
542
+ - keyword
543
+ - variable
544
+ Lint/DefEndAlignment:
545
+ Description: Align ends corresponding to defs correctly.
546
+ Enabled: true
547
+ AlignWith: start_of_line
548
+ SupportedStyles:
549
+ - start_of_line
550
+ - def
551
+ Rails/ActionFilter:
552
+ Description: Enforces consistent use of action filter methods.
553
+ Enabled: false
554
+ EnforcedStyle: action
555
+ SupportedStyles:
556
+ - action
557
+ - filter
558
+ Include:
559
+ - app/controllers/**/*.rb
560
+ Rails/DefaultScope:
561
+ Description: Checks if the argument passed to default_scope is a block.
562
+ Enabled: true
563
+ Include:
564
+ - app/models/**/*.rb
565
+ Rails/HasAndBelongsToMany:
566
+ Description: Prefer has_many :through to has_and_belongs_to_many.
567
+ Enabled: true
568
+ Include:
569
+ - app/models/**/*.rb
570
+ Rails/Output:
571
+ Description: Checks for calls to puts, print, etc.
572
+ Enabled: true
573
+ Include:
574
+ - app/**/*.rb
575
+ - config/**/*.rb
576
+ - db/**/*.rb
577
+ - lib/**/*.rb
578
+ Rails/ReadWriteAttribute:
579
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
580
+ Enabled: true
581
+ Include:
582
+ - app/models/**/*.rb
583
+ Rails/ScopeArgs:
584
+ Description: Checks the arguments of ActiveRecord scopes.
585
+ Enabled: true
586
+ Include:
587
+ - app/models/**/*.rb
588
+ Rails/Validation:
589
+ Description: Use validates :attribute, hash of validations.
590
+ Enabled: true
591
+ Include:
592
+ - app/models/**/*.rb
593
+ Style/InlineComment:
594
+ Description: Avoid inline comments.
595
+ Enabled: false
596
+ Style/MethodCalledOnDoEndBlock:
597
+ Description: Avoid chaining a method call on a do...end block.
598
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
599
+ Enabled: false
600
+ Style/SymbolArray:
601
+ Description: Use %i or %I for arrays of symbols.
602
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
603
+ Enabled: false
604
+ Style/ExtraSpacing:
605
+ Description: Do not use unnecessary spacing.
606
+ Enabled: true
607
+ Style/AccessorMethodName:
608
+ Description: Check the naming of accessor methods for get_/set_.
609
+ Enabled: false
610
+ Style/Alias:
611
+ Description: Use alias_method instead of alias.
612
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
613
+ Enabled: false
614
+ Style/AlignArray:
615
+ Description: Align the elements of an array literal if they span more than one line.
616
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
617
+ Enabled: true
618
+ Style/ArrayJoin:
619
+ Description: Use Array#join instead of Array#*.
620
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
621
+ Enabled: false
622
+ Style/AsciiComments:
623
+ Description: Use only ascii symbols in comments.
624
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
625
+ Enabled: false
626
+ Style/AsciiIdentifiers:
627
+ Description: Use only ascii symbols in identifiers.
628
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
629
+ Enabled: false
630
+ Style/Attr:
631
+ Description: Checks for uses of Module#attr.
632
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
633
+ Enabled: false
634
+ Style/BeginBlock:
635
+ Description: Avoid the use of BEGIN blocks.
636
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
637
+ Enabled: true
638
+ Style/BlockComments:
639
+ Description: Do not use block comments.
640
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
641
+ Enabled: true
642
+ Style/BlockEndNewline:
643
+ Description: Put end statement of multiline block on its own line.
644
+ Enabled: true
645
+ Style/Blocks:
646
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
647
+ ugly). Prefer {...} over do...end for single-line blocks.
648
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
649
+ Enabled: true
650
+ Style/CaseEquality:
651
+ Description: Avoid explicit use of the case equality operator(===).
652
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
653
+ Enabled: false
654
+ Style/CharacterLiteral:
655
+ Description: Checks for uses of character literals.
656
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
657
+ Enabled: false
658
+ Style/ClassAndModuleCamelCase:
659
+ Description: Use CamelCase for classes and modules.
660
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
661
+ Enabled: true
662
+ Style/ClassMethods:
663
+ Description: Use self when defining module/class methods.
664
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
665
+ Enabled: true
666
+ Style/ClassVars:
667
+ Description: Avoid the use of class variables.
668
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
669
+ Enabled: false
670
+ Style/ColonMethodCall:
671
+ Description: 'Do not use :: for method call.'
672
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
673
+ Enabled: false
674
+ Style/CommentIndentation:
675
+ Description: Indentation of comments.
676
+ Enabled: true
677
+ Style/ConstantName:
678
+ Description: Constants should use SCREAMING_SNAKE_CASE.
679
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
680
+ Enabled: true
681
+ Style/DefWithParentheses:
682
+ Description: Use def with parentheses when there are arguments.
683
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
684
+ Enabled: true
685
+ Style/DeprecatedHashMethods:
686
+ Description: Checks for use of deprecated Hash methods.
687
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
688
+ Enabled: false
689
+ Style/Documentation:
690
+ Description: Document classes and non-namespace modules.
691
+ Enabled: false
692
+ Style/DoubleNegation:
693
+ Description: Checks for uses of double negation (!!).
694
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
695
+ Enabled: false
696
+ Style/EachWithObject:
697
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
698
+ Enabled: false
699
+ Style/ElseAlignment:
700
+ Description: Align elses and elsifs correctly.
701
+ Enabled: true
702
+ Style/EmptyElse:
703
+ Description: Avoid empty else-clauses.
704
+ Enabled: true
705
+ Style/EmptyLines:
706
+ Description: Don't use several empty lines in a row.
707
+ Enabled: true
708
+ Style/EmptyLinesAroundAccessModifier:
709
+ Description: Keep blank lines around access modifiers.
710
+ Enabled: true
711
+ Style/EmptyLinesAroundMethodBody:
712
+ Description: Keeps track of empty lines around method bodies.
713
+ Enabled: true
714
+ Style/EmptyLiteral:
715
+ Description: Prefer literals to Array.new/Hash.new/String.new.
716
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
717
+ Enabled: false
718
+ Style/EndBlock:
719
+ Description: Avoid the use of END blocks.
720
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
721
+ Enabled: true
722
+ Style/EndOfLine:
723
+ Description: Use Unix-style line endings.
724
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
725
+ Enabled: true
726
+ Style/EvenOdd:
727
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
728
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
729
+ Enabled: false
730
+ Style/FlipFlop:
731
+ Description: Checks for flip flops
732
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
733
+ Enabled: false
734
+ Style/IfWithSemicolon:
735
+ Description: Do not use if x; .... Use the ternary operator instead.
736
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
737
+ Enabled: false
738
+ Style/IndentationConsistency:
739
+ Description: Keep indentation straight.
740
+ Enabled: true
741
+ Style/IndentArray:
742
+ Description: Checks the indentation of the first element in an array literal.
743
+ Enabled: true
744
+ Style/InfiniteLoop:
745
+ Description: Use Kernel#loop for infinite loops.
746
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
747
+ Enabled: true
748
+ Style/Lambda:
749
+ Description: Use the new lambda literal syntax for single-line blocks.
750
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
751
+ Enabled: false
752
+ Style/LeadingCommentSpace:
753
+ Description: Comments should start with a space.
754
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
755
+ Enabled: true
756
+ Style/LineEndConcatenation:
757
+ Description: Use \ instead of + or << to concatenate two string literals at line
758
+ end.
759
+ Enabled: false
760
+ Style/MethodCallParentheses:
761
+ Description: Do not use parentheses for method calls with no arguments.
762
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
763
+ Enabled: true
764
+ Style/ModuleFunction:
765
+ Description: Checks for usage of `extend self` in modules.
766
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
767
+ Enabled: false
768
+ Style/MultilineBlockChain:
769
+ Description: Avoid multi-line chains of blocks.
770
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
771
+ Enabled: true
772
+ Style/MultilineBlockLayout:
773
+ Description: Ensures newlines after multiline block do statements.
774
+ Enabled: true
775
+ Style/MultilineIfThen:
776
+ Description: Do not use then for multi-line if/unless.
777
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
778
+ Enabled: true
779
+ Style/MultilineTernaryOperator:
780
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
781
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
782
+ Enabled: true
783
+ Style/NegatedIf:
784
+ Description: Favor unless over if for negative conditions (or control flow or).
785
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
786
+ Enabled: false
787
+ Style/NegatedWhile:
788
+ Description: Favor until over while for negative conditions.
789
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
790
+ Enabled: false
791
+ Style/NestedTernaryOperator:
792
+ Description: Use one expression per branch in a ternary operator.
793
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
794
+ Enabled: true
795
+ Style/NilComparison:
796
+ Description: Prefer x.nil? to x == nil.
797
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
798
+ Enabled: false
799
+ Style/Not:
800
+ Description: Use ! instead of not.
801
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
802
+ Enabled: false
803
+ Style/OneLineConditional:
804
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
805
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
806
+ Enabled: false
807
+ Style/OpMethod:
808
+ Description: When defining binary operators, name the argument other.
809
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
810
+ Enabled: false
811
+ Style/PerlBackrefs:
812
+ Description: Avoid Perl-style regex back references.
813
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
814
+ Enabled: false
815
+ Style/Proc:
816
+ Description: Use proc instead of Proc.new.
817
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
818
+ Enabled: false
819
+ Style/RedundantBegin:
820
+ Description: Don't use begin blocks when they are not needed.
821
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
822
+ Enabled: true
823
+ Style/RedundantException:
824
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
825
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
826
+ Enabled: true
827
+ Style/RedundantSelf:
828
+ Description: Don't use self where it's not needed.
829
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
830
+ Enabled: true
831
+ Style/RescueModifier:
832
+ Description: Avoid using rescue in its modifier form.
833
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
834
+ Enabled: true
835
+ Style/SelfAssignment:
836
+ Description: Checks for places where self-assignment shorthand should have been
837
+ used.
838
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
839
+ Enabled: false
840
+ Style/SingleSpaceBeforeFirstArg:
841
+ Description: Checks that exactly one space is used between a method name and the
842
+ first argument for method calls without parentheses.
843
+ Enabled: true
844
+ Style/SpaceAfterColon:
845
+ Description: Use spaces after colons.
846
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
847
+ Enabled: true
848
+ Style/SpaceAfterComma:
849
+ Description: Use spaces after commas.
850
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
851
+ Enabled: true
852
+ Style/SpaceAfterControlKeyword:
853
+ Description: Use spaces after if/elsif/unless/while/until/case/when.
854
+ Enabled: true
855
+ Style/SpaceAfterMethodName:
856
+ Description: Do not put a space between a method name and the opening parenthesis
857
+ in a method definition.
858
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
859
+ Enabled: true
860
+ Style/SpaceAfterNot:
861
+ Description: Tracks redundant space after the ! operator.
862
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
863
+ Enabled: true
864
+ Style/SpaceAfterSemicolon:
865
+ Description: Use spaces after semicolons.
866
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
867
+ Enabled: true
868
+ Style/SpaceBeforeComma:
869
+ Description: No spaces before commas.
870
+ Enabled: true
871
+ Style/SpaceBeforeComment:
872
+ Description: Checks for missing space between code and a comment on the same line.
873
+ Enabled: true
874
+ Style/SpaceBeforeSemicolon:
875
+ Description: No spaces before semicolons.
876
+ Enabled: true
877
+ Style/SpaceAroundOperators:
878
+ Description: Use spaces around operators.
879
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
880
+ Enabled: true
881
+ Style/SpaceBeforeModifierKeyword:
882
+ Description: Put a space before the modifier keyword.
883
+ Enabled: true
884
+ Style/SpaceInsideBrackets:
885
+ Description: No spaces after [ or before ].
886
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
887
+ Enabled: true
888
+ Style/SpaceInsideParens:
889
+ Description: No spaces after ( or before ).
890
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
891
+ Enabled: true
892
+ Style/SpaceInsideRangeLiteral:
893
+ Description: No spaces inside range literals.
894
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
895
+ Enabled: true
896
+ Style/SpecialGlobalVars:
897
+ Description: Avoid Perl-style global variables.
898
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
899
+ Enabled: false
900
+ Style/StructInheritance:
901
+ Description: Checks for inheritance from Struct.new.
902
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
903
+ Enabled: true
904
+ Style/Tab:
905
+ Description: No hard tabs.
906
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
907
+ Enabled: true
908
+ Style/TrailingWhitespace:
909
+ Description: Avoid trailing whitespace.
910
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
911
+ Enabled: true
912
+ Style/UnlessElse:
913
+ Description: Do not use unless with else. Rewrite these with the positive case first.
914
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
915
+ Enabled: true
916
+ Style/UnneededCapitalW:
917
+ Description: Checks for %W when interpolation is not needed.
918
+ Enabled: true
919
+ Style/UnneededPercentQ:
920
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
921
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
922
+ Enabled: true
923
+ Style/UnneededPercentX:
924
+ Description: Checks for %x when `` would do.
925
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
926
+ Enabled: true
927
+ Style/VariableInterpolation:
928
+ Description: Don't interpolate global, instance and class variables directly in
929
+ strings.
930
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
931
+ Enabled: false
932
+ Style/WhenThen:
933
+ Description: Use when x then ... for one-line cases.
934
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
935
+ Enabled: false
936
+ Style/WhileUntilDo:
937
+ Description: Checks for redundant do after while or until.
938
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
939
+ Enabled: true
940
+ Lint/AmbiguousOperator:
941
+ Description: Checks for ambiguous operators in the first argument of a method invocation
942
+ without parentheses.
943
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
944
+ Enabled: false
945
+ Lint/AmbiguousRegexpLiteral:
946
+ Description: Checks for ambiguous regexp literals in the first argument of a method
947
+ invocation without parenthesis.
948
+ Enabled: false
949
+ Lint/BlockAlignment:
950
+ Description: Align block ends correctly.
951
+ Enabled: true
952
+ Lint/ConditionPosition:
953
+ Description: Checks for condition placed in a confusing position relative to the
954
+ keyword.
955
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
956
+ Enabled: false
957
+ Lint/Debugger:
958
+ Description: Check for debugger calls.
959
+ Enabled: true
960
+ Lint/DeprecatedClassMethods:
961
+ Description: Check for deprecated class method calls.
962
+ Enabled: false
963
+ Lint/DuplicateMethods:
964
+ Description: Check for duplicate methods calls.
965
+ Enabled: true
966
+ Lint/ElseLayout:
967
+ Description: Check for odd code arrangement in an else block.
968
+ Enabled: false
969
+ Lint/EmptyEnsure:
970
+ Description: Checks for empty ensure block.
971
+ Enabled: true
972
+ Lint/EmptyInterpolation:
973
+ Description: Checks for empty string interpolation.
974
+ Enabled: true
975
+ Lint/EndInMethod:
976
+ Description: END blocks should not be placed inside method definitions.
977
+ Enabled: true
978
+ Lint/EnsureReturn:
979
+ Description: Do not use return in an ensure block.
980
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
981
+ Enabled: true
982
+ Lint/Eval:
983
+ Description: The use of eval represents a serious security risk.
984
+ Enabled: true
985
+ Lint/HandleExceptions:
986
+ Description: Don't suppress exception.
987
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
988
+ Enabled: false
989
+ Lint/InvalidCharacterLiteral:
990
+ Description: Checks for invalid character literals with a non-escaped whitespace
991
+ character.
992
+ Enabled: false
993
+ Lint/LiteralInCondition:
994
+ Description: Checks of literals used in conditions.
995
+ Enabled: false
996
+ Lint/LiteralInInterpolation:
997
+ Description: Checks for literals used in interpolation.
998
+ Enabled: false
999
+ Lint/Loop:
1000
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1001
+ for post-loop tests.
1002
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
1003
+ Enabled: false
1004
+ Lint/ParenthesesAsGroupedExpression:
1005
+ Description: Checks for method calls with a space before the opening parenthesis.
1006
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
1007
+ Enabled: false
1008
+ Lint/RequireParentheses:
1009
+ Description: Use parentheses in the method call to avoid confusion about precedence.
1010
+ Enabled: false
1011
+ Lint/RescueException:
1012
+ Description: Avoid rescuing the Exception class.
1013
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
1014
+ Enabled: true
1015
+ Lint/ShadowingOuterLocalVariable:
1016
+ Description: Do not use the same name as outer local variable for block arguments
1017
+ or block local variables.
1018
+ Enabled: true
1019
+ Lint/SpaceBeforeFirstArg:
1020
+ Description: Put a space between a method name and the first argument in a method
1021
+ call without parentheses.
1022
+ Enabled: true
1023
+ Lint/StringConversionInInterpolation:
1024
+ Description: Checks for Object#to_s usage in string interpolation.
1025
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
1026
+ Enabled: true
1027
+ Lint/UnderscorePrefixedVariableName:
1028
+ Description: Do not use prefix `_` for a variable that is used.
1029
+ Enabled: false
1030
+ Lint/UnusedBlockArgument:
1031
+ Description: Checks for unused block arguments.
1032
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1033
+ Enabled: true
1034
+ Lint/UnusedMethodArgument:
1035
+ Description: Checks for unused method arguments.
1036
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1037
+ Enabled: true
1038
+ Lint/UnreachableCode:
1039
+ Description: Unreachable code.
1040
+ Enabled: true
1041
+ Lint/UselessAccessModifier:
1042
+ Description: Checks for useless access modifiers.
1043
+ Enabled: true
1044
+ Lint/UselessAssignment:
1045
+ Description: Checks for useless assignment to a local variable.
1046
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1047
+ Enabled: true
1048
+ Lint/UselessComparison:
1049
+ Description: Checks for comparison of something with itself.
1050
+ Enabled: true
1051
+ Lint/UselessElseWithoutRescue:
1052
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1053
+ Enabled: true
1054
+ Lint/UselessSetterCall:
1055
+ Description: Checks for useless setter call to a local variable.
1056
+ Enabled: true
1057
+ Lint/Void:
1058
+ Description: Possible use of operator/literal/variable in void context.
1059
+ Enabled: false
1060
+ Rails/Delegate:
1061
+ Description: Prefer delegate method for delegations.
1062
+ Enabled: false