fortnox-api 0.0.2 → 0.1.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 (97) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +18 -0
  3. data/.gitignore +6 -1
  4. data/.rubocop.yml +1107 -0
  5. data/.travis.yml +9 -3
  6. data/CONTRIBUTE.md +26 -0
  7. data/Gemfile +0 -0
  8. data/Guardfile +2 -2
  9. data/LICENSE.txt +0 -0
  10. data/README.md +109 -88
  11. data/Rakefile +0 -0
  12. data/docs/account.rb +59 -0
  13. data/docs/extraction_script.js +23 -0
  14. data/docs/generation_script.rb +43 -0
  15. data/docs/json/account.json +77 -0
  16. data/fortnox-api.gemspec +4 -1
  17. data/lib/fortnox/api.rb +14 -3
  18. data/lib/fortnox/api/base.rb +25 -36
  19. data/lib/fortnox/api/class_methods.rb +13 -45
  20. data/lib/fortnox/api/environment_validation.rb +33 -0
  21. data/lib/fortnox/api/models.rb +1 -0
  22. data/lib/fortnox/api/models/attributes/country_code.rb +17 -0
  23. data/lib/fortnox/api/models/attributes/currency.rb +17 -0
  24. data/lib/fortnox/api/models/base.rb +67 -0
  25. data/lib/fortnox/api/{customer/entity.rb → models/customer.rb} +31 -12
  26. data/lib/fortnox/api/models/edi_information.rb +28 -0
  27. data/lib/fortnox/api/models/email_information.rb +25 -0
  28. data/lib/fortnox/api/models/invoice.rb +253 -0
  29. data/lib/fortnox/api/models/row.rb +82 -0
  30. data/lib/fortnox/api/repositories.rb +1 -0
  31. data/lib/fortnox/api/repositories/base.rb +34 -0
  32. data/lib/fortnox/api/{repository → repositories/base}/json_convertion.rb +18 -5
  33. data/lib/fortnox/api/{repository → repositories/base}/loaders.rb +16 -8
  34. data/lib/fortnox/api/repositories/base/options.rb +33 -0
  35. data/lib/fortnox/api/repositories/base/savers.rb +39 -0
  36. data/lib/fortnox/api/repositories/customer.rb +38 -0
  37. data/lib/fortnox/api/repositories/invoice.rb +35 -0
  38. data/lib/fortnox/api/request_handling.rb +35 -0
  39. data/lib/fortnox/api/validators.rb +1 -0
  40. data/lib/fortnox/api/validators/attributes/country_code.rb +42 -0
  41. data/lib/fortnox/api/validators/attributes/currency.rb +38 -0
  42. data/lib/fortnox/api/validators/base.rb +70 -0
  43. data/lib/fortnox/api/validators/constant.rb +21 -0
  44. data/lib/fortnox/api/validators/customer.rb +29 -0
  45. data/lib/fortnox/api/validators/edi_information.rb +11 -0
  46. data/lib/fortnox/api/validators/email_information.rb +19 -0
  47. data/lib/fortnox/api/validators/invoice.rb +33 -0
  48. data/lib/fortnox/api/validators/row.rb +22 -0
  49. data/lib/fortnox/api/version.rb +1 -1
  50. data/spec/fortnox/api/base_spec.rb +65 -62
  51. data/spec/fortnox/api/models/attributes/country_code_spec.rb +23 -0
  52. data/spec/fortnox/api/models/attributes/currency_spec.rb +23 -0
  53. data/spec/fortnox/api/models/attributes/dummy_model_context.rb +9 -0
  54. data/spec/fortnox/api/models/base_spec.rb +76 -0
  55. data/spec/fortnox/api/models/invoice_spec.rb +36 -0
  56. data/spec/fortnox/api/models/row_spec.rb +13 -0
  57. data/spec/fortnox/api/repositories/context.rb +10 -0
  58. data/spec/fortnox/api/repositories/customer_spec.rb +85 -0
  59. data/spec/fortnox/api/repositories/examples.rb +16 -0
  60. data/spec/fortnox/api/repositories/invoice_spec.rb +10 -0
  61. data/spec/fortnox/api/validators/attributes/country_code_spec.rb +9 -0
  62. data/spec/fortnox/api/validators/attributes/currency_spec.rb +9 -0
  63. data/spec/fortnox/api/validators/attributes/examples_for_validate.rb +29 -0
  64. data/spec/fortnox/api/validators/base_spec.rb +61 -0
  65. data/spec/fortnox/api/validators/constant_spec.rb +12 -0
  66. data/spec/fortnox/api/validators/context.rb +102 -0
  67. data/spec/fortnox/api/validators/customer_spec.rb +31 -0
  68. data/spec/fortnox/api/validators/edi_information_spec.rb +18 -0
  69. data/spec/fortnox/api/validators/email_information_spec.rb +26 -0
  70. data/spec/fortnox/api/validators/invoice_spec.rb +36 -0
  71. data/spec/fortnox/api/validators/row_spec.rb +27 -0
  72. data/spec/fortnox/api/validators/validator_examples.rb +20 -0
  73. data/spec/fortnox/api_spec.rb +36 -0
  74. data/spec/spec_helper.rb +16 -4
  75. data/spec/support/helpers.rb +1 -0
  76. data/spec/support/helpers/dummy_class_helper.rb +20 -0
  77. data/spec/support/matchers.rb +1 -0
  78. data/spec/support/matchers/models.rb +27 -0
  79. data/spec/support/matchers/validators.rb +36 -0
  80. data/spec/support/vcr_setup.rb +6 -0
  81. data/spec/vcr_cassettes/customers/all.yml +47 -0
  82. data/spec/vcr_cassettes/customers/find_id_1.yml +47 -0
  83. data/spec/vcr_cassettes/customers/save_new.yml +47 -0
  84. data/spec/vcr_cassettes/customers/save_old.yml +49 -0
  85. metadata +133 -21
  86. data/.ruby-version +0 -1
  87. data/Gemfile.lock +0 -127
  88. data/lib/fortnox/api/customer.rb +0 -15
  89. data/lib/fortnox/api/customer/repository.rb +0 -28
  90. data/lib/fortnox/api/customer/validator.rb +0 -26
  91. data/lib/fortnox/api/entity.rb +0 -45
  92. data/lib/fortnox/api/repository/base.rb +0 -27
  93. data/lib/fortnox/api/repository/savers.rb +0 -15
  94. data/lib/fortnox/api/validator.rb +0 -32
  95. data/spec/fortnox/api/customer/repository_spec.rb +0 -0
  96. data/spec/fortnox/api/customer/validator_spec.rb +0 -32
  97. data/spec/fortnox/api/entity_spec.rb +0 -62
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bca3361bd95f700ce751571429bc8463554b7d7
4
- data.tar.gz: be033a769fa8d6bf4ca66ec4891b7d244826706c
3
+ metadata.gz: 2175c26f47ccdd6029a7ad260ff48cb20395a3a6
4
+ data.tar.gz: e4e633ccc4929fc3b01fe5463b66af214faf409a
5
5
  SHA512:
