simple_form_materialize 1.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +18 -0
  3. data/.gitignore +55 -0
  4. data/.rubocop.yml +862 -0
  5. data/.ruby-version +1 -0
  6. data/.yardopts +1 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/Gemfile +14 -0
  9. data/Gemfile.lock +147 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +33 -0
  12. data/Rakefile +31 -0
  13. data/bin/console +7 -0
  14. data/bin/setup +6 -0
  15. data/circle.yml +21 -0
  16. data/lib/generators/simple_form_materialize/install_generator.rb +17 -0
  17. data/lib/generators/templates/assets/javascripts/init_form_materialize.coffee +16 -0
  18. data/lib/generators/templates/config/initializers/simple_form_components.rb +18 -0
  19. data/lib/generators/templates/config/initializers/simple_form_materialize.rb +244 -0
  20. data/lib/simple_form_materialize/version.rb +4 -0
  21. data/lib/simple_form_materialize.rb +5 -0
  22. data/simple_form_materialize.gemspec +28 -0
  23. data/test/lib/install_generator_test.rb +19 -0
  24. data/test/rails_app/Rakefile +8 -0
  25. data/test/rails_app/app/controllers/application_controller.rb +7 -0
  26. data/test/rails_app/app/controllers/home_controller.rb +5 -0
  27. data/test/rails_app/app/helpers/application_helper.rb +4 -0
  28. data/test/rails_app/app/views/home/index.html.erb +1 -0
  29. data/test/rails_app/app/views/layouts/application.html.erb +13 -0
  30. data/test/rails_app/bin/bundle +4 -0
  31. data/test/rails_app/bin/rails +5 -0
  32. data/test/rails_app/bin/rake +5 -0
  33. data/test/rails_app/config/application.rb +13 -0
  34. data/test/rails_app/config/boot.rb +15 -0
  35. data/test/rails_app/config/database.yml +18 -0
  36. data/test/rails_app/config/environment.rb +6 -0
  37. data/test/rails_app/config/environments/development.rb +31 -0
  38. data/test/rails_app/config/environments/production.rb +87 -0
  39. data/test/rails_app/config/environments/test.rb +46 -0
  40. data/test/rails_app/config/initializers/backtrace_silencers.rb +8 -0
  41. data/test/rails_app/config/initializers/inflections.rb +3 -0
  42. data/test/rails_app/config/initializers/secret_token.rb +4 -0
  43. data/test/rails_app/config/initializers/session_store.rb +2 -0
  44. data/test/rails_app/config/routes.rb +4 -0
  45. data/test/rails_app/config.ru +5 -0
  46. data/test/rails_app/public/404.html +26 -0
  47. data/test/rails_app/public/422.html +26 -0
  48. data/test/rails_app/public/500.html +26 -0
  49. data/test/rails_app/public/favicon.ico +0 -0
  50. data/test/simple_form_materialize_test.rb +5 -0
  51. data/test/test_helper.rb +31 -0
  52. metadata +143 -0
