draft_generators 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +6 -0
  3. data/.document +5 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +637 -0
  6. data/Gemfile +16 -0
  7. data/LICENSE.txt +20 -0
  8. data/README.markdown +24 -0
  9. data/Rakefile +51 -0
  10. data/VERSION +1 -0
  11. data/draft_generators.gemspec +120 -0
  12. data/lib/devise_customization_service.rb +95 -0
  13. data/lib/draft_generators.rb +8 -0
  14. data/lib/generators/draft/devise/devise_generator.rb +92 -0
  15. data/lib/generators/draft/devise/views/templates/confirmations/new.html.erb +49 -0
  16. data/lib/generators/draft/devise/views/templates/mailer/confirmation_instructions.html.erb +5 -0
  17. data/lib/generators/draft/devise/views/templates/mailer/email_changed.html.erb +7 -0
  18. data/lib/generators/draft/devise/views/templates/mailer/password_change.html.erb +3 -0
  19. data/lib/generators/draft/devise/views/templates/mailer/reset_password_instructions.html.erb +8 -0
  20. data/lib/generators/draft/devise/views/templates/mailer/unlock_instructions.html.erb +7 -0
  21. data/lib/generators/draft/devise/views/templates/passwords/edit.html.erb +83 -0
  22. data/lib/generators/draft/devise/views/templates/passwords/new.html.erb +49 -0
  23. data/lib/generators/draft/devise/views/templates/registrations/edit.html.erb +159 -0
  24. data/lib/generators/draft/devise/views/templates/registrations/new.html.erb +113 -0
  25. data/lib/generators/draft/devise/views/templates/registrations_with_sentinels/edit.html.erb +160 -0
  26. data/lib/generators/draft/devise/views/templates/registrations_with_sentinels/new.html.erb +102 -0
  27. data/lib/generators/draft/devise/views/templates/sessions/new.html.erb +51 -0
  28. data/lib/generators/draft/devise/views/templates/shared/_links.html.erb +25 -0
  29. data/lib/generators/draft/devise/views/templates/unlocks/new.html.erb +49 -0
  30. data/lib/generators/draft/devise/views/views_generator.rb +41 -0
  31. data/lib/generators/draft/layout/USAGE +49 -0
  32. data/lib/generators/draft/layout/layout_generator.rb +66 -0
  33. data/lib/generators/draft/layout/templates/_bootstrapcdn_assets.html.erb +10 -0
  34. data/lib/generators/draft/layout/templates/_flashes.html.erb +23 -0
  35. data/lib/generators/draft/layout/templates/_navbar.html.erb +75 -0
  36. data/lib/generators/draft/layout/templates/layout.html.erb +40 -0
  37. data/lib/generators/draft/model/USAGE +14 -0
  38. data/lib/generators/draft/model/model_generator.rb +42 -0
  39. data/lib/generators/draft/resource/USAGE +11 -0
  40. data/lib/generators/draft/resource/resource_generator.rb +172 -0
  41. data/lib/generators/draft/resource/templates/controllers/controller.rb +97 -0
  42. data/lib/generators/draft/resource/templates/controllers/read_only_controller.rb +13 -0
  43. data/lib/generators/draft/resource/templates/specs/crud_spec.rb +300 -0
  44. data/lib/generators/draft/resource/templates/specs/factories.rb +32 -0
  45. data/lib/generators/draft/resource/templates/views/association_new_form.html.erb +67 -0
  46. data/lib/generators/draft/resource/templates/views/create_row.html.erb +13 -0
  47. data/lib/generators/draft/resource/templates/views/destroy_row.html.erb +13 -0
  48. data/lib/generators/draft/resource/templates/views/edit_form.html.erb +72 -0
  49. data/lib/generators/draft/resource/templates/views/edit_form_with_errors.html.erb +85 -0
  50. data/lib/generators/draft/resource/templates/views/index.html.erb +102 -0
  51. data/lib/generators/draft/resource/templates/views/new_form.html.erb +73 -0
  52. data/lib/generators/draft/resource/templates/views/new_form_with_errors.html.erb +86 -0
  53. data/lib/generators/draft/resource/templates/views/show.html.erb +90 -0
  54. data/lib/generators/draft/resource/templates/views/update_row.html.erb +9 -0
  55. data/lib/generators/draft/scaffold/scaffold_controller_generator.rb +16 -0
  56. data/lib/generators/draft/scaffold/scaffold_erb_generator.rb +25 -0
  57. data/lib/generators/draft/scaffold/scaffold_generator.rb +15 -0
  58. data/lib/generators/draft/scaffold/templates/_card.html.erb +37 -0
  59. data/lib/generators/draft/scaffold/templates/_form.html.erb +44 -0
  60. data/lib/generators/draft/scaffold/templates/_list_item.html.erb +13 -0
  61. data/lib/generators/draft/scaffold/templates/_table_row.html.erb +23 -0
  62. data/lib/generators/draft/scaffold/templates/edit.html.erb +17 -0
  63. data/lib/generators/draft/scaffold/templates/index.html.erb +71 -0
  64. data/lib/generators/draft/scaffold/templates/new.html.erb +17 -0
  65. data/lib/generators/draft/scaffold/templates/show.html.erb +5 -0
  66. data/lib/rails_tag_service.rb +47 -0
  67. metadata +197 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 040dd9e758934c6e453b1d104312200d1b374f0f116c55ab43b39e6c14c99a67
