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
- ZWFiZTQ2YzViNWJkYTQ5ZjAwMjIzMzc0NGY5Y2U0YjliNTIzMzU1ZA==
4
+ NTIwMTUwMWEyZjc0NmFhM2Y3YTFmNDI5ODQ1YzhhYTQ5NWFhNWU4Mg==
5
5
  data.tar.gz: !binary |-
6
- MzU1NTRiYjIxNmM1MTMxZTEzZjAxZTNkMTlmYzE3MmEyMWRiNzA5ZQ==
6
+ MmU4ZjZiMjlkZjJiNTI2OGUwZDNlYjg5YTk1OTA4YjUyOWQ5YjEzOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjA3NTNlYTY2NDIxOTkwNjc2ZTQ3YTU1ZDg2OWI2MjBlOWE4ZjI0NDdmNDBj
10
- NjA2ZDkzMTZlN2UyMjU1NDczNjQ4NzU2ZjQ0MzRkNmNjOWI1YzA1NzU4NmM2
11
- YmE1OGQ2MzFlNTZjODU2YzgzNDg3ZjFhZDg0MmQ4ZWIzZjcxMmQ=
9
+ MDZlYjZiZDgxMTljZmNkNTkwYjc2MjUwNWVlNWY2NWZkY2IxNGE0MzYzM2Vj
10
+ ZmQ0YjZiZDlhZmRjOGUyMzFhMWFkMzM1ZmMwNDVhMTJhMGZkODEwZGI4NWQ2
11
+ MTVhMDc4ODQ5MGY2MDVlZDM3NGEwNTg1N2M3Y2U2NThhMWUzNmQ=
12
12
  data.tar.gz: !binary |-
13
- ZGY5NzA2YjhjZTU0MWY0YzhiNTI2MTMzODQ4NjZkODAwMDM4Y2MzNWE0ZGMx
14
- YTBmNjM1OWRlNzBkOWJkYzViYWRiNGM3YTA3MTFlYzNiMzJmNTU2MDYzY2Jl
15
- NTcyNGEzMzc4ZWY0YmVlODZhODc5YzJiMzc4Yzg3MzllZjQ2MzQ=
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.1
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-22 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet-lint