6
- metadata.gz: eb4e66f6bf2cf68ac7c2221f44a5e2e3b1e2fe82e6506ff5d409d24f37b347dca2c757dc53cbc861d673cb38cb14c213d383805e007062c4feacde911d16ce90
7
- data.tar.gz: 53978bd089c4023f1cbaccd21b643663bb014217f98c4dfa850df792b85a4dd12e893f33f2371662b52c228a0ae8e05fb9b3588bdfd4858e60511f72bc331b60
6
+ metadata.gz: 27a792d04089f3a867606d9942aa7c86a4dc97393938333fd60061c649b056fd9151202f63d7ef685c7ed8498c657cf85ab58c57832e5ca4a518bebb42d447f5
7
+ data.tar.gz: 7129511b97cf1bb8411cc85c2419553a18b761a6bc121fc3719334f0c2db3d37408666139b63c5d1e4cfc38cf2520e5fdb85f6544e41dbe5f7440088781d2b73
data/.codeclimate.yml ADDED
@@ -0,0 +1,18 @@
1
+ ---
2
+ engines:
3
+ duplication:
4
+ enabled: true
5
+ config:
6
+ languages:
7
+ - ruby
8
+ eslint:
9
+ enabled: true
10
+ fixme:
11
+ enabled: false
12
+ rubocop:
13
+ enabled: true
14
+ ratings:
15
+ paths:
16
+ - "**.rb"
17
+ exclude_paths:
18
+ - ".*"
data/.gitignore CHANGED
@@ -1,3 +1,8 @@
1
1
  .DS_Store
2
2
  .env
