ups-ruby 0.8.3

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 (56) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.hound.yml +2 -0
  4. data/.rubocop.yml +1064 -0
  5. data/.travis.yml +10 -0
  6. data/Gemfile +10 -0
  7. data/Gemfile.lock +46 -0
  8. data/LICENSE.txt +14 -0
  9. data/README.md +78 -0
  10. data/Rakefile +17 -0
  11. data/lib/ups-ruby.rb +2 -0
  12. data/lib/ups.rb +33 -0
  13. data/lib/ups/builders/address_builder.rb +135 -0
  14. data/lib/ups/builders/builder_base.rb +216 -0
  15. data/lib/ups/builders/organisation_builder.rb +74 -0
  16. data/lib/ups/builders/rate_builder.rb +21 -0
  17. data/lib/ups/builders/ship_accept_builder.rb +30 -0
  18. data/lib/ups/builders/ship_confirm_builder.rb +103 -0
  19. data/lib/ups/builders/shipper_builder.rb +88 -0
  20. data/lib/ups/connection.rb +124 -0
  21. data/lib/ups/data.rb +50 -0
  22. data/lib/ups/data/canadian_states.rb +21 -0
  23. data/lib/ups/data/ie_counties.rb +10 -0
  24. data/lib/ups/data/ie_county_prefixes.rb +15 -0
  25. data/lib/ups/data/us_states.rb +59 -0
  26. data/lib/ups/exceptions.rb +7 -0
  27. data/lib/ups/packaging.rb +27 -0
  28. data/lib/ups/parsers/parser_base.rb +48 -0
  29. data/lib/ups/parsers/rates_parser.rb +60 -0
  30. data/lib/ups/parsers/ship_accept_parser.rb +52 -0
  31. data/lib/ups/parsers/ship_confirm_parser.rb +16 -0
  32. data/lib/ups/services.rb +21 -0
  33. data/lib/ups/version.rb +10 -0
  34. data/spec/spec_helper.rb +18 -0
  35. data/spec/stubs/rates_negotiated_success.xml +227 -0
  36. data/spec/stubs/rates_success.xml +196 -0
  37. data/spec/stubs/ship_accept_failure.xml +12 -0
  38. data/spec/stubs/ship_accept_success.xml +56 -0
  39. data/spec/stubs/ship_confirm_failure.xml +12 -0
  40. data/spec/stubs/ship_confirm_success.xml +50 -0
  41. data/spec/support/RateRequest.xsd +1 -0
  42. data/spec/support/ShipAcceptRequest.xsd +36 -0
  43. data/spec/support/ShipConfirmRequest.xsd +996 -0
  44. data/spec/support/schema_path.rb +5 -0
  45. data/spec/support/shipping_options.rb +48 -0
  46. data/spec/support/xsd_validator.rb +11 -0
  47. data/spec/ups/builders/address_builder_spec.rb +97 -0
  48. data/spec/ups/builders/rate_builder_spec.rb +20 -0
  49. data/spec/ups/builders/ship_accept_builder_spec.rb +16 -0
  50. data/spec/ups/builders/ship_confirm_builder_spec.rb +23 -0
  51. data/spec/ups/connection/rates_negotiated_spec.rb +69 -0
  52. data/spec/ups/connection/rates_standard_spec.rb +71 -0
  53. data/spec/ups/connection/ship_spec.rb +111 -0
  54. data/spec/ups/connection_spec.rb +20 -0
  55. data/ups.gemspec +24 -0
  56. metadata +166 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 344f313c31a14969f3be97c8acfdf1236b978b9d