4
+ data.tar.gz: 2426153f36b7a16e4c2a577b33935783a79126b223b90993a8fa341834c98b7c
5
+ SHA512:
6
+ metadata.gz: a0e4495db8f10e6d997796dd43c13f6c3194a56d077b89c8efd2343b5493758d3c577f37cbfad1e1f9023bb2630e051971f1833c5fe4df087757ab05f747b14e
7
+ data.tar.gz: eb88923fe4a031ece2ea0a9026d4710e334dcdb8f3684820f4c2724aadda9f45174f7c68266429ca0e6eea87f933b204e9487716a40f95e8da54562c60bd98d8
data/.codeclimate.yml ADDED
@@ -0,0 +1,6 @@
1
+ engines:
2
+ reek:
3
+ enabled: true
4
+ checks:
5
+ IrresponsibleModule:
6
+ enabled: false
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,637 @@
1
+ AllCops:
2
+ Exclude:
3
+ - db/schema.rb
4
+
5
+ Style/AccessorMethodName:
6
+ Description: Check the naming of accessor methods for get_/set_.
7
+ Enabled: false
8
+
9
+ Style/Alias:
10
+ Description: 'Use alias_method instead of alias.'
11
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
12
+ Enabled: false
13
+
14
+ Style/AlignParameters:
15
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
16
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
17
+ Enabled: false
18
+
19
+ Style/ArrayJoin:
20
+ Description: 'Use Array#join instead of Array#*.'
21
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
22
+ Enabled: false
23
+
24
+ Style/AsciiComments:
25
+ Description: 'Use only ascii symbols in comments.'
26
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
27
+ Enabled: false
28
+
29
+ Style/AsciiIdentifiers:
30
+ Description: 'Use only ascii symbols in identifiers.'
31
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
32
+ Enabled: false
33
+
34
+ Style/Attr:
35
+ Description: 'Checks for uses of Module#attr.'
36
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
37
+ Enabled: false
38
+
39
+ Metrics/BlockNesting:
40
+ Description: 'Avoid excessive block nesting'
41
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
42
+ Enabled: false
43
+
44
+ Style/CaseEquality:
45
+ Description: 'Avoid explicit use of the case equality operator(===).'
46
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
47
+ Enabled: false
48
+
49
+ Style/CharacterLiteral:
50
+ Description: 'Checks for uses of character literals.'
51
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
52
+ Enabled: false
53
+
54
+ Style/ClassAndModuleChildren:
55
+ Description: 'Checks style of children classes and modules.'
56
+ Enabled: true
57
+ EnforcedStyle: nested
58
+
59
+ Metrics/ClassLength:
60
+ Description: 'Avoid classes longer than 100 lines of code.'
61
+ Enabled: false
62
+
63
+ Metrics/ModuleLength:
64
+ Description: 'Avoid modules longer than 100 lines of code.'
65
+ Enabled: false
66
+
67
+ Style/ClassVars:
68
+ Description: 'Avoid the use of class variables.'
69
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
70
+ Enabled: false
71
+
72
+ Style/CollectionMethods:
73
+ Enabled: true
74
+ PreferredMethods:
75
+ find: detect
76
+ inject: reduce
77
+ collect: map
78
+ find_all: select
79
+
80
+ Style/ColonMethodCall:
81
+ Description: 'Do not use :: for method call.'
82
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
83
+ Enabled: false
84
+
85
+ Style/CommentAnnotation:
86
+ Description: >-
87
+ Checks formatting of special comments
88
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
89
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
90
+ Enabled: false
91
+
92
+ Metrics/AbcSize:
93
+ Description: >-
94
+ A calculated magnitude based on number of assignments,
95
+ branches, and conditions.
96
+ Enabled: false
97
+
98
+ Metrics/CyclomaticComplexity:
99
+ Description: >-
100
+ A complexity metric that is strongly correlated to the number
101
+ of test cases needed to validate a method.
102
+ Enabled: false
103
+
104
+ Rails/Delegate:
105
+ Description: 'Prefer delegate method for delegations.'
106
+ Enabled: false
107
+
108
+ Style/PreferredHashMethods:
109
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
110
+ StyleGuide: '#hash-key'
111
+ Enabled: false
112
+
113
+ Style/Documentation:
114
+ Description: 'Document classes and non-namespace modules.'
115
+ Enabled: false
116
+
117
+ Style/DotPosition:
118
+ Description: 'Checks the position of the dot in multi-line method calls.'
119
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
120
+ EnforcedStyle: trailing
121
+
122
+ Style/DoubleNegation:
123
+ Description: 'Checks for uses of double negation (!!).'
124
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
125
+ Enabled: false
126
+
127
+ Style/EachWithObject:
128
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
129
+ Enabled: false
130
+
131
+ Style/EmptyLiteral:
132
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
133
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
134
+ Enabled: false
135
+
136
+ # Checks whether the source file has a utf-8 encoding comment or not
137
+ # AutoCorrectEncodingComment must match the regex
138
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
139
+ Style/Encoding:
140
+ Enabled: false
141
+
142
+ Style/EvenOdd:
143
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
144
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
145
+ Enabled: false
146
+
147
+ Style/ExtraSpacing:
148
+ Description: 'Do not use unnecessary spacing.'
149
+ Enabled: true
150
+
151
+ Style/FileName:
152
+ Description: 'Use snake_case for source file names.'
153
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
154
+ Enabled: false
155
+
156
+ Style/FrozenStringLiteralComment:
157
+ Description: >-
158
+ Add the frozen_string_literal comment to the top of files
159
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
160
+ Enabled: false
161
+
162
+ Style/FlipFlop:
163
+ Description: 'Checks for flip flops'
164
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
165
+ Enabled: false
166
+
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
+
172
+ Style/GlobalVars:
173
+ Description: 'Do not introduce global variables.'
174
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
175
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
176
+ Enabled: false
177
+
178
+ Style/GuardClause:
179
+ Description: 'Check for conditionals that can be replaced with guard clauses'
180
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
181
+ Enabled: false
182
+
183
+ Style/IfUnlessModifier:
184
+ Description: >-
185
+ Favor modifier if/unless usage when you have a
186
+ single-line body.
187
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
188
+ Enabled: false
189
+
190
+ Style/IfWithSemicolon:
191
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
192
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
193
+ Enabled: false
194
+
195
+ Style/InlineComment:
196
+ Description: 'Avoid inline comments.'
197
+ Enabled: false
198
+
199
+ Style/Lambda:
200
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
201
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
202
+ Enabled: false
203
+
204
+ Style/LambdaCall:
205
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
206
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
207
+ Enabled: false
208
+
209
+ Style/LineEndConcatenation:
210
+ Description: >-
211
+ Use \ instead of + or << to concatenate two string literals at
212
+ line end.
213
+ Enabled: false
214
+
215
+ Metrics/LineLength:
216
+ Description: 'Limit lines to 80 characters.'
217
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
218
+ Max: 80
219
+
220
+ Metrics/MethodLength:
221
+ Description: 'Avoid methods longer than 10 lines of code.'
222
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
223
+ Enabled: false
224
+
225
+ Style/ModuleFunction:
226
+ Description: 'Checks for usage of `extend self` in modules.'
227
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
228
+ Enabled: false
229
+
230
+ Style/MultilineOperationIndentation:
231
+ Description: >-
232
+ Checks indentation of binary operations that span more than
233
+ one line.
234
+ Enabled: true
235
+ EnforcedStyle: indented
236
+
237
+ Style/MultilineBlockChain:
238
+ Description: 'Avoid multi-line chains of blocks.'
239
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
240
+ Enabled: false
241
+
242
+ Style/MultilineMethodCallIndentation:
243
+ Description: >-
244
+ Checks indentation of method calls with the dot operator
245
+ that span more than one line.
246
+ Enabled: true
247
+ EnforcedStyle: indented
248
+
249
+ Style/NegatedIf:
250
+ Description: >-
251
+ Favor unless over if for negative conditions
252
+ (or control flow or).
253
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
254
+ Enabled: false
255
+
256
+ Style/NegatedWhile:
257
+ Description: 'Favor until over while for negative conditions.'
258
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
259
+ Enabled: false
260
+
261
+ Style/Next:
262
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
263
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
264
+ Enabled: false
265
+
266
+ Style/NilComparison:
267
+ Description: 'Prefer x.nil? to x == nil.'
268
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
269
+ Enabled: false
270
+
271
+ Style/Not:
272
+ Description: 'Use ! instead of not.'
273
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
274
+ Enabled: false
275
+
276
+ Style/NumericLiterals:
277
+ Description: >-
278
+ Add underscores to large numeric literals to improve their
279
+ readability.
280
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
281
+ Enabled: false
282
+
283
+ Style/OneLineConditional:
284
+ Description: >-
285
+ Favor the ternary operator(?:) over
286
+ if/then/else/end constructs.
287
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
288
+ Enabled: false
289
+
290
+ Style/OpMethod:
291
+ Description: 'When defining binary operators, name the argument other.'
292
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
293
+ Enabled: false
294
+
295
+ Metrics/ParameterLists:
296
+ Description: 'Avoid parameter lists longer than three or four parameters.'
297
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
298
+ Enabled: false
299
+
300
+ Style/PercentLiteralDelimiters:
301
+ Description: 'Use `%`-literal delimiters consistently'
302
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
303
+ Enabled: false
304
+
305
+ Style/PerlBackrefs:
306
+ Description: 'Avoid Perl-style regex back references.'
307
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
308
+ Enabled: false
309
+
310
+ Style/PredicateName:
311
+ Description: 'Check the names of predicate methods.'
312
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
313
+ NamePrefixBlacklist:
314
+ - is_
315
+ Exclude:
316
+ - spec/**/*
317
+
318
+ Style/Proc:
319
+ Description: 'Use proc instead of Proc.new.'
320
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
321
+ Enabled: false
322
+
323
+ Style/RaiseArgs:
324
+ Description: 'Checks the arguments passed to raise/fail.'
325
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
326
+ Enabled: false
327
+
328
+ Style/RegexpLiteral:
329
+ Description: 'Use / or %r around regular expressions.'
330
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
331
+ Enabled: false
332
+
333
+ Style/SelfAssignment:
334
+ Description: >-
335
+ Checks for places where self-assignment shorthand should have
336
+ been used.
337
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
338
+ Enabled: false
339
+
340
+ Style/SingleLineBlockParams:
341
+ Description: 'Enforces the names of some block params.'
342
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
343
+ Enabled: false
344
+
345
+ Style/SingleLineMethods:
346
+ Description: 'Avoid single-line methods.'
347
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
348
+ Enabled: false
349
+
350
+ Style/SignalException:
351
+ Description: 'Checks for proper usage of fail and raise.'
352
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
353
+ Enabled: false
354
+
355
+ Style/SpecialGlobalVars:
356
+ Description: 'Avoid Perl-style global variables.'
357
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
358
+ Enabled: false
359
+
360
+ Style/StringLiterals:
361
+ Description: 'Checks if uses of quotes match the configured preference.'
362
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
363
+ EnforcedStyle: double_quotes
364
+ Enabled: true
365
+
366
+ Style/TrailingCommaInArguments:
367
+ Description: 'Checks for trailing comma in argument lists.'
368
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
369
+ EnforcedStyleForMultiline: comma
370
+ SupportedStyles:
371
+ - comma
372
+ - consistent_comma
373
+ - no_comma
374
+ Enabled: true
375
+
376
+ Style/TrailingCommaInLiteral:
377
+ Description: 'Checks for trailing comma in array and hash literals.'
378
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
379
+ EnforcedStyleForMultiline: comma
380
+ SupportedStyles:
381
+ - comma
382
+ - consistent_comma
383
+ - no_comma
384
+ Enabled: true
385
+
386
+ Style/TrivialAccessors:
387
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
388
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
389
+ Enabled: false
390
+
391
+ Style/VariableInterpolation:
392
+ Description: >-
393
+ Don't interpolate global, instance and class variables
394
+ directly in strings.
395
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
396
+ Enabled: false
397
+
398
+ Style/WhenThen:
399
+ Description: 'Use when x then ... for one-line cases.'
400
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
401
+ Enabled: false
402
+
403
+ Style/WhileUntilModifier:
404
+ Description: >-
405
+ Favor modifier while/until usage when you have a
406
+ single-line body.
407
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
408
+ Enabled: false
409
+
410
+ Style/WordArray:
411
+ Description: 'Use %w or %W for arrays of words.'
412
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
413
+ Enabled: false
414
+
415
+ # Lint
416
+
417
+ Lint/AmbiguousOperator:
418
+ Description: >-
419
+ Checks for ambiguous operators in the first argument of a
420
+ method invocation without parentheses.
421
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
422
+ Enabled: false
423
+
424
+ Lint/AmbiguousRegexpLiteral:
425
+ Description: >-
426
+ Checks for ambiguous regexp literals in the first argument of
427
+ a method invocation without parenthesis.
428
+ Enabled: false
429
+
430
+ Lint/AssignmentInCondition:
431
+ Description: "Don't use assignment in conditions."
432
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
433
+ Enabled: false
434
+
435
+ Lint/CircularArgumentReference:
436
+ Description: "Don't refer to the keyword argument in the default value."
437
+ Enabled: false
438
+
439
+ Lint/ConditionPosition:
440
+ Description: >-
441
+ Checks for condition placed in a confusing position relative to
442
+ the keyword.
443
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
444
+ Enabled: false
445
+
446
+ Lint/DeprecatedClassMethods:
447
+ Description: 'Check for deprecated class method calls.'
448
+ Enabled: false
449
+
450
+ Lint/DuplicatedKey:
451
+ Description: 'Check for duplicate keys in hash literals.'
452
+ Enabled: false
453
+
454
+ Lint/EachWithObjectArgument:
455
+ Description: 'Check for immutable argument given to each_with_object.'
456
+ Enabled: false
457
+
458
+ Lint/ElseLayout:
459
+ Description: 'Check for odd code arrangement in an else block.'
460
+ Enabled: false
461
+
462
+ Lint/FormatParameterMismatch:
463
+ Description: 'The number of parameters to format/sprint must match the fields.'
464
+ Enabled: false
465
+
466
+ Lint/HandleExceptions:
467
+ Description: "Don't suppress exception."
468
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
469
+ Enabled: false
470
+
471
+ Lint/InvalidCharacterLiteral:
472
+ Description: >-
473
+ Checks for invalid character literals with a non-escaped
474
+ whitespace character.
475
+ Enabled: false
476
+
477
+ Style/InitialIndentation:
478
+ Description: >-
479
+ Checks the indentation of the first non-blank non-comment line in a file.
480
+ Enabled: false
481
+
482
+ Lint/LiteralInCondition:
483
+ Description: 'Checks of literals used in conditions.'
484
+ Enabled: false
485
+
486
+ Lint/LiteralInInterpolation:
487
+ Description: 'Checks for literals used in interpolation.'
488
+ Enabled: false
489
+
490
+ Lint/Loop:
491
+ Description: >-
492
+ Use Kernel#loop with break rather than begin/end/until or
493
+ begin/end/while for post-loop tests.
494
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
495
+ Enabled: false
496
+
497
+ Lint/NestedMethodDefinition:
498
+ Description: 'Do not use nested method definitions.'
499
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
500
+ Enabled: false
501
+
502
+ Lint/NonLocalExitFromIterator:
503
+ Description: 'Do not use return in iterator to cause non-local exit.'
504
+ Enabled: false
505
+
506
+ Lint/ParenthesesAsGroupedExpression:
507
+ Description: >-
508
+ Checks for method calls with a space before the opening
509
+ parenthesis.
510
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
511
+ Enabled: false
512
+
513
+ Lint/RequireParentheses:
514
+ Description: >-
515
+ Use parentheses in the method call to avoid confusion
516
+ about precedence.
517
+ Enabled: false
518
+
519
+ Lint/UnderscorePrefixedVariableName:
520
+ Description: 'Do not use prefix `_` for a variable that is used.'
521
+ Enabled: false
522
+
523
+ Lint/UnneededDisable:
524
+ Description: >-
525
+ Checks for rubocop:disable comments that can be removed.
526
+ Note: this cop is not disabled when disabling all cops.
527
+ It must be explicitly disabled.
528
+ Enabled: false
529
+
530
+ Lint/Void:
531
+ Description: 'Possible use of operator/literal/variable in void context.'
532
+ Enabled: false
533
+
534
+ # Performance
535
+
536
+ Performance/CaseWhenSplat:
537
+ Description: >-
538
+ Place `when` conditions that use splat at the end
539
+ of the list of `when` branches.
540
+ Enabled: false
541
+
542
+ Performance/Count:
543
+ Description: >-
544
+ Use `count` instead of `select...size`, `reject...size`,
545
+ `select...count`, `reject...count`, `select...length`,
546
+ and `reject...length`.
547
+ Enabled: false
548
+
549
+ Performance/Detect:
550
+ Description: >-
551
+ Use `detect` instead of `select.first`, `find_all.first`,
552
+ `select.last`, and `find_all.last`.
553
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
554
+ Enabled: false
555
+
556
+ Performance/FlatMap:
557
+ Description: >-
558
+ Use `Enumerable#flat_map`
559
+ instead of `Enumerable#map...Array#flatten(1)`
560
+ or `Enumberable#collect..Array#flatten(1)`
561
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
562
+ Enabled: false
563
+
564
+ Performance/ReverseEach:
565
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
566
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
567
+ Enabled: false
568
+
569
+ Performance/Sample:
570
+ Description: >-
571
+ Use `sample` instead of `shuffle.first`,
572
+ `shuffle.last`, and `shuffle[Fixnum]`.
573
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
574
+ Enabled: false
575
+
576
+ Performance/Size:
577
+ Description: >-
578
+ Use `size` instead of `count` for counting
579
+ the number of elements in `Array` and `Hash`.
580
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
581
+ Enabled: false
582
+
583
+ Performance/StringReplacement:
584
+ Description: >-
585
+ Use `tr` instead of `gsub` when you are replacing the same
586
+ number of characters. Use `delete` instead of `gsub` when
587
+ you are deleting characters.
588
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
589
+ Enabled: false
590
+
591
+ # Rails
592
+
593
+ Rails/ActionFilter:
594
+ Description: 'Enforces consistent use of action filter methods.'
595
+ Enabled: false
596
+
597
+ Rails/Date:
598
+ Description: >-
599
+ Checks the correct usage of date aware methods,
600
+ such as Date.today, Date.current etc.
601
+ Enabled: false
602
+
603
+ Rails/FindBy:
604
+ Description: 'Prefer find_by over where.first.'
605
+ Enabled: false
606
+
607
+ Rails/FindEach:
608
+ Description: 'Prefer all.find_each over all.find.'
609
+ Enabled: false
610
+
611
+ Rails/HasAndBelongsToMany:
612
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
613
+ Enabled: false
614
+
615
+ Rails/Output:
616
+ Description: 'Checks for calls to puts, print, etc.'
617
+ Enabled: false
618
+
619
+ Rails/ReadWriteAttribute:
620
+ Description: >-
621
+ Checks for read_attribute(:attr) and
622
+ write_attribute(:attr, val).
623
+ Enabled: false
624
+
625
+ Rails/ScopeArgs:
626
+ Description: 'Checks the arguments of ActiveRecord scopes.'
627
+ Enabled: false
628
+
629
+ Rails/TimeZone:
630
+ Description: 'Checks the correct usage of time zone aware methods.'
631
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
632
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
633
+ Enabled: false
634
+
635
+ Rails/Validation:
636
+ Description: 'Use validates :attribute, hash of validations.'
637
+ Enabled: false