puppet-lint 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/puppet-lint.rb
CHANGED
@@ -30,6 +30,13 @@ class PuppetLint::Plugins::CheckWhitespace < PuppetLint::CheckPlugin
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# SHOULD align fat comma arrows (=>) within blocks of attributes
|
33
|
+
if in_selector
|
34
|
+
if line.strip =~ /\}[,;]?$/
|
35
|
+
in_selector = false
|
36
|
+
selector_indent_length = 0
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
33
40
|
if line =~ /^( +\w+ +)=>/
|
34
41
|
line_indent = $1
|
35
42
|
if in_resource
|
data/puppet-lint.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'puppet-lint'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.3'
|
4
4
|
s.homepage = 'https://github.com/rodjek/puppet-lint/'
|
5
5
|
s.summary = 'Ensure your Puppet manifests conform with the Puppetlabs style guide'
|
6
6
|
s.description = 'Checks your Puppet manifests against the Puppetlabs
|
@@ -47,4 +47,18 @@ describe PuppetLint::Plugins::CheckWhitespace do
|
|
47
47
|
its(:warnings) { should be_empty }
|
48
48
|
its(:errors) { should be_empty }
|
49
49
|
end
|
50
|
+
|
51
|
+
describe 'selector inside a resource' do
|
52
|
+
let(:code) { "
|
53
|
+
ensure => $ensure ? {
|
54
|
+
present => directory,
|
55
|
+
absent => undef,
|
56
|
+
},
|
57
|
+
owner => 'foo4',
|
58
|
+
group => 'foo4',
|
59
|
+
mode => '0755'," }
|
60
|
+
|
61
|
+
its(:warnings) { should be_empty }
|
62
|
+
its(:errors) { should be_empty }
|
63
|
+
end
|
50
64
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tim Sharpe
|