ndb-ruby 0.2.0

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