4
+ data.tar.gz: 6d15efa03cdd2ea2ae5773e263600f14ff6337dd
5
+ SHA512:
6
+ metadata.gz: da6f87c9d079c328c7cce485579e2547eabcb0ba4466a458c74a5367ba6c48f67e6f7e7a3048d7e7bdee3a8c7b76a6acf9a889b139c36edf06e01ae84750314e
7
+ data.tar.gz: 9243c6c80384225f0bd36ebb921e75e2a4b45c09db61dd4005c3932054a676c365cef11dc5f2f71f7f57d2f58f853a3196cff8e4f0b566abfa2a7dae835f12ef
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
19
+
20
+ *.komodoproject
21
+ test.rb
22
+ *.sublime-*
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
@@ -0,0 +1,1064 @@
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
+ - "spec/**/*"
20
+ - "vendor/**/*"
21
+ - "db/schema.rb"
22
+ RunRailsCops: false
23
+ DisplayCopNames: false
24
+ StyleGuideCopsOnly: false
25
+ Style/AccessModifierIndentation:
26
+ Description: Check indentation of private/protected visibility modifiers.
27
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
28
+ Enabled: true
29
+ EnforcedStyle: indent
30
+ SupportedStyles:
31
+ - outdent
32
+ - indent
33
+ Style/AlignHash:
34
+ Description: Align the elements of a hash literal if they span more than one line.
35
+ Enabled: true
36
+ EnforcedHashRocketStyle: key
37
+ EnforcedColonStyle: key
38
+ EnforcedLastArgumentHashStyle: always_inspect
39
+ SupportedLastArgumentHashStyles:
40
+ - always_inspect
41
+ - always_ignore
42
+ - ignore_implicit
43
+ - ignore_explicit
44
+ Style/AlignParameters:
45
+ Description: Align the parameters of a method call if they span more than one line.
46
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
47
+ Enabled: true
48
+ EnforcedStyle: with_first_parameter
49
+ SupportedStyles:
50
+ - with_first_parameter
51
+ - with_fixed_indentation
52
+ Style/AndOr:
53
+ Description: Use &&/|| instead of and/or.
54
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
55
+ Enabled: true
56
+ EnforcedStyle: always
57
+ SupportedStyles:
58
+ - always
59
+ - conditionals
60
+ Style/BarePercentLiterals:
61
+ Description: Checks if usage of %() or %Q() matches configuration.
62
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
63
+ Enabled: true
64
+ EnforcedStyle: bare_percent
65
+ SupportedStyles:
66
+ - percent_q
67
+ - bare_percent
68
+ Style/BracesAroundHashParameters:
69
+ Description: Enforce braces style around hash parameters.
70
+ Enabled: true
71
+ EnforcedStyle: no_braces
72
+ SupportedStyles:
73
+ - braces
74
+ - no_braces
75
+ - context_dependent
76
+ Style/CaseIndentation:
77
+ Description: Indentation of when in a case/when/[else/]end.
78
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
79
+ Enabled: true
80
+ IndentWhenRelativeTo: case
81
+ SupportedStyles:
82
+ - case
83
+ - end
84
+ IndentOneStep: false
85
+ Style/ClassAndModuleChildren:
86
+ Description: Checks style of children classes and modules.
87
+ Enabled: false
88
+ EnforcedStyle: nested
89
+ SupportedStyles:
90
+ - nested
91
+ - compact
92
+ Style/ClassCheck:
93
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
94
+ Enabled: true
95
+ EnforcedStyle: is_a?
96
+ SupportedStyles:
97
+ - is_a?
98
+ - kind_of?
99
+ Style/CollectionMethods:
100
+ Description: Preferred collection methods.
101
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
102
+ Enabled: true
103
+ PreferredMethods:
104
+ collect: map
105
+ collect!: map!
106
+ find: detect
107
+ find_all: select
108
+ reduce: inject
109
+ Style/CommentAnnotation:
110
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
111
+ REVIEW).
112
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
113
+ Enabled: false
114
+ Keywords:
115
+ - TODO
116
+ - FIXME
117
+ - OPTIMIZE
118
+ - HACK
119
+ - REVIEW
120
+ Style/DotPosition:
121
+ Description: Checks the position of the dot in multi-line method calls.
122
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
123
+ Enabled: true
124
+ EnforcedStyle: trailing
125
+ SupportedStyles:
126
+ - leading
127
+ - trailing
128
+ Style/EmptyLineBetweenDefs:
129
+ Description: Use empty lines between defs.
130
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
131
+ Enabled: true
132
+ AllowAdjacentOneLineDefs: false
133
+ Style/EmptyLinesAroundBlockBody:
134
+ Description: Keeps track of empty lines around block bodies.
135
+ Enabled: true
136
+ EnforcedStyle: no_empty_lines
137
+ SupportedStyles:
138
+ - empty_lines
139
+ - no_empty_lines
140
+ Style/EmptyLinesAroundClassBody:
141
+ Description: Keeps track of empty lines around class bodies.
142
+ Enabled: true
143
+ EnforcedStyle: no_empty_lines
144
+ SupportedStyles:
145
+ - empty_lines
146
+ - no_empty_lines
147
+ Style/EmptyLinesAroundModuleBody:
148
+ Description: Keeps track of empty lines around module bodies.
149
+ Enabled: true
150
+ EnforcedStyle: no_empty_lines
151
+ SupportedStyles:
152
+ - empty_lines
153
+ - no_empty_lines
154
+ Style/Encoding:
155
+ Description: Use UTF-8 as the source file encoding.
156
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
157
+ Enabled: false
158
+ EnforcedStyle: always
159
+ SupportedStyles:
160
+ - when_needed
161
+ - always
162
+ Style/FileName:
163
+ Description: Use snake_case for source file names.
164
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
165
+ Enabled: false
166
+ Exclude: []
167
+ Style/FirstParameterIndentation:
168
+ Description: Checks the indentation of the first parameter in a method call.
169
+ Enabled: true
170
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
171
+ SupportedStyles:
172
+ - consistent
173
+ - special_for_inner_method_call
174
+ - special_for_inner_method_call_in_parentheses
175
+ Style/For:
176
+ Description: Checks use of for or each in multiline loops.
177
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
178
+ Enabled: true
179
+ EnforcedStyle: each
180
+ SupportedStyles:
181
+ - for
182
+ - each
183
+ Style/FormatString:
184
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
185
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
186
+ Enabled: false
187
+ EnforcedStyle: format
188
+ SupportedStyles:
189
+ - format
190
+ - sprintf
191
+ - percent
192
+ Style/GlobalVars:
193
+ Description: Do not introduce global variables.
194
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
195
+ Enabled: false
196
+ AllowedVariables: []
197
+ Style/GuardClause:
198
+ Description: Check for conditionals that can be replaced with guard clauses
199
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
200
+ Enabled: false
201
+ MinBodyLength: 1
202
+ Style/HashSyntax:
203
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
204
+ 1, :b => 2 }.'
205
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
206
+ Enabled: true
207
+ EnforcedStyle: ruby19
208
+ SupportedStyles:
209
+ - ruby19
210
+ - hash_rockets
211
+ Style/IfUnlessModifier:
212
+ Description: Favor modifier if/unless usage when you have a single-line body.
213
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
214
+ Enabled: false
215
+ MaxLineLength: 80
216
+ Style/IndentationWidth:
217
+ Description: Use 2 spaces for indentation.
218
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
219
+ Enabled: true
220
+ Width: 2
221
+ Style/IndentHash:
222
+ Description: Checks the indentation of the first key in a hash literal.
223
+ Enabled: true
224
+ EnforcedStyle: special_inside_parentheses
225
+ SupportedStyles:
226
+ - special_inside_parentheses
227
+ - consistent
228
+ Style/LambdaCall:
229
+ Description: Use lambda.call(...) instead of lambda.(...).
230
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
231
+ Enabled: false
232
+ EnforcedStyle: call
233
+ SupportedStyles:
234
+ - call
235
+ - braces
236
+ Style/Next:
237
+ Description: Use `next` to skip iteration instead of a condition at the end.
238
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
239
+ Enabled: false
240
+ EnforcedStyle: skip_modifier_ifs
241
+ MinBodyLength: 3
242
+ SupportedStyles:
243
+ - skip_modifier_ifs
244
+ - always
245
+ Style/NonNilCheck:
246
+ Description: Checks for redundant nil checks.
247
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
248
+ Enabled: true
249
+ IncludeSemanticChanges: false
250
+ Style/MethodDefParentheses:
251
+ Description: Checks if the method definitions have or don't have parentheses.
252
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
253
+ Enabled: true
254
+ EnforcedStyle: require_parentheses
255
+ SupportedStyles:
256
+ - require_parentheses
257
+ - require_no_parentheses
258
+ Style/MethodName:
259
+ Description: Use the configured style when naming methods.
260
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
261
+ Enabled: true
262
+ EnforcedStyle: snake_case
263
+ SupportedStyles:
264
+ - snake_case
265
+ - camelCase
266
+ Style/MultilineOperationIndentation:
267
+ Description: Checks indentation of binary operations that span more than one line.
268
+ Enabled: true
269
+ EnforcedStyle: aligned
270
+ SupportedStyles:
271
+ - aligned
272
+ - indented
273
+ Style/NumericLiterals:
274
+ Description: Add underscores to large numeric literals to improve their readability.
275
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
276
+ Enabled: false
277
+ MinDigits: 5
278
+ Style/ParenthesesAroundCondition:
279
+ Description: Don't use parentheses around the condition of an if/unless/while.
280
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
281
+ Enabled: true
282
+ AllowSafeAssignment: true
283
+ Style/PercentLiteralDelimiters:
284
+ Description: Use `%`-literal delimiters consistently
285
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
286
+ Enabled: false
287
+ PreferredDelimiters:
288
+ "%": "()"
289
+ "%i": "()"
290
+ "%q": "()"
291
+ "%Q": "()"
292
+ "%r": "{}"
293
+ "%s": "()"
294
+ "%w": "()"
295
+ "%W": "()"
296
+ "%x": "()"
297
+ Style/PercentQLiterals:
298
+ Description: Checks if uses of %Q/%q match the configured preference.
299
+ Enabled: true
300
+ EnforcedStyle: lower_case_q
301
+ SupportedStyles:
302
+ - lower_case_q
303
+ - upper_case_q
304
+ Style/PredicateName:
305
+ Description: Check the names of predicate methods.
306
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
307
+ Enabled: true
308
+ NamePrefix:
309
+ - is_
310
+ - has_
311
+ - have_
312
+ NamePrefixBlacklist:
313
+ - is_
314
+ Style/RaiseArgs:
315
+ Description: Checks the arguments passed to raise/fail.
316
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
317
+ Enabled: false
318
+ EnforcedStyle: exploded
319
+ SupportedStyles:
320
+ - compact
321
+ - exploded
322
+ Style/RedundantReturn:
323
+ Description: Don't use return where it's not required.
324
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
325
+ Enabled: true
326
+ AllowMultipleReturnValues: false
327
+ Style/RegexpLiteral:
328
+ Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
329
+ characters. Use %r only for regular expressions matching more than `MaxSlashes`
330
+ '/' character.
331
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
332
+ Enabled: false
333
+ MaxSlashes: 1
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: single_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: false
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/Blocks:
648
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
649
+ ugly). Prefer {...} over do...end for single-line blocks.
650
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
651
+ Enabled: true
652
+ Style/CaseEquality:
653
+ Description: Avoid explicit use of the case equality operator(===).
654
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
655
+ Enabled: false
656
+ Style/CharacterLiteral:
657
+ Description: Checks for uses of character literals.
658
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
659
+ Enabled: false
660
+ Style/ClassAndModuleCamelCase:
661
+ Description: Use CamelCase for classes and modules.
662
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
663
+ Enabled: true
664
+ Style/ClassMethods:
665
+ Description: Use self when defining module/class methods.
666
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
667
+ Enabled: true
668
+ Style/ClassVars:
669
+ Description: Avoid the use of class variables.
670
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
671
+ Enabled: false
672
+ Style/ColonMethodCall:
673
+ Description: 'Do not use :: for method call.'
674
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
675
+ Enabled: false
676
+ Style/CommentIndentation:
677
+ Description: Indentation of comments.
678
+ Enabled: true
679
+ Style/ConstantName:
680
+ Description: Constants should use SCREAMING_SNAKE_CASE.
681
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
682
+ Enabled: true
683
+ Style/DefWithParentheses:
684
+ Description: Use def with parentheses when there are arguments.
685
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
686
+ Enabled: true
687
+ Style/DeprecatedHashMethods:
688
+ Description: Checks for use of deprecated Hash methods.
689
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
690
+ Enabled: false
691
+ Style/Documentation:
692
+ Description: Document classes and non-namespace modules.
693
+ Enabled: false
694
+ Style/DoubleNegation:
695
+ Description: Checks for uses of double negation (!!).
696
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
697
+ Enabled: false
698
+ Style/EachWithObject:
699
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
700
+ Enabled: false
701
+ Style/ElseAlignment:
702
+ Description: Align elses and elsifs correctly.
703
+ Enabled: true
704
+ Style/EmptyElse:
705
+ Description: Avoid empty else-clauses.
706
+ Enabled: true
707
+ Style/EmptyLines:
708
+ Description: Don't use several empty lines in a row.
709
+ Enabled: true
710
+ Style/EmptyLinesAroundAccessModifier:
711
+ Description: Keep blank lines around access modifiers.
712
+ Enabled: true
713
+ Style/EmptyLinesAroundMethodBody:
714
+ Description: Keeps track of empty lines around method bodies.
715
+ Enabled: true
716
+ Style/EmptyLiteral:
717
+ Description: Prefer literals to Array.new/Hash.new/String.new.
718
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
719
+ Enabled: false
720
+ Style/EndBlock:
721
+ Description: Avoid the use of END blocks.
722
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
723
+ Enabled: true
724
+ Style/EndOfLine:
725
+ Description: Use Unix-style line endings.
726
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
727
+ Enabled: true
728
+ Style/EvenOdd:
729
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
730
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
731
+ Enabled: false
732
+ Style/FlipFlop:
733
+ Description: Checks for flip flops
734
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
735
+ Enabled: false
736
+ Style/IfWithSemicolon:
737
+ Description: Do not use if x; .... Use the ternary operator instead.
738
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
739
+ Enabled: false
740
+ Style/IndentationConsistency:
741
+ Description: Keep indentation straight.
742
+ Enabled: true
743
+ Style/IndentArray:
744
+ Description: Checks the indentation of the first element in an array literal.
745
+ Enabled: true
746
+ Style/InfiniteLoop:
747
+ Description: Use Kernel#loop for infinite loops.
748
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
749
+ Enabled: true
750
+ Style/Lambda:
751
+ Description: Use the new lambda literal syntax for single-line blocks.
752
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
753
+ Enabled: false
754
+ Style/LeadingCommentSpace:
755
+ Description: Comments should start with a space.
756
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
757
+ Enabled: true
758
+ Style/LineEndConcatenation:
759
+ Description: Use \ instead of + or << to concatenate two string literals at line
760
+ end.
761
+ Enabled: false
762
+ Style/MethodCallParentheses:
763
+ Description: Do not use parentheses for method calls with no arguments.
764
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
765
+ Enabled: true
766
+ Style/ModuleFunction:
767
+ Description: Checks for usage of `extend self` in modules.
768
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
769
+ Enabled: false
770
+ Style/MultilineBlockChain:
771
+ Description: Avoid multi-line chains of blocks.
772
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
773
+ Enabled: true
774
+ Style/MultilineBlockLayout:
775
+ Description: Ensures newlines after multiline block do statements.
776
+ Enabled: true
777
+ Style/MultilineIfThen:
778
+ Description: Do not use then for multi-line if/unless.
779
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
780
+ Enabled: true
781
+ Style/MultilineTernaryOperator:
782
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
783
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
784
+ Enabled: true
785
+ Style/NegatedIf:
786
+ Description: Favor unless over if for negative conditions (or control flow or).
787
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
788
+ Enabled: false
789
+ Style/NegatedWhile:
790
+ Description: Favor until over while for negative conditions.
791
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
792
+ Enabled: false
793
+ Style/NestedTernaryOperator:
794
+ Description: Use one expression per branch in a ternary operator.
795
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
796
+ Enabled: true
797
+ Style/NilComparison:
798
+ Description: Prefer x.nil? to x == nil.
799
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
800
+ Enabled: false
801
+ Style/Not:
802
+ Description: Use ! instead of not.
803
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
804
+ Enabled: false
805
+ Style/OneLineConditional:
806
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
807
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
808
+ Enabled: false
809
+ Style/OpMethod:
810
+ Description: When defining binary operators, name the argument other.
811
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
812
+ Enabled: false
813
+ Style/PerlBackrefs:
814
+ Description: Avoid Perl-style regex back references.
815
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
816
+ Enabled: false
817
+ Style/Proc:
818
+ Description: Use proc instead of Proc.new.
819
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
820
+ Enabled: false
821
+ Style/RedundantBegin:
822
+ Description: Don't use begin blocks when they are not needed.
823
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
824
+ Enabled: true
825
+ Style/RedundantException:
826
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
827
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
828
+ Enabled: true
829
+ Style/RedundantSelf:
830
+ Description: Don't use self where it's not needed.
831
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
832
+ Enabled: true
833
+ Style/RescueModifier:
834
+ Description: Avoid using rescue in its modifier form.
835
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
836
+ Enabled: true
837
+ Style/SelfAssignment:
838
+ Description: Checks for places where self-assignment shorthand should have been
839
+ used.
840
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
841
+ Enabled: false
842
+ Style/SingleSpaceBeforeFirstArg:
843
+ Description: Checks that exactly one space is used between a method name and the
844
+ first argument for method calls without parentheses.
845
+ Enabled: true
846
+ Style/SpaceAfterColon:
847
+ Description: Use spaces after colons.
848
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
849
+ Enabled: true
850
+ Style/SpaceAfterComma:
851
+ Description: Use spaces after commas.
852
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
853
+ Enabled: true
854
+ Style/SpaceAfterControlKeyword:
855
+ Description: Use spaces after if/elsif/unless/while/until/case/when.
856
+ Enabled: true
857
+ Style/SpaceAfterMethodName:
858
+ Description: Do not put a space between a method name and the opening parenthesis
859
+ in a method definition.
860
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
861
+ Enabled: true
862
+ Style/SpaceAfterNot:
863
+ Description: Tracks redundant space after the ! operator.
864
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
865
+ Enabled: true
866
+ Style/SpaceAfterSemicolon:
867
+ Description: Use spaces after semicolons.
868
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
869
+ Enabled: true
870
+ Style/SpaceBeforeComma:
871
+ Description: No spaces before commas.
872
+ Enabled: true
873
+ Style/SpaceBeforeComment:
874
+ Description: Checks for missing space between code and a comment on the same line.
875
+ Enabled: true
876
+ Style/SpaceBeforeSemicolon:
877
+ Description: No spaces before semicolons.
878
+ Enabled: true
879
+ Style/SpaceAroundOperators:
880
+ Description: Use spaces around operators.
881
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
882
+ Enabled: true
883
+ Style/SpaceBeforeModifierKeyword:
884
+ Description: Put a space before the modifier keyword.
885
+ Enabled: true
886
+ Style/SpaceInsideBrackets:
887
+ Description: No spaces after [ or before ].
888
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
889
+ Enabled: true
890
+ Style/SpaceInsideParens:
891
+ Description: No spaces after ( or before ).
892
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
893
+ Enabled: true
894
+ Style/SpaceInsideRangeLiteral:
895
+ Description: No spaces inside range literals.
896
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
897
+ Enabled: true
898
+ Style/SpecialGlobalVars:
899
+ Description: Avoid Perl-style global variables.
900
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
901
+ Enabled: false
902
+ Style/StructInheritance:
903
+ Description: Checks for inheritance from Struct.new.
904
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
905
+ Enabled: true
906
+ Style/Tab:
907
+ Description: No hard tabs.
908
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
909
+ Enabled: true
910
+ Style/TrailingWhitespace:
911
+ Description: Avoid trailing whitespace.
912
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
913
+ Enabled: true
914
+ Style/UnlessElse:
915
+ Description: Do not use unless with else. Rewrite these with the positive case first.
916
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
917
+ Enabled: true
918
+ Style/UnneededCapitalW:
919
+ Description: Checks for %W when interpolation is not needed.
920
+ Enabled: true
921
+ Style/UnneededPercentQ:
922
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
923
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
924
+ Enabled: true
925
+ Style/UnneededPercentX:
926
+ Description: Checks for %x when `` would do.
927
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
928
+ Enabled: true
929
+ Style/VariableInterpolation:
930
+ Description: Don't interpolate global, instance and class variables directly in
931
+ strings.
932
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
933
+ Enabled: false
934
+ Style/WhenThen:
935
+ Description: Use when x then ... for one-line cases.
936
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
937
+ Enabled: false
938
+ Style/WhileUntilDo:
939
+ Description: Checks for redundant do after while or until.
940
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
941
+ Enabled: true
942
+ Lint/AmbiguousOperator:
943
+ Description: Checks for ambiguous operators in the first argument of a method invocation
944
+ without parentheses.
945
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
946
+ Enabled: false
947
+ Lint/AmbiguousRegexpLiteral:
948
+ Description: Checks for ambiguous regexp literals in the first argument of a method
949
+ invocation without parenthesis.
950
+ Enabled: false
951
+ Lint/BlockAlignment:
952
+ Description: Align block ends correctly.
953
+ Enabled: true
954
+ Lint/ConditionPosition:
955
+ Description: Checks for condition placed in a confusing position relative to the
956
+ keyword.
957
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
958
+ Enabled: false
959
+ Lint/Debugger:
960
+ Description: Check for debugger calls.
961
+ Enabled: true
962
+ Lint/DeprecatedClassMethods:
963
+ Description: Check for deprecated class method calls.
964
+ Enabled: false
965
+ Lint/DuplicateMethods:
966
+ Description: Check for duplicate methods calls.
967
+ Enabled: true
968
+ Lint/ElseLayout:
969
+ Description: Check for odd code arrangement in an else block.
970
+ Enabled: false
971
+ Lint/EmptyEnsure:
972
+ Description: Checks for empty ensure block.
973
+ Enabled: true
974
+ Lint/EmptyInterpolation:
975
+ Description: Checks for empty string interpolation.
976
+ Enabled: true
977
+ Lint/EndInMethod:
978
+ Description: END blocks should not be placed inside method definitions.
979
+ Enabled: true
980
+ Lint/EnsureReturn:
981
+ Description: Do not use return in an ensure block.
982
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
983
+ Enabled: true
984
+ Lint/Eval:
985
+ Description: The use of eval represents a serious security risk.
986
+ Enabled: true
987
+ Lint/HandleExceptions:
988
+ Description: Don't suppress exception.
989
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
990
+ Enabled: false
991
+ Lint/InvalidCharacterLiteral:
992
+ Description: Checks for invalid character literals with a non-escaped whitespace
993
+ character.
994
+ Enabled: false
995
+ Lint/LiteralInCondition:
996
+ Description: Checks of literals used in conditions.
997
+ Enabled: false
998
+ Lint/LiteralInInterpolation:
999
+ Description: Checks for literals used in interpolation.
1000
+ Enabled: false
1001
+ Lint/Loop:
1002
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1003
+ for post-loop tests.
1004
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
1005
+ Enabled: false
1006
+ Lint/ParenthesesAsGroupedExpression:
1007
+ Description: Checks for method calls with a space before the opening parenthesis.
1008
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
1009
+ Enabled: false
1010
+ Lint/RequireParentheses:
1011
+ Description: Use parentheses in the method call to avoid confusion about precedence.
1012
+ Enabled: false
1013
+ Lint/RescueException:
1014
+ Description: Avoid rescuing the Exception class.
1015
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
1016
+ Enabled: true
1017
+ Lint/ShadowingOuterLocalVariable:
1018
+ Description: Do not use the same name as outer local variable for block arguments
1019
+ or block local variables.
1020
+ Enabled: true
1021
+ Lint/SpaceBeforeFirstArg:
1022
+ Description: Put a space between a method name and the first argument in a method
1023
+ call without parentheses.
1024
+ Enabled: true
1025
+ Lint/StringConversionInInterpolation:
1026
+ Description: Checks for Object#to_s usage in string interpolation.
1027
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
1028
+ Enabled: true
1029
+ Lint/UnderscorePrefixedVariableName:
1030
+ Description: Do not use prefix `_` for a variable that is used.
1031
+ Enabled: false
1032
+ Lint/UnusedBlockArgument:
1033
+ Description: Checks for unused block arguments.
1034
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1035
+ Enabled: true
1036
+ Lint/UnusedMethodArgument:
1037
+ Description: Checks for unused method arguments.
1038
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1039
+ Enabled: true
1040
+ Lint/UnreachableCode:
1041
+ Description: Unreachable code.
1042
+ Enabled: true
1043
+ Lint/UselessAccessModifier:
1044
+ Description: Checks for useless access modifiers.
1045
+ Enabled: true
1046
+ Lint/UselessAssignment:
1047
+ Description: Checks for useless assignment to a local variable.
1048
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1049
+ Enabled: true
1050
+ Lint/UselessComparison:
1051
+ Description: Checks for comparison of something with itself.
1052
+ Enabled: true
1053
+ Lint/UselessElseWithoutRescue:
1054
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1055
+ Enabled: true
1056
+ Lint/UselessSetterCall:
1057
+ Description: Checks for useless setter call to a local variable.
1058
+ Enabled: true
1059
+ Lint/Void:
1060
+ Description: Possible use of operator/literal/variable in void context.
1061
+ Enabled: false
1062
+ Rails/Delegate:
1063
+ Description: Prefer delegate method for delegations.
1064
+ Enabled: false