vagrant-hp 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveragerc +4 -0
- data/.rubocop.yml +885 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +4 -0
- data/CHANGELOG.md_ +13 -0
- data/Gemfile +3 -2
- data/README.md +7 -3
- data/Rakefile +3 -0
- data/Vagrantfile +28 -0
- data/lib/vagrant-hp.rb +6 -7
- data/lib/vagrant-hp/action.rb +18 -17
- data/lib/vagrant-hp/action/connect_hp.rb +15 -16
- data/lib/vagrant-hp/action/create_server.rb +28 -24
- data/lib/vagrant-hp/action/delete_server.rb +6 -3
- data/lib/vagrant-hp/action/halt_server.rb +3 -3
- data/lib/vagrant-hp/action/message_already_created.rb +1 -1
- data/lib/vagrant-hp/action/message_not_created.rb +1 -1
- data/lib/vagrant-hp/action/read_ssh_info.rb +10 -9
- data/lib/vagrant-hp/action/read_state.rb +6 -4
- data/lib/vagrant-hp/action/sync_folders.rb +17 -14
- data/lib/vagrant-hp/action/test.rb +22 -0
- data/lib/vagrant-hp/action/timed_provision.rb +4 -4
- data/lib/vagrant-hp/action/warn_networks.rb +1 -1
- data/lib/vagrant-hp/config.rb +19 -19
- data/lib/vagrant-hp/errors.rb +2 -2
- data/lib/vagrant-hp/plugin.rb +13 -13
- data/lib/vagrant-hp/provider.rb +6 -6
- data/lib/vagrant-hp/version.rb +1 -1
- data/locales/en.yml +4 -0
- data/spec/vagrant-hp/config_spec.rb +20 -18
- data/test.rb +49 -0
- data/test_address.rb +38 -0
- data/test_key.pem +27 -0
- data/vagrant-hp.gemspec +5 -4
- metadata +68 -62
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 92889ca25d3c6e6a85da3f7155befd64f46f87e9
|
4
|
+
data.tar.gz: 1c4ac01044bd006e42ef4f53234ca4969bdb8da0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ebe24d2a73dd13e5ae2ab485f0dcb2e69d3d3959eb14a2a3ae28d734b0ce4c75b5feaf0c7ce6d44dbc3b73650989581a6c87dd7bc0270cd465bf2fa74755ff47
|
7
|
+
data.tar.gz: 48c30fdc1ffd725857e6154df1fdb35e22c577218326a4121639949dd66ed39e063c0292bbebbadbfb5aac990df086222d4d048e062489d75cf01d94e14c765b
|
data/.coveragerc
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,885 @@
|
|
1
|
+
# This is the configuration used to check the rubocop source code.
|
2
|
+
|
3
|
+
# inherit_from: config/default.yml
|
4
|
+
|
5
|
+
MethodLength:
|
6
|
+
Max: 20
|
7
|
+
|
8
|
+
ClassLength:
|
9
|
+
Max: 140
|
10
|
+
|
11
|
+
CyclomaticComplexity:
|
12
|
+
Max: 10
|
13
|
+
|
14
|
+
# This is the default configuration file. Enabling and disabling is configured
|
15
|
+
# in separate files. This file adds all other parameters apart from Enabled.
|
16
|
+
|
17
|
+
# inherit_from:
|
18
|
+
# - enabled.yml
|
19
|
+
# - disabled.yml
|
20
|
+
|
21
|
+
# Common configuration.
|
22
|
+
AllCops:
|
23
|
+
# Include gemspec, Rakefile and Gemfile
|
24
|
+
Includes:
|
25
|
+
- '**/*.gemspec'
|
26
|
+
- '**/Rakefile'
|
27
|
+
- 'Gemfile'
|
28
|
+
Excludes: []
|
29
|
+
# By default, the rails cops are not run. Override in project or home
|
30
|
+
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
31
|
+
RunRailsCops: false
|
32
|
+
|
33
|
+
# Indent private/protected/public as deep as method definitions
|
34
|
+
AccessModifierIndentation:
|
35
|
+
# supported styles are "indent" and "outdent"
|
36
|
+
EnforcedStyle: indent
|
37
|
+
|
38
|
+
# Align the elements of a hash literal if they span more than one line.
|
39
|
+
AlignHash:
|
40
|
+
# Alignment of entries using hash rocket as separator. Valid values are:
|
41
|
+
#
|
42
|
+
# key - left alignment of keys
|
43
|
+
# 'a' => 2
|
44
|
+
# 'bb' => 3
|
45
|
+
# separator - alignment of hash rockets, keys are right aligned
|
46
|
+
# 'a' => 2
|
47
|
+
# 'bb' => 3
|
48
|
+
# table - left alignment of keys, hash rockets, and values
|
49
|
+
# 'a' => 2
|
50
|
+
# 'bb' => 3
|
51
|
+
EnforcedHashRocketStyle: key
|
52
|
+
# Alignment of entries using colon as separator. Valid values are:
|
53
|
+
#
|
54
|
+
# key - left alignment of keys
|
55
|
+
# a: 0
|
56
|
+
# bb: 1
|
57
|
+
# separator - alignment of colons, keys are right aligned
|
58
|
+
# a: 0
|
59
|
+
# bb: 1
|
60
|
+
# table - left alignment of keys and values
|
61
|
+
# a: 0
|
62
|
+
# bb: 1
|
63
|
+
EnforcedColonStyle: key
|
64
|
+
|
65
|
+
# Allow safe assignment in conditions.
|
66
|
+
AssignmentInCondition:
|
67
|
+
AllowSafeAssignment: true
|
68
|
+
|
69
|
+
BlockNesting:
|
70
|
+
Max: 3
|
71
|
+
|
72
|
+
BracesAroundHashParameters:
|
73
|
+
# Valid values are: braces, no_braces
|
74
|
+
EnforcedStyle: no_braces
|
75
|
+
|
76
|
+
# Indentation of `when`.
|
77
|
+
CaseIndentation:
|
78
|
+
# Valid values are: case, end
|
79
|
+
IndentWhenRelativeTo: case
|
80
|
+
IndentOneStep: false
|
81
|
+
|
82
|
+
ClassLength:
|
83
|
+
CountComments: false # count full line comments?
|
84
|
+
Max: 100
|
85
|
+
|
86
|
+
# Align with the style guide.
|
87
|
+
CollectionMethods:
|
88
|
+
PreferredMethods:
|
89
|
+
collect: 'map'
|
90
|
+
collect!: 'map!'
|
91
|
+
inject: 'reduce'
|
92
|
+
detect: 'find'
|
93
|
+
find_all: 'select'
|
94
|
+
|
95
|
+
# Checks formatting of special comments
|
96
|
+
CommentAnnotation:
|
97
|
+
Keywords:
|
98
|
+
- TODO
|
99
|
+
- FIXME
|
100
|
+
- OPTIMIZE
|
101
|
+
- HACK
|
102
|
+
- REVIEW
|
103
|
+
|
104
|
+
# Avoid complex methods.
|
105
|
+
CyclomaticComplexity:
|
106
|
+
Max: 6
|
107
|
+
|
108
|
+
# Multi-line method chaining should be done with leading dots.
|
109
|
+
DotPosition:
|
110
|
+
Style: 'leading'
|
111
|
+
|
112
|
+
# Use empty lines between defs.
|
113
|
+
EmptyLineBetweenDefs:
|
114
|
+
# If true, this parameter means that single line method definitions don't
|
115
|
+
# need an empty line between them.
|
116
|
+
AllowAdjacentOneLineDefs: false
|
117
|
+
|
118
|
+
# Align ends correctly.
|
119
|
+
EndAlignment:
|
120
|
+
# Valid valued are: keyword, variable
|
121
|
+
# The value `keyword` means that `end` should be aligned with the matching
|
122
|
+
# keyword (if, while, etc.).
|
123
|
+
# The value `variable` means that in assignments, `end` should be aligned
|
124
|
+
# with the start of the variable on the left hand side of `=`. In all other
|
125
|
+
# situations, `end` should still be aligned with the keyword.
|
126
|
+
AlignWith: keyword
|
127
|
+
|
128
|
+
# Checks use of for or each in multiline loops.
|
129
|
+
For:
|
130
|
+
# Valid values are: for, each
|
131
|
+
EnforcedStyle: each
|
132
|
+
|
133
|
+
# Built-in global variables are allowed by default.
|
134
|
+
GlobalVars:
|
135
|
+
AllowedVariables: []
|
136
|
+
|
137
|
+
HashSyntax:
|
138
|
+
# Valid values are: ruby19, hash_rockets
|
139
|
+
EnforcedStyle: ruby19
|
140
|
+
|
141
|
+
LambdaCall:
|
142
|
+
# Valid values are: call, braces
|
143
|
+
EnforcedStyle: call
|
144
|
+
|
145
|
+
LineLength:
|
146
|
+
Max: 79
|
147
|
+
|
148
|
+
MethodDefParentheses:
|
149
|
+
# Valid values are: require_parentheses, require_no_parentheses
|
150
|
+
EnforcedStyle: require_parentheses
|
151
|
+
|
152
|
+
MethodLength:
|
153
|
+
CountComments: false # count full line comments?
|
154
|
+
Max: 10
|
155
|
+
|
156
|
+
MethodName:
|
157
|
+
# Valid values are: snake_case, camelCase
|
158
|
+
EnforcedStyle: snake_case
|
159
|
+
|
160
|
+
NumericLiterals:
|
161
|
+
MinDigits: 5
|
162
|
+
|
163
|
+
Output:
|
164
|
+
Ignore:
|
165
|
+
- '^.*\.rake$'
|
166
|
+
- '^.*/script/.*$'
|
167
|
+
- '^.*/tasks/.*$'
|
168
|
+
- 'Rakefile$'
|
169
|
+
|
170
|
+
ParameterLists:
|
171
|
+
Max: 5
|
172
|
+
CountKeywordArgs: true
|
173
|
+
|
174
|
+
# Allow safe assignment in conditions.
|
175
|
+
ParenthesesAroundCondition:
|
176
|
+
AllowSafeAssignment: true
|
177
|
+
|
178
|
+
RaiseArgs:
|
179
|
+
# Valid values are: compact and exploded
|
180
|
+
# exploded: raise Exception, msg
|
181
|
+
# compact: raise Exception.new(msg)
|
182
|
+
EnforcedStyle: exploded
|
183
|
+
|
184
|
+
RedundantReturn:
|
185
|
+
# When true allows code like `return x, y`.
|
186
|
+
AllowMultipleReturnValues: false
|
187
|
+
|
188
|
+
RegexpLiteral:
|
189
|
+
MaxSlashes: 1
|
190
|
+
|
191
|
+
Semicolon:
|
192
|
+
# Allow ; to separate several expressions on the same line.
|
193
|
+
AllowAsExpressionSeparator: false
|
194
|
+
|
195
|
+
SignalException:
|
196
|
+
# Valid values are: semantic, only_raise and only_fail
|
197
|
+
EnforcedStyle: semantic
|
198
|
+
|
199
|
+
SingleLineBlockParams:
|
200
|
+
Methods:
|
201
|
+
- reduce:
|
202
|
+
- a
|
203
|
+
- e
|
204
|
+
- inject:
|
205
|
+
- a
|
206
|
+
- e
|
207
|
+
|
208
|
+
SingleLineMethods:
|
209
|
+
AllowIfMethodIsEmpty: true
|
210
|
+
|
211
|
+
StringLiterals:
|
212
|
+
# Valid values (denoting the preferred quote delimiters) are:
|
213
|
+
# single_quotes, double_quotes
|
214
|
+
EnforcedStyle: single_quotes
|
215
|
+
|
216
|
+
SpaceAroundBlockBraces:
|
217
|
+
# Valid values are: space_inside_braces, no_space_inside_braces
|
218
|
+
EnforcedStyle: space_inside_braces
|
219
|
+
# Valid values are: space, no_space
|
220
|
+
EnforcedStyleForEmptyBraces: no_space
|
221
|
+
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
|
222
|
+
SpaceBeforeBlockParameters: true
|
223
|
+
|
224
|
+
SpaceInsideHashLiteralBraces:
|
225
|
+
# Valid values (for both parameters) are: space, no_space
|
226
|
+
EnforcedStyle: space
|
227
|
+
EnforcedStyleForEmptyBraces: no_space
|
228
|
+
|
229
|
+
# TrivialAccessors doesn't require exact name matches and doesn't allow
|
230
|
+
# predicated methods by default.
|
231
|
+
TrivialAccessors:
|
232
|
+
ExactNameMatch: false
|
233
|
+
AllowPredicates: false
|
234
|
+
Whitelist:
|
235
|
+
- to_ary
|
236
|
+
- to_a
|
237
|
+
- to_c
|
238
|
+
- to_enum
|
239
|
+
- to_h
|
240
|
+
- to_hash
|
241
|
+
- to_i
|
242
|
+
- to_int
|
243
|
+
- to_io
|
244
|
+
- to_open
|
245
|
+
- to_path
|
246
|
+
- to_proc
|
247
|
+
- to_r
|
248
|
+
- to_regexp
|
249
|
+
- to_str
|
250
|
+
- to_s
|
251
|
+
- to_sym
|
252
|
+
|
253
|
+
VariableName:
|
254
|
+
# Valid values are: snake_case, camelCase
|
255
|
+
EnforcedStyle: snake_case
|
256
|
+
|
257
|
+
WordArray:
|
258
|
+
MinSize: 0
|
259
|
+
|
260
|
+
##################### Rails ##################################
|
261
|
+
|
262
|
+
DefaultScope:
|
263
|
+
IncludePaths:
|
264
|
+
- app/models
|
265
|
+
|
266
|
+
HasAndBelongsToMany:
|
267
|
+
IncludePaths:
|
268
|
+
- app/models
|
269
|
+
|
270
|
+
ReadAttribute:
|
271
|
+
IncludePaths:
|
272
|
+
- app/models
|
273
|
+
|
274
|
+
Validation:
|
275
|
+
IncludePaths:
|
276
|
+
- app/models
|
277
|
+
|
278
|
+
# Disabled
|
279
|
+
# These are all the cops that are disabled in the default configuration.
|
280
|
+
|
281
|
+
MethodCalledOnDoEndBlock:
|
282
|
+
Description: 'Avoid chaining a method call on a do...end block.'
|
283
|
+
Enabled: false
|
284
|
+
|
285
|
+
SymbolArray:
|
286
|
+
Description: 'Use %i or %I for arrays of symbols.'
|
287
|
+
Enabled: false
|
288
|
+
|
289
|
+
# Enabled
|
290
|
+
# These are all the cops that are enabled in the default configuration.
|
291
|
+
|
292
|
+
AccessModifierIndentation:
|
293
|
+
Description: Check indentation of private/protected visibility modifiers.
|
294
|
+
Enabled: true
|
295
|
+
|
296
|
+
Alias:
|
297
|
+
Description: 'Use alias_method instead of alias.'
|
298
|
+
Enabled: true
|
299
|
+
|
300
|
+
AlignArray:
|
301
|
+
Description: >
|
302
|
+
Align the elements of an array literal if they span more than
|
303
|
+
one line.
|
304
|
+
Enabled: true
|
305
|
+
|
306
|
+
AlignHash:
|
307
|
+
Description: >
|
308
|
+
Align the elements of a hash literal if they span more than
|
309
|
+
one line.
|
310
|
+
Enabled: true
|
311
|
+
|
312
|
+
AlignParameters:
|
313
|
+
Description: >
|
314
|
+
Align the parameters of a method call if they span more
|
315
|
+
than one line.
|
316
|
+
Enabled: true
|
317
|
+
|
318
|
+
AndOr:
|
319
|
+
Description: 'Use &&/|| instead of and/or.'
|
320
|
+
Enabled: true
|
321
|
+
|
322
|
+
AsciiIdentifiers:
|
323
|
+
Description: 'Use only ascii symbols in identifiers.'
|
324
|
+
Enabled: true
|
325
|
+
|
326
|
+
AsciiComments:
|
327
|
+
Description: 'Use only ascii symbols in comments.'
|
328
|
+
Enabled: true
|
329
|
+
|
330
|
+
Attr:
|
331
|
+
Description: 'Checks for uses of Module#attr.'
|
332
|
+
Enabled: true
|
333
|
+
|
334
|
+
BeginBlock:
|
335
|
+
Description: 'Avoid the use of BEGIN blocks.'
|
336
|
+
Enabled: true
|
337
|
+
|
338
|
+
Blocks:
|
339
|
+
Description: >
|
340
|
+
Avoid using {...} for multi-line blocks (multiline chaining is
|
341
|
+
always ugly).
|
342
|
+
Prefer {...} over do...end for single-line blocks.
|
343
|
+
Enabled: true
|
344
|
+
|
345
|
+
BlockComments:
|
346
|
+
Description: 'Do not use block comments.'
|
347
|
+
Enabled: true
|
348
|
+
|
349
|
+
BlockNesting:
|
350
|
+
Description: 'Avoid excessive block nesting'
|
351
|
+
Enabled: true
|
352
|
+
|
353
|
+
CaseEquality:
|
354
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
355
|
+
Enabled: true
|
356
|
+
|
357
|
+
CaseIndentation:
|
358
|
+
Description: 'Indentation of when in a case/when/[else/]end.'
|
359
|
+
Enabled: true
|
360
|
+
|
361
|
+
CharacterLiteral:
|
362
|
+
Description: 'Checks for uses of character literals.'
|
363
|
+
Enabled: true
|
364
|
+
|
365
|
+
ClassLength:
|
366
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
367
|
+
Enabled: true
|
368
|
+
|
369
|
+
ClassAndModuleCamelCase:
|
370
|
+
Description: 'Use CamelCase for classes and modules.'
|
371
|
+
Enabled: true
|
372
|
+
|
373
|
+
ClassMethods:
|
374
|
+
Description: 'Use self when defining module/class methods.'
|
375
|
+
Enabled: true
|
376
|
+
|
377
|
+
ClassVars:
|
378
|
+
Description: 'Avoid the use of class variables.'
|
379
|
+
Enabled: true
|
380
|
+
|
381
|
+
CollectionMethods:
|
382
|
+
Description: 'Preferred collection methods.'
|
383
|
+
Enabled: true
|
384
|
+
|
385
|
+
ColonMethodCall:
|
386
|
+
Description: 'Do not use :: for method call.'
|
387
|
+
Enabled: true
|
388
|
+
|
389
|
+
ConstantName:
|
390
|
+
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
391
|
+
Enabled: true
|
392
|
+
|
393
|
+
CyclomaticComplexity:
|
394
|
+
Description: 'Avoid complex methods.'
|
395
|
+
Enabled: true
|
396
|
+
|
397
|
+
DefWithParentheses:
|
398
|
+
Description: 'Use def with parentheses when there are arguments.'
|
399
|
+
Enabled: true
|
400
|
+
|
401
|
+
Documentation:
|
402
|
+
Description: 'Document classes and non-namespace modules.'
|
403
|
+
Enabled: true
|
404
|
+
|
405
|
+
DotPosition:
|
406
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
407
|
+
Enabled: true
|
408
|
+
|
409
|
+
EmptyLines:
|
410
|
+
Description: "Don't use several empty lines in a row."
|
411
|
+
Enabled: true
|
412
|
+
|
413
|
+
EmptyLinesAroundAccessModifier:
|
414
|
+
Description: "Keep blank lines around access modifiers."
|
415
|
+
Enabled: true
|
416
|
+
|
417
|
+
EmptyLinesAroundBody:
|
418
|
+
Description: "Keeps track of blank lines around expression bodies."
|
419
|
+
Enabled: true
|
420
|
+
|
421
|
+
EmptyLineBetweenDefs:
|
422
|
+
Description: 'Use empty lines between defs.'
|
423
|
+
Enabled: true
|
424
|
+
|
425
|
+
EmptyLiteral:
|
426
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
427
|
+
Enabled: true
|
428
|
+
|
429
|
+
Encoding:
|
430
|
+
Description: 'Use UTF-8 as the source file encoding.'
|
431
|
+
Enabled: true
|
432
|
+
|
433
|
+
EndBlock:
|
434
|
+
Description: 'Avoid the use of END blocks.'
|
435
|
+
Enabled: true
|
436
|
+
|
437
|
+
EndOfLine:
|
438
|
+
Description: 'Use Unix-style line endings.'
|
439
|
+
Enabled: true
|
440
|
+
|
441
|
+
EnsureReturn:
|
442
|
+
Description: 'Never use return in an ensure block.'
|
443
|
+
Enabled: true
|
444
|
+
|
445
|
+
Eval:
|
446
|
+
Description: 'The use of eval represents a serious security risk.'
|
447
|
+
Enabled: true
|
448
|
+
|
449
|
+
EvenOdd:
|
450
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
451
|
+
Enabled: true
|
452
|
+
|
453
|
+
FavorJoin:
|
454
|
+
Description: 'Use Array#join instead of Array#*.'
|
455
|
+
Enabled: true
|
456
|
+
|
457
|
+
FavorSprintf:
|
458
|
+
Description: 'Use sprintf instead of String#%.'
|
459
|
+
Enabled: true
|
460
|
+
|
461
|
+
FavorUnlessOverNegatedIf:
|
462
|
+
Description: >
|
463
|
+
Favor unless over if for negative conditions
|
464
|
+
(or control flow or).
|
465
|
+
Enabled: true
|
466
|
+
|
467
|
+
FavorUntilOverNegatedWhile:
|
468
|
+
Description: 'Favor until over while for negative conditions.'
|
469
|
+
Enabled: true
|
470
|
+
|
471
|
+
FinalNewline:
|
472
|
+
Description: 'Checks for a final newline in a source file.'
|
473
|
+
Enabled: true
|
474
|
+
|
475
|
+
FlipFlop:
|
476
|
+
Description: 'Checks for flip flops'
|
477
|
+
Enabled: true
|
478
|
+
|
479
|
+
For:
|
480
|
+
Description: 'Checks use of for or each in multiline loops.'
|
481
|
+
Enabled: true
|
482
|
+
|
483
|
+
GlobalVars:
|
484
|
+
Description: 'Do not introduce global variables.'
|
485
|
+
Enabled: true
|
486
|
+
|
487
|
+
HandleExceptions:
|
488
|
+
Description: "Don't suppress exception."
|
489
|
+
Enabled: true
|
490
|
+
|
491
|
+
HashMethods:
|
492
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
493
|
+
Enabled: true
|
494
|
+
|
495
|
+
HashSyntax:
|
496
|
+
Description: >
|
497
|
+
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
498
|
+
{ :a => 1, :b => 2 }.
|
499
|
+
Enabled: true
|
500
|
+
|
501
|
+
IfWithSemicolon:
|
502
|
+
Description: 'Never use if x; .... Use the ternary operator instead.'
|
503
|
+
Enabled: true
|
504
|
+
|
505
|
+
IfUnlessModifier:
|
506
|
+
Description: >
|
507
|
+
Favor modifier if/unless usage when you have a
|
508
|
+
single-line body.
|
509
|
+
Enabled: true
|
510
|
+
|
511
|
+
IndentationWidth:
|
512
|
+
Description: 'Use 2 spaces for indentation.'
|
513
|
+
Enabled: true
|
514
|
+
|
515
|
+
Lambda:
|
516
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
517
|
+
Enabled: true
|
518
|
+
|
519
|
+
LambdaCall:
|
520
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
521
|
+
Enabled: true
|
522
|
+
|
523
|
+
LineLength:
|
524
|
+
Description: 'Limit lines to 79 characters.'
|
525
|
+
Enabled: true
|
526
|
+
|
527
|
+
LeadingCommentSpace:
|
528
|
+
Description: 'Comments should start with a space.'
|
529
|
+
Enabled: true
|
530
|
+
|
531
|
+
Loop:
|
532
|
+
Description: >
|
533
|
+
Use Kernel#loop with break rather than begin/end/until or
|
534
|
+
begin/end/while for post-loop tests.
|
535
|
+
Enabled: true
|
536
|
+
|
537
|
+
MethodCallParentheses:
|
538
|
+
Description: 'Do not use parentheses for method calls with no arguments.'
|
539
|
+
Enabled: true
|
540
|
+
|
541
|
+
MethodDefParentheses:
|
542
|
+
Description: >
|
543
|
+
Checks if the method definitions have or don't have
|
544
|
+
parentheses.
|
545
|
+
Enabled: true
|
546
|
+
|
547
|
+
MethodLength:
|
548
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
549
|
+
Enabled: true
|
550
|
+
|
551
|
+
MethodName:
|
552
|
+
Description: 'Use the configured style when naming methods.'
|
553
|
+
Enabled: true
|
554
|
+
|
555
|
+
ModuleFunction:
|
556
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
557
|
+
Enabled: true
|
558
|
+
|
559
|
+
MultilineBlockChain:
|
560
|
+
Description: 'Avoid multi-line chains of blocks.'
|
561
|
+
Enabled: true
|
562
|
+
|
563
|
+
MultilineIfThen:
|
564
|
+
Description: 'Never use then for multi-line if/unless.'
|
565
|
+
Enabled: true
|
566
|
+
|
567
|
+
MultilineTernaryOperator:
|
568
|
+
Description: >
|
569
|
+
Avoid multi-line ?: (the ternary operator);
|
570
|
+
use if/unless instead.
|
571
|
+
Enabled: true
|
572
|
+
|
573
|
+
NestedTernaryOperator:
|
574
|
+
Description: 'Use one expression per branch in a ternary operator.'
|
575
|
+
Enabled: true
|
576
|
+
|
577
|
+
NilComparison:
|
578
|
+
Description: 'Prefer x.nil? to x == nil.'
|
579
|
+
Enabled: true
|
580
|
+
|
581
|
+
Not:
|
582
|
+
Description: 'Use ! instead of not.'
|
583
|
+
Enabled: true
|
584
|
+
|
585
|
+
NumericLiterals:
|
586
|
+
Description: >
|
587
|
+
Add underscores to large numeric literals to improve their
|
588
|
+
readability.
|
589
|
+
Enabled: true
|
590
|
+
|
591
|
+
OneLineConditional:
|
592
|
+
Description: >
|
593
|
+
Favor the ternary operator(?:) over
|
594
|
+
if/then/else/end constructs.
|
595
|
+
Enabled: true
|
596
|
+
|
597
|
+
OpMethod:
|
598
|
+
Description: 'When defining binary operators, name the argument other.'
|
599
|
+
Enabled: true
|
600
|
+
|
601
|
+
ParameterLists:
|
602
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
603
|
+
Enabled: true
|
604
|
+
|
605
|
+
ParenthesesAroundCondition:
|
606
|
+
Description: >
|
607
|
+
Don't use parentheses around the condition of an
|
608
|
+
if/unless/while.
|
609
|
+
Enabled: true
|
610
|
+
|
611
|
+
PerlBackrefs:
|
612
|
+
Description: 'Avoid Perl-style regex back references.'
|
613
|
+
Enabled: true
|
614
|
+
|
615
|
+
Proc:
|
616
|
+
Description: 'Use proc instead of Proc.new.'
|
617
|
+
Enabled: true
|
618
|
+
|
619
|
+
RaiseArgs:
|
620
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
621
|
+
Enabled: true
|
622
|
+
|
623
|
+
RedundantBegin:
|
624
|
+
Description: "Don't use begin blocks when they are not needed."
|
625
|
+
Enabled: true
|
626
|
+
|
627
|
+
RedundantException:
|
628
|
+
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
629
|
+
Enabled: true
|
630
|
+
|
631
|
+
RedundantSelf:
|
632
|
+
Description: "Don't use self where it's not needed."
|
633
|
+
Enabled: true
|
634
|
+
|
635
|
+
RedundantReturn:
|
636
|
+
Description: "Don't use return where it's not required."
|
637
|
+
Enabled: true
|
638
|
+
|
639
|
+
RegexpLiteral:
|
640
|
+
Description: >
|
641
|
+
Use %r for regular expressions matching more than
|
642
|
+
`MaxSlashes` '/' characters.
|
643
|
+
Use %r only for regular expressions matching more than
|
644
|
+
`MaxSlashes` '/' character.
|
645
|
+
Enabled: true
|
646
|
+
|
647
|
+
RescueModifier:
|
648
|
+
Description: 'Avoid using rescue in its modifier form.'
|
649
|
+
Enabled: true
|
650
|
+
|
651
|
+
RescueException:
|
652
|
+
Description: 'Avoid rescuing the Exception class.'
|
653
|
+
Enabled: true
|
654
|
+
|
655
|
+
Semicolon:
|
656
|
+
Description: "Don't use semicolons to terminate expressions."
|
657
|
+
Enabled: true
|
658
|
+
|
659
|
+
SignalException:
|
660
|
+
Description: 'Checks for proper usage of fail and raise.'
|
661
|
+
Enabled: true
|
662
|
+
|
663
|
+
SingleLineBlockParams:
|
664
|
+
Description: 'Enforces the names of some block params.'
|
665
|
+
Enabled: true
|
666
|
+
|
667
|
+
SingleLineMethods:
|
668
|
+
Description: 'Avoid single-line methods.'
|
669
|
+
Enabled: true
|
670
|
+
|
671
|
+
SpaceAroundOperators:
|
672
|
+
Description: 'Use spaces around operators.'
|
673
|
+
Enabled: true
|
674
|
+
|
675
|
+
SpaceAroundBlockBraces:
|
676
|
+
Description: >
|
677
|
+
Checks that block braces have or don't have surrounding space.
|
678
|
+
For blocks taking parameters, checks that the left brace has
|
679
|
+
or doesn't have trailing space.
|
680
|
+
Enabled: true
|
681
|
+
|
682
|
+
SpaceInsideParens:
|
683
|
+
Description: 'No spaces after ( or before ).'
|
684
|
+
Enabled: true
|
685
|
+
|
686
|
+
SpaceInsideBrackets:
|
687
|
+
Description: 'No spaces after [ or before ].'
|
688
|
+
Enabled: true
|
689
|
+
|
690
|
+
SpaceAfterColon:
|
691
|
+
Description: 'Use spaces after colons.'
|
692
|
+
Enabled: true
|
693
|
+
|
694
|
+
SpaceAfterComma:
|
695
|
+
Description: 'Use spaces after commas.'
|
696
|
+
Enabled: true
|
697
|
+
|
698
|
+
SpaceAfterControlKeyword:
|
699
|
+
Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
|
700
|
+
Enabled: true
|
701
|
+
|
702
|
+
SpaceAfterMethodName:
|
703
|
+
Description: >
|
704
|
+
Never put a space between a method name and the opening
|
705
|
+
parenthesis.
|
706
|
+
Enabled: true
|
707
|
+
|
708
|
+
SpaceAfterNot:
|
709
|
+
Description: Tracks redundant space after the ! operator.
|
710
|
+
Enabled: true
|
711
|
+
|
712
|
+
SpaceAfterSemicolon:
|
713
|
+
Description: 'Use spaces after semicolons.'
|
714
|
+
Enabled: true
|
715
|
+
|
716
|
+
SpaceAroundEqualsInParameterDefault:
|
717
|
+
Description: >
|
718
|
+
Use spaces around the = operator when assigning default
|
719
|
+
values in def params.
|
720
|
+
Enabled: true
|
721
|
+
|
722
|
+
SpaceBeforeModifierKeyword:
|
723
|
+
Description: 'Put a space before the modifier keyword.'
|
724
|
+
Enabled: true
|
725
|
+
|
726
|
+
SpaceInsideHashLiteralBraces:
|
727
|
+
Description: "Use spaces inside hash literal braces - or don't."
|
728
|
+
Enabled: true
|
729
|
+
|
730
|
+
SpecialGlobalVars:
|
731
|
+
Description: 'Avoid Perl-style global variables.'
|
732
|
+
Enabled: true
|
733
|
+
|
734
|
+
StringLiterals:
|
735
|
+
Description: 'Checks if uses of quotes match the configured preference.'
|
736
|
+
Enabled: true
|
737
|
+
|
738
|
+
Tab:
|
739
|
+
Description: 'No hard tabs.'
|
740
|
+
Enabled: true
|
741
|
+
|
742
|
+
TrailingBlankLines:
|
743
|
+
Description: 'Checks for superflous trailing blank lines.'
|
744
|
+
Enabled: true
|
745
|
+
|
746
|
+
TrailingWhitespace:
|
747
|
+
Description: 'Avoid trailing whitespace.'
|
748
|
+
Enabled: true
|
749
|
+
|
750
|
+
TrivialAccessors:
|
751
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
752
|
+
Enabled: true
|
753
|
+
|
754
|
+
UnlessElse:
|
755
|
+
Description: >
|
756
|
+
Never use unless with else. Rewrite these with the positive
|
757
|
+
case first.
|
758
|
+
Enabled: true
|
759
|
+
|
760
|
+
VariableInterpolation:
|
761
|
+
Description: >
|
762
|
+
Don't interpolate global, instance and class variables
|
763
|
+
directly in strings.
|
764
|
+
Enabled: true
|
765
|
+
|
766
|
+
VariableName:
|
767
|
+
Description: 'Use the configured style when naming variables.'
|
768
|
+
Enabled: true
|
769
|
+
|
770
|
+
WhenThen:
|
771
|
+
Description: 'Use when x then ... for one-line cases.'
|
772
|
+
Enabled: true
|
773
|
+
|
774
|
+
WhileUntilModifier:
|
775
|
+
Description: >
|
776
|
+
Favor modifier while/until usage when you have a
|
777
|
+
single-line body.
|
778
|
+
Enabled: true
|
779
|
+
|
780
|
+
WordArray:
|
781
|
+
Description: 'Use %w or %W for arrays of words.'
|
782
|
+
Enabled: true
|
783
|
+
|
784
|
+
WhileUntilDo:
|
785
|
+
Description: 'Checks for redundant do after while or until.'
|
786
|
+
Enabled: true
|
787
|
+
|
788
|
+
BracesAroundHashParameters:
|
789
|
+
Description: 'Enforce braces style inside hash parameters.'
|
790
|
+
Enabled: true
|
791
|
+
|
792
|
+
#################### Lint ################################
|
793
|
+
### Warnings
|
794
|
+
|
795
|
+
AssignmentInCondition:
|
796
|
+
Description: "Don't use assignment in conditions."
|
797
|
+
Enabled: true
|
798
|
+
|
799
|
+
BlockAlignment:
|
800
|
+
Description: 'Align block ends correctly.'
|
801
|
+
Enabled: true
|
802
|
+
|
803
|
+
CommentAnnotation:
|
804
|
+
Description: >
|
805
|
+
Checks formatting of special comments
|
806
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
807
|
+
Enabled: true
|
808
|
+
|
809
|
+
Debugger:
|
810
|
+
Description: 'Check for debugger calls.'
|
811
|
+
Enabled: true
|
812
|
+
|
813
|
+
EmptyEnsure:
|
814
|
+
Description: 'Checks for empty ensure block.'
|
815
|
+
Enabled: true
|
816
|
+
|
817
|
+
EndAlignment:
|
818
|
+
Description: 'Align ends correctly.'
|
819
|
+
Enabled: true
|
820
|
+
|
821
|
+
EndInMethod:
|
822
|
+
Description: 'END blocks should not be placed inside method definitions.'
|
823
|
+
Enabled: true
|
824
|
+
|
825
|
+
LiteralInCondition:
|
826
|
+
Description: 'Checks of literals used in conditions.'
|
827
|
+
Enabled: true
|
828
|
+
|
829
|
+
ParenthesesAsGroupedExpression:
|
830
|
+
Description: >
|
831
|
+
Checks for method calls with a space before the opening
|
832
|
+
parenthesis.
|
833
|
+
Enabled: true
|
834
|
+
|
835
|
+
ShadowingOuterLocalVariable:
|
836
|
+
Description: >
|
837
|
+
Do not use the same name as outer local variable
|
838
|
+
for block arguments or block local variables.
|
839
|
+
Enabled: true
|
840
|
+
|
841
|
+
Syntax:
|
842
|
+
Description: 'Reports several basic syntax warnings and invalid syntaxes.'
|
843
|
+
Enabled: true
|
844
|
+
|
845
|
+
UnreachableCode:
|
846
|
+
Description: 'Unreachable code.'
|
847
|
+
Enabled: true
|
848
|
+
|
849
|
+
UselessAssignment:
|
850
|
+
Description: 'Checks for useless assignment to a local variable.'
|
851
|
+
Enabled: true
|
852
|
+
|
853
|
+
UselessSetterCall:
|
854
|
+
Description: 'Checks for useless setter call to a local variable.'
|
855
|
+
Enabled: true
|
856
|
+
|
857
|
+
UselessComparison:
|
858
|
+
Description: 'Checks for comparison of something with itself.'
|
859
|
+
Enabled: true
|
860
|
+
|
861
|
+
Void:
|
862
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
863
|
+
Enabled: true
|
864
|
+
|
865
|
+
##################### Rails ##################################
|
866
|
+
|
867
|
+
DefaultScope:
|
868
|
+
Description: 'Checks if the argument passed to default_scope is a block.'
|
869
|
+
Enabled: true
|
870
|
+
|
871
|
+
HasAndBelongsToMany:
|
872
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
873
|
+
Enabled: true
|
874
|
+
|
875
|
+
Output:
|
876
|
+
Description: 'Checks for calls to puts, print, etc.'
|
877
|
+
Enabled: true
|
878
|
+
|
879
|
+
ReadAttribute:
|
880
|
+
Description: 'Prefer self[:attribute] over read_attribute(:attribute).'
|
881
|
+
Enabled: true
|
882
|
+
|
883
|
+
Validation:
|
884
|
+
Description: 'Use sexy validations.'
|
885
|
+
Enabled: true
|