puppet-lint-absolute_classname-check 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTIwMTUwMWEyZjc0NmFhM2Y3YTFmNDI5ODQ1YzhhYTQ5NWFhNWU4Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmU4ZjZiMjlkZjJiNTI2OGUwZDNlYjg5YTk1OTA4YjUyOWQ5YjEzOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDZlYjZiZDgxMTljZmNkNTkwYjc2MjUwNWVlNWY2NWZkY2IxNGE0MzYzM2Vj
|
10
|
+
ZmQ0YjZiZDlhZmRjOGUyMzFhMWFkMzM1ZmMwNDVhMTJhMGZkODEwZGI4NWQ2
|
11
|
+
MTVhMDc4ODQ5MGY2MDVlZDM3NGEwNTg1N2M3Y2U2NThhMWUzNmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjNhMzBmMzgzMTVmODhiYWVjYmZlYzM4NDFmZjcwNDBkZWQwYTRiNTM2MjJi
|
14
|
+
YzhjYzk1OTIyMjg1MmJjMjNiOTE0ZGY2ZTI5NTNlNGFhMzkyNzQ4ZmMzNDdh
|
15
|
+
OTg3MWViMjg5YWU1NThiMzQyMTc4OTZmYjQ1YzJkNTc2NzkxMzQ=
|
@@ -2,6 +2,7 @@ PuppetLint.new_check(:relative_classname_inclusion) do
|
|
2
2
|
def check
|
3
3
|
tokens.each_with_index do |token, token_idx|
|
4
4
|
if token.type == :NAME && ['include','contain','require'].include?(token.value)
|
5
|
+
next if resource_indexes.any? { |resource| resource[:tokens].include?(token) }
|
5
6
|
s = token.next_code_token
|
6
7
|
in_function = 0
|
7
8
|
while s.type != :NEWLINE
|
@@ -64,6 +64,21 @@ describe 'relative_classname_inclusion' do
|
|
64
64
|
expect(problems).to contain_warning(msg).on_line(7).in_column(17)
|
65
65
|
end
|
66
66
|
end
|
67
|
+
|
68
|
+
context 'when the require metadata parameter is used' do
|
69
|
+
let(:code) do
|
70
|
+
<<-EOS
|
71
|
+
file { '/path':
|
72
|
+
ensure => present,
|
73
|
+
require => Shellvar['http_proxy'],
|
74
|
+
}
|
75
|
+
EOS
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'should detect no problems' do
|
79
|
+
expect(problems).to have(0).problems
|
80
|
+
end
|
81
|
+
end
|
67
82
|
end
|
68
83
|
|
69
84
|
context 'with fix enabled' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint-absolute_classname-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Community
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|