data/.rubocop.yml ADDED
@@ -0,0 +1,862 @@
1
+ ---
2
+ AllCops:
3
+ Exclude:
4
+ - vendor/**/*
5
+ - db/**/*
6
+ - Gemfile.lock
7
+ - simple_form_materialize.gemspec
8
+ - Rakefile
9
+ - test/rails_app/**/*
10
+ - test/tmp/**/*
11
+ - lib/generators/templates/**/*
12
+ TargetRubyVersion: 2.4
13
+ Lint/AmbiguousOperator:
14
+ Description: Checks for ambiguous operators in the first argument of a method invocation
15
+ without parentheses.
16
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
17
+ Enabled: true
18
+ Lint/AmbiguousRegexpLiteral:
19
+ Description: Checks for ambiguous regexp literals in the first argument of a method
20
+ invocation without parenthesis.
21
+ Enabled: true
22
+ Lint/AssignmentInCondition:
23
+ Description: Don't use assignment in conditions.
24
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
25
+ Enabled: true
26
+ Lint/BlockAlignment:
27
+ Description: Align block ends correctly.
28
+ Enabled: true
29
+ Lint/CircularArgumentReference:
30
+ Description: Don't refer to the keyword argument in the default value.
31
+ Enabled: true
32
+ Lint/ConditionPosition:
33
+ Description: Checks for condition placed in a confusing position relative to the
34
+ keyword.
35
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
36
+ Enabled: true
37
+ Lint/Debugger:
38
+ Description: Check for debugger calls.
39
+ Enabled: true
40
+ Lint/DefEndAlignment:
41
+ Description: Align ends corresponding to defs correctly.
42
+ Enabled: true
43
+ Lint/DeprecatedClassMethods:
44
+ Description: Check for deprecated class method calls.
45
+ Enabled: true
46
+ Lint/DuplicateMethods:
47
+ Description: Check for duplicate methods calls.
48
+ Enabled: true
49
+ Lint/EachWithObjectArgument:
50
+ Description: Check for immutable argument given to each_with_object.
51
+ Enabled: true
52
+ Lint/ElseLayout:
53
+ Description: Check for odd code arrangement in an else block.
54
+ Enabled: true
55
+ Lint/EmptyEnsure:
56
+ Description: Checks for empty ensure block.
57
+ Enabled: true
58
+ Lint/EmptyInterpolation:
59
+ Description: Checks for empty string interpolation.
60
+ Enabled: true
61
+ Lint/EndAlignment:
62
+ Description: Align ends correctly.
63
+ Enabled: true
64
+ Lint/EndInMethod:
65
+ Description: END blocks should not be placed inside method definitions.
66
+ Enabled: true
67
+ Lint/EnsureReturn:
68
+ Description: Do not use return in an ensure block.
69
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
70
+ Enabled: true
71
+ Lint/FormatParameterMismatch:
72
+ Description: The number of parameters to format/sprint must match the fields.
73
+ Enabled: true
74
+ Lint/HandleExceptions:
75
+ Description: Don't suppress exception.
76
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
77
+ Enabled: true
78
+ Lint/InvalidCharacterLiteral:
79
+ Description: Checks for invalid character literals with a non-escaped whitespace
80
+ character.
81
+ Enabled: true
82
+ Lint/LiteralInCondition:
83
+ Description: Checks of literals used in conditions.
84
+ Enabled: true
85
+ Lint/LiteralInInterpolation:
86
+ Description: Checks for literals used in interpolation.
87
+ Enabled: true
88
+ Lint/Loop:
89
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
90
+ for post-loop tests.
91
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
92
+ Enabled: true
93
+ Lint/NestedMethodDefinition:
94
+ Description: Do not use nested method definitions.
95
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
96
+ Enabled: true
97
+ Lint/NonLocalExitFromIterator:
98
+ Description: Do not use return in iterator to cause non-local exit.
99
+ Enabled: true
100
+ Lint/ParenthesesAsGroupedExpression:
101
+ Description: Checks for method calls with a space before the opening parenthesis.
102
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
103
+ Enabled: true
104
+ Lint/RequireParentheses:
105
+ Description: Use parentheses in the method call to avoid confusion about precedence.
106
+ Enabled: true
107
+ Lint/RescueException:
108
+ Description: Avoid rescuing the Exception class.
109
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
110
+ Enabled: true
111
+ Lint/ShadowingOuterLocalVariable:
112
+ Description: Do not use the same name as outer local variable for block arguments
113
+ or block local variables.
114
+ Enabled: true
115
+ Lint/StringConversionInInterpolation:
116
+ Description: Checks for Object#to_s usage in string interpolation.
117
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
118
+ Enabled: true
119
+ Lint/UnderscorePrefixedVariableName:
120
+ Description: Do not use prefix `_` for a variable that is used.
121
+ Enabled: true
122
+ Lint/UnneededDisable:
123
+ Description: 'Checks for rubocop:disable comments that can be removed. Note: this
124
+ cop is not disabled when disabling all cops. It must be explicitly disabled.'
125
+ Enabled: true
126
+ Lint/UnusedBlockArgument:
127
+ Description: Checks for unused block arguments.
128
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
129
+ Enabled: true
130
+ Lint/UnusedMethodArgument:
131
+ Description: Checks for unused method arguments.
132
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
133
+ Enabled: true
134
+ Lint/UnreachableCode:
135
+ Description: Unreachable code.
136
+ Enabled: true
137
+ Lint/UselessAccessModifier:
138
+ Description: Checks for useless access modifiers.
139
+ Enabled: true
140
+ Lint/UselessAssignment:
141
+ Description: Checks for useless assignment to a local variable.
142
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
143
+ Enabled: true
144
+ Lint/UselessComparison:
145
+ Description: Checks for comparison of something with itself.
146
+ Enabled: true
147
+ Lint/UselessElseWithoutRescue:
148
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
149
+ Enabled: true
150
+ Lint/UselessSetterCall:
151
+ Description: Checks for useless setter call to a local variable.
152
+ Enabled: true
153
+ Lint/Void:
154
+ Description: Possible use of operator/literal/variable in void context.
155
+ Enabled: true
156
+ Metrics/AbcSize:
157
+ Description: A calculated magnitude based on number of assignments, branches, and
158
+ conditions.
159
+ Reference: http://c2.com/cgi/wiki?AbcMetric
160
+ Enabled: true
161
+ Max: 15
162
+ Metrics/BlockNesting:
163
+ Description: Avoid excessive block nesting
164
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
165
+ Enabled: true
166
+ Max: 4
167
+ Metrics/ClassLength:
168
+ Description: Avoid classes longer than 100 lines of code.
169
+ Enabled: true
170
+ Max: 100
171
+ Metrics/CyclomaticComplexity:
172
+ Description: A complexity metric that is strongly correlated to the number of test
173
+ cases needed to validate a method.
174
+ Enabled: true
175
+ Metrics/LineLength:
176
+ Description: Limit lines to 80 characters.
177
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
178
+ Enabled: true
179
+ Metrics/MethodLength:
180
+ Description: Avoid methods longer than 10 lines of code.
181
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
182
+ Enabled: true
183
+ Max: 10
184
+ Metrics/ModuleLength:
185
+ Description: Avoid modules longer than 100 lines of code.
186
+ Enabled: true
187
+ Max: 100
188
+ Metrics/ParameterLists:
189
+ Description: Avoid parameter lists longer than three or four parameters.
190
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
191
+ Enabled: false
192
+ Metrics/PerceivedComplexity:
193
+ Description: A complexity metric geared towards measuring complexity for a human
194
+ reader.
195
+ Enabled: true
196
+ Metrics/BlockLength:
197
+ Exclude:
198
+ - Rakefile
199
+ - "**/*.rake"
200
+ - spec/**/*.rb
201
+ Performance/Count:
202
+ Description: Use `count` instead of `select...size`, `reject...size`, `select...count`,
203
+ `reject...count`, `select...length`, and `reject...length`.
204
+ Enabled: true
205
+ Performance/Detect:
206
+ Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`,
207
+ and `find_all.last`.
208
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code
209
+ Enabled: true
210
+ Performance/FlatMap:
211
+ Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)`
212
+ or `Enumberable#collect..Array#flatten(1)`
213
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
214
+ Enabled: true
215
+ EnabledForFlattenWithoutParams: false
216
+ Performance/ReverseEach:
217
+ Description: Use `reverse_each` instead of `reverse.each`.
218
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
219
+ Enabled: true
220
+ Performance/Sample:
221
+ Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Fixnum]`.
222
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
223
+ Enabled: true
224
+ Performance/Size:
225
+ Description: Use `size` instead of `count` for counting the number of elements in
226
+ `Array` and `Hash`.
227
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
228
+ Enabled: true
229
+ Performance/StringReplacement:
230
+ Description: Use `tr` instead of `gsub` when you are replacing the same number of
231
+ characters. Use `delete` instead of `gsub` when you are deleting characters.
232
+ Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
233
+ Enabled: true
234
+ Rails/ActionFilter:
235
+ Description: Enforces consistent use of action filter methods.
236
+ Enabled: false
237
+ Rails/Date:
238
+ Description: Checks the correct usage of date aware methods, such as Date.today,
239
+ Date.current etc.
240
+ Enabled: true
241
+ Rails/Delegate:
242
+ Description: Prefer delegate method for delegations.
243
+ Enabled: true
244
+ Rails/FindBy:
245
+ Description: Prefer find_by over where.first.
246
+ Enabled: true
247
+ Rails/FindEach:
248
+ Description: Prefer all.find_each over all.find.
249
+ Enabled: true
250
+ Rails/HasAndBelongsToMany:
251
+ Description: Prefer has_many :through to has_and_belongs_to_many.
252
+ Enabled: true
253
+ Rails/Output:
254
+ Description: Checks for calls to puts, print, etc.
255
+ Enabled: true
256
+ Rails/ReadWriteAttribute:
257
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
258
+ Enabled: false
259
+ Rails/ScopeArgs:
260
+ Description: Checks the arguments of ActiveRecord scopes.
261
+ Enabled: true
262
+ Rails/TimeZone:
263
+ Description: Checks the correct usage of time zone aware methods.
264
+ StyleGuide: https://github.com/bbatsov/rails-style-guide#time
265
+ Reference: http://danilenko.org/2012/7/6/rails_timezones
266
+ Enabled: true
267
+ Rails/Validation:
268
+ Description: Use validates :attribute, hash of validations.
269
+ Enabled: true
270
+ Style/AccessModifierIndentation:
271
+ Description: Check indentation of private/protected visibility modifiers.
272
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
273
+ Enabled: false
274
+ Style/AccessorMethodName:
275
+ Description: Check the naming of accessor methods for get_/set_.
276
+ Enabled: false
277
+ Style/Alias:
278
+ Description: Use alias_method instead of alias.
279
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
280
+ Enabled: false
281
+ Style/AlignArray:
282
+ Description: Align the elements of an array literal if they span more than one line.
283
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
284
+ Enabled: true
285
+ Style/AlignHash:
286
+ Description: Align the elements of a hash literal if they span more than one line.
287
+ Enabled: true
288
+ Style/AlignParameters:
289
+ Description: Align the parameters of a method call if they span more than one line.
290
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
291
+ Enabled: true
292
+ Style/AndOr:
293
+ Description: Use &&/|| instead of and/or.
294
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
295
+ Enabled: true
296
+ Style/ArrayJoin:
297
+ Description: Use Array#join instead of Array#*.
298
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
299
+ Enabled: false
300
+ Style/AsciiComments:
301
+ Description: Use only ascii symbols in comments.
302
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
303
+ Enabled: false
304
+ Style/AsciiIdentifiers:
305
+ Description: Use only ascii symbols in identifiers.
306
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
307
+ Enabled: false
308
+ Style/Attr:
309
+ Description: Checks for uses of Module#attr.
310
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
311
+ Enabled: true
312
+ Style/BeginBlock:
313
+ Description: Avoid the use of BEGIN blocks.
314
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
315
+ Enabled: true
316
+ Style/BarePercentLiterals:
317
+ Description: Checks if usage of %() or %Q() matches configuration.
318
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
319
+ Enabled: true
320
+ Style/BlockComments:
321
+ Description: Do not use block comments.
322
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
323
+ Enabled: false
324
+ Style/BlockEndNewline:
325
+ Description: Put end statement of multiline block on its own line.
326
+ Enabled: true
327
+ Style/BlockDelimiters:
328
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
329
+ ugly). Prefer {...} over do...end for single-line blocks.
330
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
331
+ Enabled: true
332
+ Style/BracesAroundHashParameters:
333
+ Description: Enforce braces style around hash parameters.
334
+ Enabled: false
335
+ Style/CaseEquality:
336
+ Description: Avoid explicit use of the case equality operator(===).
337
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
338
+ Enabled: false
339
+ Style/CaseIndentation:
340
+ Description: Indentation of when in a case/when/[else/]end.
341
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
342
+ Enabled: true
343
+ Style/CharacterLiteral:
344
+ Description: Checks for uses of character literals.
345
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
346
+ Enabled: false
347
+ Style/ClassAndModuleCamelCase:
348
+ Description: Use CamelCase for classes and modules.
349
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
350
+ Enabled: true
351
+ Style/ClassAndModuleChildren:
352
+ Description: Checks style of children classes and modules.
353
+ Enabled: false
354
+ Style/ClassCheck:
355
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
356
+ Enabled: true
357
+ Style/ClassMethods:
358
+ Description: Use self when defining module/class methods.
359
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods
360
+ Enabled: false
361
+ Style/ClassVars:
362
+ Description: Avoid the use of class variables.
363
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
364
+ Enabled: false
365
+ Style/ClosingParenthesisIndentation:
366
+ Description: Checks the indentation of hanging closing parentheses.
367
+ Enabled: false
368
+ Style/ColonMethodCall:
369
+ Description: 'Do not use :: for method call.'
370
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
371
+ Enabled: true
372
+ Style/CommandLiteral:
373
+ Description: Use `` or %x around command literals.
374
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
375
+ Enabled: false
376
+ Style/CommentAnnotation:
377
+ Description: Checks formatting of annotation comments.
378
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
379
+ Enabled: false
380
+ Style/CommentIndentation:
381
+ Description: Indentation of comments.
382
+ Enabled: false
383
+ Style/ConstantName:
384
+ Description: Constants should use SCREAMING_SNAKE_CASE.
385
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
386
+ Enabled: true
387
+ Style/DefWithParentheses:
388
+ Description: Use def with parentheses when there are arguments.
389
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
390
+ Enabled: true
391
+ Style/Documentation:
392
+ Description: Document classes and non-namespace modules.
393
+ Enabled: false
394
+ Style/DotPosition:
395
+ Description: Checks the position of the dot in multi-line method calls.
396
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
397
+ Enabled: true
398
+ Style/DoubleNegation:
399
+ Description: Checks for uses of double negation (!!).
400
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
401
+ Enabled: true
402
+ Style/EachWithObject:
403
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
404
+ Enabled: false
405
+ Style/ElseAlignment:
406
+ Description: Align elses and elsifs correctly.
407
+ Enabled: true
408
+ Style/EmptyElse:
409
+ Description: Avoid empty else-clauses.
410
+ Enabled: true
411
+ Style/EmptyLineBetweenDefs:
412
+ Description: Use empty lines between defs.
413
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
414
+ Enabled: true
415
+ Style/EmptyLines:
416
+ Description: Don't use several empty lines in a row.
417
+ Enabled: true
418
+ Style/EmptyLinesAroundAccessModifier:
419
+ Description: Keep blank lines around access modifiers.
420
+ Enabled: false
421
+ Style/EmptyLinesAroundBlockBody:
422
+ Description: Keeps track of empty lines around block bodies.
423
+ Enabled: false
424
+ Style/EmptyLinesAroundClassBody:
425
+ Description: Keeps track of empty lines around class bodies.
426
+ Enabled: false
427
+ Style/EmptyLinesAroundModuleBody:
428
+ Description: Keeps track of empty lines around module bodies.
429
+ Enabled: false
430
+ Style/EmptyLinesAroundMethodBody:
431
+ Description: Keeps track of empty lines around method bodies.
432
+ Enabled: false
433
+ Style/EmptyLiteral:
434
+ Description: Prefer literals to Array.new/Hash.new/String.new.
435
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
436
+ Enabled: false
437
+ Style/EndBlock:
438
+ Description: Avoid the use of END blocks.
439
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
440
+ Enabled: false
441
+ Style/EndOfLine:
442
+ Description: Use Unix-style line endings.
443
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
444
+ Enabled: false
445
+ Style/EvenOdd:
446
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
447
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
448
+ Enabled: true
449
+ Style/ExtraSpacing:
450
+ Description: Do not use unnecessary spacing.
451
+ Enabled: true
452
+ Style/FileName:
453
+ Description: Use snake_case for source file names.
454
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
455
+ Enabled: true
456
+ Style/InitialIndentation:
457
+ Description: Checks the indentation of the first non-blank non-comment line in a
458
+ file.
459
+ Enabled: false
460
+ Style/FirstParameterIndentation:
461
+ Description: Checks the indentation of the first parameter in a method call.
462
+ Enabled: false
463
+ Style/FlipFlop:
464
+ Description: Checks for flip flops
465
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
466
+ Enabled: true
467
+ Style/For:
468
+ Description: Checks use of for or each in multiline loops.
469
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
470
+ Enabled: true
471
+ Style/FormatString:
472
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
473
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
474
+ Enabled: false
475
+ Style/GlobalVars:
476
+ Description: Do not introduce global variables.
477
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
478
+ Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
479
+ Enabled: true
480
+ Style/GuardClause:
481
+ Description: Check for conditionals that can be replaced with guard clauses
482
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
483
+ Enabled: true
484
+ Style/HashSyntax:
485
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
486
+ 1, :b => 2 }.'
487
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
488
+ Enabled: true
489
+ Style/IfUnlessModifier:
490
+ Description: Favor modifier if/unless usage when you have a single-line body.
491
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
492
+ Enabled: true
493
+ Style/IfWithSemicolon:
494
+ Description: Do not use if x; .... Use the ternary operator instead.
495
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
496
+ Enabled: true
497
+ Style/IndentationConsistency:
498
+ Description: Keep indentation straight.
499
+ Enabled: false
500
+ Style/IndentationWidth:
501
+ Description: Use 2 spaces for indentation.
502
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
503
+ Enabled: true
504
+ Style/IndentArray:
505
+ Description: Checks the indentation of the first element in an array literal.
506
+ Enabled: false
507
+ Style/IndentHash:
508
+ Description: Checks the indentation of the first key in a hash literal.
509
+ Enabled: false
510
+ Style/InfiniteLoop:
511
+ Description: Use Kernel#loop for infinite loops.
512
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
513
+ Enabled: true
514
+ Style/Lambda:
515
+ Description: Use the new lambda literal syntax for single-line blocks.
516
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
517
+ Enabled: true
518
+ Style/LambdaCall:
519
+ Description: Use lambda.call(...) instead of lambda.(...).
520
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
521
+ Enabled: false
522
+ Style/LeadingCommentSpace:
523
+ Description: Comments should start with a space.
524
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
525
+ Enabled: true
526
+ Style/LineEndConcatenation:
527
+ Description: Use \ instead of + or << to concatenate two string literals at line
528
+ end.
529
+ Enabled: true
530
+ Style/MethodCallWithoutArgsParentheses:
531
+ Description: Do not use parentheses for method calls with no arguments.
532
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
533
+ Enabled: true
534
+ Style/MethodDefParentheses:
535
+ Description: Checks if the method definitions have or don't have parentheses.
536
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
537
+ Enabled: true
538
+ Style/MethodName:
539
+ Description: Use the configured style when naming methods.
540
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
541
+ Enabled: false
542
+ Style/ModuleFunction:
543
+ Description: Checks for usage of `extend self` in modules.
544
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
545
+ Enabled: true
546
+ Style/MultilineBlockChain:
547
+ Description: Avoid multi-line chains of blocks.
548
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
549
+ Enabled: false
550
+ Style/MultilineBlockLayout:
551
+ Description: Ensures newlines after multiline block do statements.
552
+ Enabled: true
553
+ Style/MultilineIfThen:
554
+ Description: Do not use then for multi-line if/unless.
555
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
556
+ Enabled: true
557
+ Style/MultilineOperationIndentation:
558
+ Description: Checks indentation of binary operations that span more than one line.
559
+ Enabled: false
560
+ Style/MultilineTernaryOperator:
561
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
562
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
563
+ Enabled: true
564
+ Style/NegatedIf:
565
+ Description: Favor unless over if for negative conditions (or control flow or).
566
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
567
+ Enabled: true
568
+ Style/NegatedWhile:
569
+ Description: Favor until over while for negative conditions.
570
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
571
+ Enabled: true
572
+ Style/NestedTernaryOperator:
573
+ Description: Use one expression per branch in a ternary operator.
574
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
575
+ Enabled: true
576
+ Style/Next:
577
+ Description: Use `next` to skip iteration instead of a condition at the end.
578
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
579
+ Enabled: true
580
+ Style/NilComparison:
581
+ Description: Prefer x.nil? to x == nil.
582
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
583
+ Enabled: true
584
+ Style/NonNilCheck:
585
+ Description: Checks for redundant nil checks.
586
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
587
+ Enabled: true
588
+ Style/Not:
589
+ Description: Use ! instead of not.
590
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
591
+ Enabled: true
592
+ Style/NumericLiterals:
593
+ Description: Add underscores to large numeric literals to improve their readability.
594
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
595
+ Enabled: true
596
+ Style/OneLineConditional:
597
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
598
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
599
+ Enabled: false
600
+ Style/OpMethod:
601
+ Description: When defining binary operators, name the argument other.
602
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
603
+ Enabled: false
604
+ Style/OptionalArguments:
605
+ Description: Checks for optional arguments that do not appear at the end of the
606
+ argument list
607
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
608
+ Enabled: false
609
+ Style/ParallelAssignment:
610
+ Description: Check for simple usages of parallel assignment. It will only warn when
611
+ the number of variables matches on both sides of the assignment. This also provides
612
+ performance benefits
613
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
614
+ Enabled: false
615
+ Style/ParenthesesAroundCondition:
616
+ Description: Don't use parentheses around the condition of an if/unless/while.
617
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
618
+ Enabled: true
619
+ Style/PercentLiteralDelimiters:
620
+ Description: Use `%`-literal delimiters consistently
621
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
622
+ Enabled: true
623
+ Style/PercentQLiterals:
624
+ Description: Checks if uses of %Q/%q match the configured preference.
625
+ Enabled: true
626
+ Style/PerlBackrefs:
627
+ Description: Avoid Perl-style regex back references.
628
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
629
+ Enabled: false
630
+ Style/PredicateName:
631
+ Description: Check the names of predicate methods.
632
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
633
+ Enabled: true
634
+ Style/Proc:
635
+ Description: Use proc instead of Proc.new.
636
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
637
+ Enabled: true
638
+ Style/RaiseArgs:
639
+ Description: Checks the arguments passed to raise/fail.
640
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
641
+ Enabled: false
642
+ Style/RedundantBegin:
643
+ Description: Don't use begin blocks when they are not needed.
644
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
645
+ Enabled: true
646
+ Style/RedundantException:
647
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
648
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
649
+ Enabled: true
650
+ Style/RedundantReturn:
651
+ Description: Don't use return where it's not required.
652
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
653
+ Enabled: true
654
+ Style/RedundantSelf:
655
+ Description: Don't use self where it's not needed.
656
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
657
+ Enabled: true
658
+ Style/RegexpLiteral:
659
+ Description: Use / or %r around regular expressions.
660
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
661
+ Enabled: false
662
+ Style/RescueEnsureAlignment:
663
+ Description: Align rescues and ensures correctly.
664
+ Enabled: false
665
+ Style/RescueModifier:
666
+ Description: Avoid using rescue in its modifier form.
667
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
668
+ Enabled: false
669
+ Style/SelfAssignment:
670
+ Description: Checks for places where self-assignment shorthand should have been
671
+ used.
672
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
673
+ Enabled: true
674
+ Style/Semicolon:
675
+ Description: Don't use semicolons to terminate expressions.
676
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
677
+ Enabled: true
678
+ Style/SignalException:
679
+ Description: Checks for proper usage of fail and raise.
680
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
681
+ Enabled: true
682
+ Style/SingleLineBlockParams:
683
+ Description: Enforces the names of some block params.
684
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
685
+ Enabled: true
686
+ Style/SingleLineMethods:
687
+ Description: Avoid single-line methods.
688
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
689
+ Enabled: false
690
+ Style/SpaceBeforeFirstArg:
691
+ Description: Checks that exactly one space is used between a method name and the
692
+ first argument for method calls without parentheses.
693
+ Enabled: true
694
+ Style/SpaceAfterColon:
695
+ Description: Use spaces after colons.
696
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
697
+ Enabled: true
698
+ Style/SpaceAfterComma:
699
+ Description: Use spaces after commas.
700
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
701
+ Enabled: true
702
+ Style/SpaceAroundKeyword:
703
+ Description: Use spaces around keywords.
704
+ Enabled: true
705
+ Style/SpaceAfterMethodName:
706
+ Description: Do not put a space between a method name and the opening parenthesis
707
+ in a method definition.
708
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
709
+ Enabled: true
710
+ Style/SpaceAfterNot:
711
+ Description: Tracks redundant space after the ! operator.
712
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
713
+ Enabled: false
714
+ Style/SpaceAfterSemicolon:
715
+ Description: Use spaces after semicolons.
716
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
717
+ Enabled: true
718
+ Style/SpaceBeforeBlockBraces:
719
+ Description: Checks that the left block brace has or doesn't have space before it.
720
+ Enabled: false
721
+ Style/SpaceBeforeComma:
722
+ Description: No spaces before commas.
723
+ Enabled: false
724
+ Style/SpaceBeforeComment:
725
+ Description: Checks for missing space between code and a comment on the same line.
726
+ Enabled: false
727
+ Style/SpaceBeforeSemicolon:
728
+ Description: No spaces before semicolons.
729
+ Enabled: false
730
+ Style/SpaceInsideBlockBraces:
731
+ Description: Checks that block braces have or don't have surrounding space. For
732
+ blocks taking parameters, checks that the left brace has or doesn't have trailing
733
+ space.
734
+ Enabled: false
735
+ Style/SpaceAroundBlockParameters:
736
+ Description: Checks the spacing inside and after block parameters pipes.
737
+ Enabled: true
738
+ Style/SpaceAroundEqualsInParameterDefault:
739
+ Description: Checks that the equals signs in parameter default assignments have
740
+ or don't have surrounding space depending on configuration.
741
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
742
+ Enabled: true
743
+ Style/SpaceAroundOperators:
744
+ Description: Use a single space around operators.
745
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
746
+ Enabled: true
747
+ Style/SpaceInsideBrackets:
748
+ Description: No spaces after [ or before ].
749
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
750
+ Enabled: false
751
+ Style/SpaceInsideHashLiteralBraces:
752
+ Description: Use spaces inside hash literal braces - or don't.
753
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
754
+ Enabled: false
755
+ Style/SpaceInsideParens:
756
+ Description: No spaces after ( or before ).
757
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
758
+ Enabled: true
759
+ Style/SpaceInsideRangeLiteral:
760
+ Description: No spaces inside range literals.
761
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
762
+ Enabled: true
763
+ Style/SpaceInsideStringInterpolation:
764
+ Description: Checks for padding/surrounding spaces inside string interpolation.
765
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
766
+ Enabled: false
767
+ Style/SpecialGlobalVars:
768
+ Description: Avoid Perl-style global variables.
769
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
770
+ Enabled: false
771
+ Style/StringLiterals:
772
+ Description: Checks if uses of quotes match the configured preference.
773
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
774
+ EnforcedStyle: double_quotes
775
+ Enabled: true
776
+ Style/StringLiteralsInInterpolation:
777
+ Description: Checks if uses of quotes inside expressions in interpolated strings
778
+ match the configured preference.
779
+ Enabled: true
780
+ Style/StructInheritance:
781
+ Description: Checks for inheritance from Struct.new.
782
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
783
+ Enabled: false
784
+ Style/SymbolLiteral:
785
+ Description: Use plain symbols instead of string symbols when possible.
786
+ Enabled: false
787
+ Style/SymbolProc:
788
+ Description: Use symbols as procs instead of blocks when possible.
789
+ Enabled: false
790
+ Style/Tab:
791
+ Description: No hard tabs.
792
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
793
+ Enabled: false
794
+ Style/TrailingBlankLines:
795
+ Description: Checks trailing blank lines and final newline.
796
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
797
+ Enabled: false
798
+ Style/TrailingCommaInArguments:
799
+ Description: Checks for trailing comma in parameter lists.
800
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma
801
+ Enabled: false
802
+ Style/TrailingCommaInLiteral:
803
+ Description: Checks for trailing comma in literals.
804
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
805
+ Enabled: false
806
+ Style/TrailingWhitespace:
807
+ Description: Avoid trailing whitespace.
808
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
809
+ Enabled: false
810
+ Style/TrivialAccessors:
811
+ Description: Prefer attr_* methods to trivial readers/writers.
812
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
813
+ Enabled: false
814
+ Style/UnlessElse:
815
+ Description: Do not use unless with else. Rewrite these with the positive case first.
816
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
817
+ Enabled: true
818
+ Style/UnneededCapitalW:
819
+ Description: Checks for %W when interpolation is not needed.
820
+ Enabled: false
821
+ Style/UnneededPercentQ:
822
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
823
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
824
+ Enabled: false
825
+ Style/TrailingUnderscoreVariable:
826
+ Description: Checks for the usage of unneeded trailing underscores at the end of
827
+ parallel variable assignment.
828
+ Enabled: false
829
+ Style/VariableInterpolation:
830
+ Description: Don't interpolate global, instance and class variables directly in
831
+ strings.
832
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
833
+ Enabled: true
834
+ Style/VariableName:
835
+ Description: Use the configured style when naming variables.
836
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
837
+ Enabled: true
838
+ Style/WhenThen:
839
+ Description: Use when x then ... for one-line cases.
840
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
841
+ Enabled: true
842
+ Style/WhileUntilDo:
843
+ Description: Checks for redundant do after while or until.
844
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
845
+ Enabled: true
846
+ Style/WhileUntilModifier:
847
+ Description: Favor modifier while/until usage when you have a single-line body.
848
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
849
+ Enabled: true
850
+ Style/MutableConstant:
851
+ Enabled: true
852
+ Style/FrozenStringLiteralComment:
853
+ Enabled: true
854
+ Style/WordArray:
855
+ Description: Use %w or %W for arrays of words.
856
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
857
+ Enabled: true
858
+ Style/EmptyMethod:
859
+ Enabled: false
860
+ Security/Eval:
861
+ Description: The use of eval represents a serious security risk.
862
+ Enabled: true