3
- .rspec
3
+ .rspec
4
+ *.gem
5
+ Gemfile.lock
6
+
7
+ # Vim swap files
8
+ *.swp
data/.rubocop.yml ADDED
@@ -0,0 +1,1107 @@
1
+ AllCops:
2
+ DisabledByDefault: true
3
+ TargetRubyVersion: 2.1
4
+
5
+ #################### Lint ################################
6
+
7
+ Lint/AmbiguousOperator:
8
+ Description: >-
9
+ Checks for ambiguous operators in the first argument of a
10
+ method invocation without parentheses.
11
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
12
+ Enabled: true
13
+
14
+ Lint/AmbiguousRegexpLiteral:
15
+ Description: >-
16
+ Checks for ambiguous regexp literals in the first argument of
17
+ a method invocation without parenthesis.
18
+ Enabled: true
19
+
20
+ Lint/AssignmentInCondition:
21
+ Description: "Don't use assignment in conditions."
22
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
23
+ Enabled: true
24
+
25
+ Lint/BlockAlignment:
26
+ Description: 'Align block ends correctly.'
27
+ Enabled: true
28
+
29
+ Lint/CircularArgumentReference:
30
+ Description: "Don't refer to the keyword argument in the default value."
31
+ Enabled: true
32
+
33
+ Lint/ConditionPosition:
34
+ Description: >-
35
+ Checks for condition placed in a confusing position relative to
36
+ the keyword.
37
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
38
+ Enabled: true
39
+
40
+ Lint/Debugger:
41
+ Description: 'Check for debugger calls.'
42
+ Enabled: true
43
+
44
+ Lint/DefEndAlignment:
45
+ Description: 'Align ends corresponding to defs correctly.'
46
+ Enabled: true
47
+
48
+ Lint/DeprecatedClassMethods:
49
+ Description: 'Check for deprecated class method calls.'
50
+ Enabled: true
51
+
52
+ Lint/DuplicateMethods:
53
+ Description: 'Check for duplicate methods calls.'
54
+ Enabled: true
55
+
56
+ Lint/EachWithObjectArgument:
57
+ Description: 'Check for immutable argument given to each_with_object.'
58
+ Enabled: true
59
+
60
+ Lint/ElseLayout:
61
+ Description: 'Check for odd code arrangement in an else block.'
62
+ Enabled: true
63
+
64
+ Lint/EmptyEnsure:
65
+ Description: 'Checks for empty ensure block.'
66
+ Enabled: true
67
+
68
+ Lint/EmptyInterpolation:
69
+ Description: 'Checks for empty string interpolation.'
70
+ Enabled: true
71
+
72
+ Lint/EndAlignment:
73
+ Description: 'Align ends correctly.'
74
+ Enabled: true
75
+
76
+ Lint/EndInMethod:
77
+ Description: 'END blocks should not be placed inside method definitions.'
78
+ Enabled: true
79
+
80
+ Lint/EnsureReturn:
81
+ Description: 'Do not use return in an ensure block.'
82
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
83
+ Enabled: true
84
+
85
+ Lint/Eval:
86
+ Description: 'The use of eval represents a serious security risk.'
87
+ Enabled: true
88
+
89
+ Lint/FormatParameterMismatch:
90
+ Description: 'The number of parameters to format/sprint must match the fields.'
91
+ Enabled: true
92
+
93
+ Lint/HandleExceptions:
94
+ Description: "Don't suppress exception."
95
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
96
+ Enabled: true
97
+
98
+ Lint/InvalidCharacterLiteral:
99
+ Description: >-
100
+ Checks for invalid character literals with a non-escaped
101
+ whitespace character.
102
+ Enabled: true
103
+
104
+ Lint/LiteralInCondition:
105
+ Description: 'Checks of literals used in conditions.'
106
+ Enabled: true
107
+
108
+ Lint/LiteralInInterpolation:
109
+ Description: 'Checks for literals used in interpolation.'
110
+ Enabled: true
111
+
112
+ Lint/Loop:
113
+ Description: >-
114
+ Use Kernel#loop with break rather than begin/end/until or
115
+ begin/end/while for post-loop tests.
116
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
117
+ Enabled: true
118
+
119
+ Lint/NestedMethodDefinition:
120
+ Description: 'Do not use nested method definitions.'
121
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
122
+ Enabled: true
123
+
124
+ Lint/NonLocalExitFromIterator:
125
+ Description: 'Do not use return in iterator to cause non-local exit.'
126
+ Enabled: true
127
+
128
+ Lint/ParenthesesAsGroupedExpression:
129
+ Description: >-
130
+ Checks for method calls with a space before the opening
131
+ parenthesis.
132
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
133
+ Enabled: true
134
+
135
+ Lint/RequireParentheses:
136
+ Description: >-
137
+ Use parentheses in the method call to avoid confusion
138
+ about precedence.
139
+ Enabled: true
140
+
141
+ Lint/RescueException:
142
+ Description: 'Avoid rescuing the Exception class.'
143
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
144
+ Enabled: true
145
+
146
+ Lint/ShadowingOuterLocalVariable:
147
+ Description: >-
148
+ Do not use the same name as outer local variable
149
+ for block arguments or block local variables.
150
+ Enabled: true
151
+
152
+ Lint/StringConversionInInterpolation:
153
+ Description: 'Checks for Object#to_s usage in string interpolation.'
154
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
155
+ Enabled: true
156
+
157
+ Lint/UnderscorePrefixedVariableName:
158
+ Description: 'Do not use prefix `_` for a variable that is used.'
159
+ Enabled: true
160
+
161
+ Lint/UnneededDisable:
162
+ Description: >-
163
+ Checks for rubocop:disable comments that can be removed.
164
+ Note: this cop is not disabled when disabling all cops.
165
+ It must be explicitly disabled.
166
+ Enabled: true
167
+
168
+ Lint/UnusedBlockArgument:
169
+ Description: 'Checks for unused block arguments.'
170
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
171
+ Enabled: true
172
+
173
+ Lint/UnusedMethodArgument:
174
+ Description: 'Checks for unused method arguments.'
175
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
176
+ Enabled: true
177
+
178
+ Lint/UnreachableCode:
179
+ Description: 'Unreachable code.'
180
+ Enabled: true
181
+
182
+ Lint/UselessAccessModifier:
183
+ Description: 'Checks for useless access modifiers.'
184
+ Enabled: true
185
+
186
+ Lint/UselessAssignment:
187
+ Description: 'Checks for useless assignment to a local variable.'
188
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
189
+ Enabled: true
190
+
191
+ Lint/UselessComparison:
192
+ Description: 'Checks for comparison of something with itself.'
193
+ Enabled: true
194
+
195
+ Lint/UselessElseWithoutRescue:
196
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
197
+ Enabled: true
198
+
199
+ Lint/UselessSetterCall:
200
+ Description: 'Checks for useless setter call to a local variable.'
201
+ Enabled: true
202
+
203
+ Lint/Void:
204
+ Description: 'Possible use of operator/literal/variable in void context.'
205
+ Enabled: true
206
+
207
+ ###################### Metrics ####################################
208
+
209
+ Metrics/AbcSize:
210
+ Description: >-
211
+ A calculated magnitude based on number of assignments,
212
+ branches, and conditions.
213
+ Reference: 'http://c2.com/cgi/wiki?AbcMetric'
214
+ Enabled: false
215
+ Max: 20
216
+
217
+ Metrics/BlockNesting:
218
+ Description: 'Avoid excessive block nesting'
219
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
220
+ Enabled: true
221
+ Max: 4
222
+
223
+ Metrics/ClassLength:
224
+ Description: 'Avoid classes longer than 250 lines of code.'
225
+ Enabled: true
226
+ Max: 250
227
+
228
+ Metrics/CyclomaticComplexity:
229
+ Description: >-
230
+ A complexity metric that is strongly correlated to the number
231
+ of test cases needed to validate a method.
232
+ Enabled: true
233
+
234
+ Metrics/LineLength:
235
+ Description: 'Limit lines to 80 characters.'
236
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
237
+ Enabled: false
238
+
239
+ Metrics/MethodLength:
240
+ Description: 'Avoid methods longer than 30 lines of code.'
241
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
242
+ Enabled: true
243
+ Max: 30
244
+
245
+ Metrics/ModuleLength:
246
+ Description: 'Avoid modules longer than 250 lines of code.'
247
+ Enabled: true
248
+ Max: 250
249
+
250
+ Metrics/ParameterLists:
251
+ Description: 'Avoid parameter lists longer than three or four parameters.'
252
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
253
+ Enabled: true
254
+
255
+ Metrics/PerceivedComplexity:
256
+ Description: >-
257
+ A complexity metric geared towards measuring complexity for a
258
+ human reader.
259
+ Enabled: false
260
+
261
+ ##################### Performance #############################
262
+
263
+ Performance/Count:
264
+ Description: >-
265
+ Use `count` instead of `select...size`, `reject...size`,
266
+ `select...count`, `reject...count`, `select...length`,
267
+ and `reject...length`.
268
+ Enabled: true
269
+
270
+ Performance/Detect:
271
+ Description: >-
272
+ Use `detect` instead of `select.first`, `find_all.first`,
273
+ `select.last`, and `find_all.last`.
274
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
275
+ Enabled: true
276
+
277
+ Performance/FlatMap:
278
+ Description: >-
279
+ Use `Enumerable#flat_map`
280
+ instead of `Enumerable#map...Array#flatten(1)`
281
+ or `Enumberable#collect..Array#flatten(1)`
282
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
283
+ Enabled: true
284
+ EnabledForFlattenWithoutParams: false
285
+ # If enabled, this cop will warn about usages of
286
+ # `flatten` being called without any parameters.
287
+ # This can be dangerous since `flat_map` will only flatten 1 level, and
288
+ # `flatten` without any parameters can flatten multiple levels.
289
+
290
+ Performance/ReverseEach:
291
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
292
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
293
+ Enabled: true
294
+
295
+ Performance/Sample:
296
+ Description: >-
297
+ Use `sample` instead of `shuffle.first`,
298
+ `shuffle.last`, and `shuffle[Fixnum]`.
299
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
300
+ Enabled: true
301
+
302
+ Performance/Size:
303
+ Description: >-
304
+ Use `size` instead of `count` for counting
305
+ the number of elements in `Array` and `Hash`.
306
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
307
+ Enabled: true
308
+
309
+ Performance/StringReplacement:
310
+ Description: >-
311
+ Use `tr` instead of `gsub` when you are replacing the same
312
+ number of characters. Use `delete` instead of `gsub` when
313
+ you are deleting characters.
314
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
315
+ Enabled: true
316
+
317
+ ################## Style #################################
318
+
319
+ Style/SpaceBeforeFirstArg:
320
+ Description: >-
321
+ Put a space between a method name and the first argument
322
+ in a method call without parentheses.
323
+ Enabled: true
324
+
325
+ Style/AccessModifierIndentation:
326
+ Description: Check indentation of private/protected visibility modifiers.
327
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
328
+ Enabled: false
329
+
330
+ Style/AccessorMethodName:
331
+ Description: Check the naming of accessor methods for get_/set_.
332
+ Enabled: false
333
+
334
+ Style/Alias:
335
+ Description: 'Use alias_method instead of alias.'
336
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
337
+ Enabled: false
338
+
339
+ Style/AlignArray:
340
+ Description: >-
341
+ Align the elements of an array literal if they span more than
342
+ one line.
343
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
344
+ Enabled: false
345
+
346
+ Style/AlignHash:
347
+ Description: >-
348
+ Align the elements of a hash literal if they span more than
349
+ one line.
350
+ Enabled: false
351
+
352
+ Style/AlignParameters:
353
+ Description: >-
354
+ Align the parameters of a method call if they span more
355
+ than one line.
356
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
357
+ Enabled: false
358
+
359
+ Style/AndOr:
360
+ Description: 'Use &&/|| instead of and/or.'
361
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
362
+ Enabled: false
363
+
364
+ Style/ArrayJoin:
365
+ Description: 'Use Array#join instead of Array#*.'
366
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
367
+ Enabled: false
368
+
369
+ Style/AsciiComments:
370
+ Description: 'Use only ascii symbols in comments.'
371
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
372
+ Enabled: false
373
+
374
+ Style/AsciiIdentifiers:
375
+ Description: 'Use only ascii symbols in identifiers.'
376
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
377
+ Enabled: false
378
+
379
+ Style/Attr:
380
+ Description: 'Checks for uses of Module#attr.'
381
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
382
+ Enabled: false
383
+
384
+ Style/BeginBlock:
385
+ Description: 'Avoid the use of BEGIN blocks.'
386
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
387
+ Enabled: false
388
+
389
+ Style/BarePercentLiterals:
390
+ Description: 'Checks if usage of %() or %Q() matches configuration.'
391
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
392
+ Enabled: false
393
+
394
+ Style/BlockComments:
395
+ Description: 'Do not use block comments.'
396
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
397
+ Enabled: false
398
+
399
+ Style/BlockEndNewline:
400
+ Description: 'Put end statement of multiline block on its own line.'
401
+ Enabled: false
402
+
403
+ Style/BlockDelimiters:
404
+ Description: >-
405
+ Avoid using {...} for multi-line blocks (multiline chaining is
406
+ always ugly).
407
+ Prefer {...} over do...end for single-line blocks.
408
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
409
+ Enabled: false
410
+
411
+ Style/BracesAroundHashParameters:
412
+ Description: 'Enforce braces style around hash parameters.'
413
+ Enabled: false
414
+
415
+ Style/CaseEquality:
416
+ Description: 'Avoid explicit use of the case equality operator(===).'
417
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
418
+ Enabled: false
419
+
420
+ Style/CaseIndentation:
421
+ Description: 'Indentation of when in a case/when/[else/]end.'
422
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
423
+ Enabled: false
424
+
425
+ Style/CharacterLiteral:
426
+ Description: 'Checks for uses of character literals.'
427
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
428
+ Enabled: false
429
+
430
+ Style/ClassAndModuleCamelCase:
431
+ Description: 'Use CamelCase for classes and modules.'
432
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
433
+ Enabled: false
434
+
435
+ Style/ClassAndModuleChildren:
436
+ Description: 'Checks style of children classes and modules.'
437
+ Enabled: false
438
+
439
+ Style/ClassCheck:
440
+ Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
441
+ Enabled: false
442
+
443
+ Style/ClassMethods:
444
+ Description: 'Use self when defining module/class methods.'
445
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
446
+ Enabled: false
447
+
448
+ Style/ClassVars:
449
+ Description: 'Avoid the use of class variables.'
450
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
451
+ Enabled: false
452
+
453
+ Style/ClosingParenthesisIndentation:
454
+ Description: 'Checks the indentation of hanging closing parentheses.'
455
+ Enabled: false
456
+
457
+ Style/ColonMethodCall:
458
+ Description: 'Do not use :: for method call.'
459
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
460
+ Enabled: false
461
+
462
+ Style/CommandLiteral:
463
+ Description: 'Use `` or %x around command literals.'
464
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
465
+ Enabled: false
466
+
467
+ Style/CommentAnnotation:
468
+ Description: >-
469
+ Checks formatting of special comments
470
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
471
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
472
+ Enabled: false
473
+
474
+ Style/CommentIndentation:
475
+ Description: 'Indentation of comments.'
476
+ Enabled: false
477
+
478
+ Style/ConstantName:
479
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
480
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
481
+ Enabled: false
482
+
483
+ Style/DefWithParentheses:
484
+ Description: 'Use def with parentheses when there are arguments.'
485
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
486
+ Enabled: false
487
+
488
+ Style/DeprecatedHashMethods:
489
+ Description: 'Checks for use of deprecated Hash methods.'
490
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
491
+ Enabled: false
492
+
493
+ Style/Documentation:
494
+ Description: 'Document classes and non-namespace modules.'
495
+ Enabled: false
496
+
497
+ Style/DotPosition:
498
+ Description: 'Checks the position of the dot in multi-line method calls.'
499
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
500
+ Enabled: false
501
+
502
+ Style/DoubleNegation:
503
+ Description: 'Checks for uses of double negation (!!).'
504
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
505
+ Enabled: false
506
+
507
+ Style/EachWithObject:
508
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
509
+ Enabled: false
510
+
511
+ Style/ElseAlignment:
512
+ Description: 'Align elses and elsifs correctly.'
513
+ Enabled: false
514
+
515
+ Style/EmptyElse:
516
+ Description: 'Avoid empty else-clauses.'
517
+ Enabled: false
518
+
519
+ Style/EmptyLineBetweenDefs:
520
+ Description: 'Use empty lines between defs.'
521
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
522
+ Enabled: false
523
+
524
+ Style/EmptyLines:
525
+ Description: "Don't use several empty lines in a row."
526
+ Enabled: false
527
+
528
+ Style/EmptyLinesAroundAccessModifier:
529
+ Description: "Keep blank lines around access modifiers."
530
+ Enabled: false
531
+
532
+ Style/EmptyLinesAroundBlockBody:
533
+ Description: "Keeps track of empty lines around block bodies."
534
+ Enabled: false
535
+
536
+ Style/EmptyLinesAroundClassBody:
537
+ Description: "Keeps track of empty lines around class bodies."
538
+ Enabled: false
539
+
540
+ Style/EmptyLinesAroundModuleBody:
541
+ Description: "Keeps track of empty lines around module bodies."
542
+ Enabled: false
543
+
544
+ Style/EmptyLinesAroundMethodBody:
545
+ Description: "Keeps track of empty lines around method bodies."
546
+ Enabled: false
547
+
548
+ Style/EmptyLiteral:
549
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
550
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
551
+ Enabled: false
552
+
553
+ Style/EndBlock:
554
+ Description: 'Avoid the use of END blocks.'
555
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
556
+ Enabled: false
557
+
558
+ Style/EndOfLine:
559
+ Description: 'Use Unix-style line endings.'
560
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
561
+ Enabled: false
562
+
563
+ Style/EvenOdd:
564
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
565
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
566
+ Enabled: false
567
+
568
+ Style/ExtraSpacing:
569
+ Description: 'Do not use unnecessary spacing.'
570
+ Enabled: false
571
+
572
+ Style/FileName:
573
+ Description: 'Use snake_case for source file names.'
574
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
575
+ Enabled: false
576
+
577
+ Style/InitialIndentation:
578
+ Description: >-
579
+ Checks the indentation of the first non-blank non-comment line in a file.
580
+ Enabled: false
581
+
582
+ Style/FirstParameterIndentation:
583
+ Description: 'Checks the indentation of the first parameter in a method call.'
584
+ Enabled: false
585
+
586
+ Style/FlipFlop:
587
+ Description: 'Checks for flip flops'
588
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
589
+ Enabled: false
590
+
591
+ Style/For:
592
+ Description: 'Checks use of for or each in multiline loops.'
593
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
594
+ Enabled: false
595
+
596
+ Style/FormatString:
597
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
598
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
599
+ Enabled: false
600
+
601
+ Style/GlobalVars:
602
+ Description: 'Do not introduce global variables.'
603
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
604
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
605
+ Enabled: false
606
+
607
+ Style/GuardClause:
608
+ Description: 'Check for conditionals that can be replaced with guard clauses'
609
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
610
+ Enabled: false
611
+
612
+ Style/HashSyntax:
613
+ Description: >-
614
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
615
+ { :a => 1, :b => 2 }.
616
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
617
+ Enabled: false
618
+
619
+ Style/IfUnlessModifier:
620
+ Description: >-
621
+ Favor modifier if/unless usage when you have a
622
+ single-line body.
623
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
624
+ Enabled: false
625
+
626
+ Style/IfWithSemicolon:
627
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
628
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
629
+ Enabled: false
630
+
631
+ Style/IndentationConsistency:
632
+ Description: 'Keep indentation straight.'
633
+ Enabled: false
634
+
635
+ Style/IndentationWidth:
636
+ Description: 'Use 2 spaces for indentation.'
637
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
638
+ Enabled: false
639
+
640
+ Style/IndentArray:
641
+ Description: >-
642
+ Checks the indentation of the first element in an array
643
+ literal.
644
+ Enabled: false
645
+
646
+ Style/IndentHash:
647
+ Description: 'Checks the indentation of the first key in a hash literal.'
648
+ Enabled: false
649
+
650
+ Style/InfiniteLoop:
651
+ Description: 'Use Kernel#loop for infinite loops.'
652
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
653
+ Enabled: false
654
+
655
+ Style/Lambda:
656
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
657
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
658
+ Enabled: false
659
+
660
+ Style/LambdaCall:
661
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
662
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
663
+ Enabled: false
664
+
665
+ Style/LeadingCommentSpace:
666
+ Description: 'Comments should start with a space.'
667
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
668
+ Enabled: false
669
+
670
+ Style/LineEndConcatenation:
671
+ Description: >-
672
+ Use \ instead of + or << to concatenate two string literals at
673
+ line end.
674
+ Enabled: false
675
+
676
+ Style/MethodCallParentheses:
677
+ Description: 'Do not use parentheses for method calls with no arguments.'
678
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
679
+ Enabled: false
680
+
681
+ Style/MethodDefParentheses:
682
+ Description: >-
683
+ Checks if the method definitions have or don't have
684
+ parentheses.
685
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
686
+ Enabled: false
687
+
688
+ Style/MethodName:
689
+ Description: 'Use the configured style when naming methods.'
690
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
691
+ Enabled: false
692
+
693
+ Style/ModuleFunction:
694
+ Description: 'Checks for usage of `extend self` in modules.'
695
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
696
+ Enabled: false
697
+
698
+ Style/MultilineBlockChain:
699
+ Description: 'Avoid multi-line chains of blocks.'
700
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
701
+ Enabled: false
702
+
703
+ Style/MultilineBlockLayout:
704
+ Description: 'Ensures newlines after multiline block do statements.'
705
+ Enabled: false
706
+
707
+ Style/MultilineIfThen:
708
+ Description: 'Do not use then for multi-line if/unless.'
709
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
710
+ Enabled: false
711
+
712
+ Style/MultilineOperationIndentation:
713
+ Description: >-
714
+ Checks indentation of binary operations that span more than
715
+ one line.
716
+ Enabled: false
717
+
718
+ Style/MultilineTernaryOperator:
719
+ Description: >-
720
+ Avoid multi-line ?: (the ternary operator);
721
+ use if/unless instead.
722
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
723
+ Enabled: false
724
+
725
+ Style/NegatedIf:
726
+ Description: >-
727
+ Favor unless over if for negative conditions
728
+ (or control flow or).
729
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
730
+ Enabled: false
731
+
732
+ Style/NegatedWhile:
733
+ Description: 'Favor until over while for negative conditions.'
734
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
735
+ Enabled: false
736
+
737
+ Style/NestedTernaryOperator:
738
+ Description: 'Use one expression per branch in a ternary operator.'
739
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
740
+ Enabled: false
741
+
742
+ Style/Next:
743
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
744
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
745
+ Enabled: false
746
+
747
+ Style/NilComparison:
748
+ Description: 'Prefer x.nil? to x == nil.'
749
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
750
+ Enabled: false
751
+
752
+ Style/NonNilCheck:
753
+ Description: 'Checks for redundant nil checks.'
754
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
755
+ Enabled: false
756
+
757
+ Style/Not:
758
+ Description: 'Use ! instead of not.'
759
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
760
+ Enabled: false
761
+
762
+ Style/NumericLiterals:
763
+ Description: >-
764
+ Add underscores to large numeric literals to improve their
765
+ readability.
766
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
767
+ Enabled: false
768
+
769
+ Style/OneLineConditional:
770
+ Description: >-
771
+ Favor the ternary operator(?:) over
772
+ if/then/else/end constructs.
773
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
774
+ Enabled: false
775
+
776
+ Style/OpMethod:
777
+ Description: 'When defining binary operators, name the argument other.'
778
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
779
+ Enabled: false
780
+
781
+ Style/OptionalArguments:
782
+ Description: >-
783
+ Checks for optional arguments that do not appear at the end
784
+ of the argument list
785
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
786
+ Enabled: false
787
+
788
+ Style/ParenthesesAroundCondition:
789
+ Description: >-
790
+ Don't use parentheses around the condition of an
791
+ if/unless/while.
792
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
793
+ Enabled: false
794
+
795
+ Style/PercentLiteralDelimiters:
796
+ Description: 'Use `%`-literal delimiters consistently'
797
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
798
+ Enabled: false
799
+
800
+ Style/PercentQLiterals:
801
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
802
+ Enabled: false
803
+
804
+ Style/PerlBackrefs:
805
+ Description: 'Avoid Perl-style regex back references.'
806
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
807
+ Enabled: false
808
+
809
+ Style/PredicateName:
810
+ Description: 'Check the names of predicate methods.'
811
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
812
+ Enabled: false
813
+
814
+ Style/Proc:
815
+ Description: 'Use proc instead of Proc.new.'
816
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
817
+ Enabled: false
818
+
819
+ Style/RaiseArgs:
820
+ Description: 'Checks the arguments passed to raise/fail.'
821
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
822
+ Enabled: false
823
+
824
+ Style/RedundantBegin:
825
+ Description: "Don't use begin blocks when they are not needed."
826
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
827
+ Enabled: false
828
+
829
+ Style/RedundantException:
830
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
831
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
832
+ Enabled: false
833
+
834
+ Style/RedundantReturn:
835
+ Description: "Don't use return where it's not required."
836
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
837
+ Enabled: false
838
+
839
+ Style/RedundantSelf:
840
+ Description: "Don't use self where it's not needed."
841
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
842
+ Enabled: false
843
+
844
+ Style/RegexpLiteral:
845
+ Description: 'Use / or %r around regular expressions.'
846
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
847
+ Enabled: false
848
+
849
+ Style/RescueEnsureAlignment:
850
+ Description: 'Align rescues and ensures correctly.'
851
+ Enabled: false
852
+
853
+ Style/RescueModifier:
854
+ Description: 'Avoid using rescue in its modifier form.'
855
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
856
+ Enabled: false
857
+
858
+ Style/SelfAssignment:
859
+ Description: >-
860
+ Checks for places where self-assignment shorthand should have
861
+ been used.
862
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
863
+ Enabled: false
864
+
865
+ Style/Semicolon:
866
+ Description: "Don't use semicolons to terminate expressions."
867
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
868
+ Enabled: false
869
+
870
+ Style/SignalException:
871
+ Description: 'Checks for proper usage of fail and raise.'
872
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
873
+ Enabled: false
874
+
875
+ Style/SingleLineBlockParams:
876
+ Description: 'Enforces the names of some block params.'
877
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
878
+ Enabled: false
879
+
880
+ Style/SingleLineMethods:
881
+ Description: 'Avoid single-line methods.'
882
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
883
+ Enabled: false
884
+
885
+ Style/SpaceAfterColon:
886
+ Description: 'Use spaces after colons.'
887
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
888
+ Enabled: false
889
+
890
+ Style/SpaceAfterComma:
891
+ Description: 'Use spaces after commas.'
892
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
893
+ Enabled: false
894
+
895
+ Style/SpaceAfterControlKeyword:
896
+ Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
897
+ Enabled: false
898
+
899
+ Style/SpaceAfterMethodName:
900
+ Description: >-
901
+ Do not put a space between a method name and the opening
902
+ parenthesis in a method definition.
903
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
904
+ Enabled: false
905
+
906
+ Style/SpaceAfterNot:
907
+ Description: Tracks redundant space after the ! operator.
908
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
909
+ Enabled: false
910
+
911
+ Style/SpaceAfterSemicolon:
912
+ Description: 'Use spaces after semicolons.'
913
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
914
+ Enabled: false
915
+
916
+ Style/SpaceBeforeBlockBraces:
917
+ Description: >-
918
+ Checks that the left block brace has or doesn't have space
919
+ before it.
920
+ EnforcedStyle: no_space
921
+ Enabled: true
922
+
923
+ Style/SpaceBeforeComma:
924
+ Description: 'No spaces before commas.'
925
+ Enabled: false
926
+
927
+ Style/SpaceBeforeComment:
928
+ Description: >-
929
+ Checks for missing space between code and a comment on the
930
+ same line.
931
+ Enabled: false
932
+
933
+ Style/SpaceBeforeSemicolon:
934
+ Description: 'No spaces before semicolons.'
935
+ Enabled: false
936
+
937
+ Style/SpaceInsideBlockBraces:
938
+ Description: >-
939
+ Checks that block braces have or don't have surrounding space.
940
+ For blocks taking parameters, checks that the left brace has
941
+ or doesn't have trailing space.
942
+ EnforcedStyle: space
943
+ EnforcedStyleForEmptyBraces: no_space
944
+ SpaceBeforeBlockParameters: true
945
+ Enabled: true
946
+
947
+ Style/SpaceAroundBlockParameters:
948
+ Description: 'Checks the spacing inside and after block parameters pipes.'
949
+ EnforcedStyleInsidePipes: no_space
950
+ Enabled: true
951
+
952
+ Style/SpaceAroundEqualsInParameterDefault:
953
+ Description: >-
954
+ Checks that the equals signs in parameter default assignments
955
+ have or don't have surrounding space depending on
956
+ configuration.
957
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
958
+ EnforcedStyle: space
959
+ Enabled: true
960
+
961
+ Style/SpaceAroundOperators:
962
+ Description: 'Use a single space around operators.'
963
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
964
+ AllowForAlignment: true
965
+ Enabled: true
966
+
967
+ Style/SpaceBeforeModifierKeyword:
968
+ Description: 'Put a space before the modifier keyword.'
969
+ Enabled: false
970
+
971
+ Style/SpaceInsideBrackets:
972
+ Description: 'No spaces after [ or before ].'
973
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
974
+ Enabled: false
975
+
976
+ Style/SpaceInsideHashLiteralBraces:
977
+ Description: "Use spaces inside hash literal braces - or don't."
978
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
979
+ EnforcedStyle: space
980
+ EnforcedStyleForEmptyBraces: no_space
981
+ Enabled: true
982
+
983
+ # Style/SpaceInsideParens:
984
+ # Description: 'Require spaces after ( or before ).'
985
+ # StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
986
+ # EnforcedStyle: space
987
+ # Enabled: true
988
+
989
+ Style/SpaceInsideRangeLiteral:
990
+ Description: 'No spaces inside range literals.'
991
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
992
+ Enabled: false
993
+
994
+ Style/SpecialGlobalVars:
995
+ Description: 'Avoid Perl-style global variables.'
996
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
997
+ Enabled: false
998
+
999
+ Style/StringLiterals:
1000
+ Description: 'Checks if uses of quotes match the configured preference.'
1001
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
1002
+ Enabled: false
1003
+
1004
+ Style/StringLiteralsInInterpolation:
1005
+ Description: >-
1006
+ Checks if uses of quotes inside expressions in interpolated
1007
+ strings match the configured preference.
1008
+ Enabled: false
1009
+
1010
+ Style/StructInheritance:
1011
+ Description: 'Checks for inheritance from Struct.new.'
1012
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
1013
+ Enabled: false
1014
+
1015
+ Style/SymbolLiteral:
1016
+ Description: 'Use plain symbols instead of string symbols when possible.'
1017
+ Enabled: false
1018
+
1019
+ Style/SymbolProc:
1020
+ Description: 'Use symbols as procs instead of blocks when possible.'
1021
+ Enabled: false
1022
+
1023
+ Style/Tab:
1024
+ Description: 'No hard tabs.'
1025
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1026
+ Enabled: false
1027
+
1028
+ Style/TrailingBlankLines:
1029
+ Description: 'Checks trailing blank lines and final newline.'
1030
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1031
+ Enabled: false
1032
+
1033
+ Style/TrailingCommaInLiteral:
1034
+ Description: 'Checks for trailing comma in parameter literals.'
1035
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1036
+ Enabled: false
1037
+
1038
+ Style/TrailingCommaInArguments:
1039
+ Description: 'Checks for trailing comma in parameter lists.'
1040
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1041
+ Enabled: false
1042
+
1043
+ Style/TrailingWhitespace:
1044
+ Description: 'Avoid trailing whitespace.'
1045
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1046
+ Enabled: false
1047
+
1048
+ Style/TrivialAccessors:
1049
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
1050
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
1051
+ Enabled: false
1052
+
1053
+ Style/UnlessElse:
1054
+ Description: >-
1055
+ Do not use unless with else. Rewrite these with the positive
1056
+ case first.
1057
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
1058
+ Enabled: false
1059
+
1060
+ Style/UnneededCapitalW:
1061
+ Description: 'Checks for %W when interpolation is not needed.'
1062
+ Enabled: false
1063
+
1064
+ Style/UnneededPercentQ:
1065
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
1066
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
1067
+ Enabled: false
1068
+
1069
+ Style/TrailingUnderscoreVariable:
1070
+ Description: >-
1071
+ Checks for the usage of unneeded trailing underscores at the
1072
+ end of parallel variable assignment.
1073
+ Enabled: false
1074
+
1075
+ Style/VariableInterpolation:
1076
+ Description: >-
1077
+ Don't interpolate global, instance and class variables
1078
+ directly in strings.
1079
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
1080
+ Enabled: false
1081
+
1082
+ Style/VariableName:
1083
+ Description: 'Use the configured style when naming variables.'
1084
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1085
+ Enabled: false
1086
+
1087
+ Style/WhenThen:
1088
+ Description: 'Use when x then ... for one-line cases.'
1089
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
1090
+ Enabled: false
1091
+
1092
+ Style/WhileUntilDo:
1093
+ Description: 'Checks for redundant do after while or until.'
1094
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
1095
+ Enabled: false
1096
+
1097
+ Style/WhileUntilModifier:
1098
+ Description: >-
1099
+ Favor modifier while/until usage when you have a
1100
+ single-line body.
1101
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
1102
+ Enabled: false
1103
+
1104
+ Style/WordArray:
1105
+ Description: 'Use %w or %W for arrays of words.'
1106
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
1107
+ Enabled: false