correios_sigep 1.0.0 → 1.0.1

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