puppet-lint-resource_reference_syntax 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73c7049c068ecde592b71eb2cfbc542a4f0bd55d
4
- data.tar.gz: c7b2fd27e59671362db4f8e13fa59cdbca9aea9f
3
+ metadata.gz: d237aec2bf27b27da3e1ba61f593a4359128224f
4
+ data.tar.gz: 6852215c95538df3aa99ee5d8f24608a8694bd18
5
5
  SHA512:
6
- metadata.gz: ef016a2d6ad6992a427d7219cbdc3c70444498c70547f7367800c2b70f9907e4ef40c143b53034cecbd090f04ca9495e930f20a5c558beb2ab51bca9708f2414
7
- data.tar.gz: 67282c88a86427cd528de11d11b53b5de1fbb5def830646e5970f2a39aed76ad99b91681000284f1422777f021f72b996b795800ba9d496beba06a6433319df7
6
+ metadata.gz: 2fc6e4c9c1f31998d34d6f1a5b062b3ab19fe9d629e4507a8ace17622ace54610d9e2baf5c4c44c81736e0d7cf63f55965a9a6f575af67a9ea61cee1a539206e
7
+ data.tar.gz: 3f4eb2990f6012b640a4717ff44786c2c8bba2f5a5ee329cb82b1f9e8a6db3f3d72dcf7d88d2d2244957b749562ed31208ff4144ffc57df13dca099de33f16f3
@@ -6,7 +6,7 @@ PuppetLint.new_check(:resource_reference_without_title_capital) do
6
6
  }.each do |param_token|
7
7
  value_token = param_token.next_code_token.next_code_token.next_code_token.next_token
8
8
  unless value_token.type == :SSTRING
9
- unless value_token.value =~ (/^[a-z]*$/)
9
+ unless value_token.value =~ (/^[a-z_]*$/)
10
10
  notify :error, {
11
11
  :message => 'resource reference with title with capital letter',
12
12
  :line => value_token.line,
@@ -12,7 +12,6 @@ describe 'resource_reference_without_title_capital' do
12
12
  end
13
13
 
14
14
  context 'a proper reference in quotes' do
15
- let(:msg) { 'whitespce between reference type and title' }
16
15
  let(:code) { "file { 'foo': ensure => file, notify => Title['One'],}" }
17
16
 
18
17
  it 'should detect no problem' do
@@ -20,6 +19,14 @@ describe 'resource_reference_without_title_capital' do
20
19
  end
21
20
  end
22
21
 
22
+ context 'a proper reference as variable' do
23
+ let(:code) { "file { 'foo': ensure => file, notify => Title[$foo_var],}" }
24
+
25
+ it 'should detect no problem' do
26
+ expect(problems).to have(0).problem
27
+ end
28
+ end
29
+
23
30
  context 'resource reference with title as capital letter' do
24
31
  let(:msg) { 'resource reference with title with capital letter' }
25
32
  let(:code) { "file { 'foo': ensure => file, notify => Title[One],}" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-resource_reference_syntax
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Alfke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet-lint