cypress_rails 0.1.0

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