puppet-lint-resource_reference_syntax 1.0.2 → 1.0.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d237aec2bf27b27da3e1ba61f593a4359128224f
|
4
|
+
data.tar.gz: 6852215c95538df3aa99ee5d8f24608a8694bd18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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-
|
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.
|
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-
|
11
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|