puppet 4.5.1 → 4.5.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/lib/puppet/parser/functions/create_resources.rb +2 -1
- data/lib/puppet/pops/parser/egrammar.ra +4 -0
- data/lib/puppet/pops/parser/eparser.rb +952 -942
- data/lib/puppet/version.rb +1 -1
- data/spec/unit/parser/functions/create_resources_spec.rb +9 -0
- data/spec/unit/pops/parser/parse_calls_spec.rb +8 -0
- metadata +2 -2
data/lib/puppet/version.rb
CHANGED
@@ -75,6 +75,15 @@ describe 'function for dynamically creating resources' do
|
|
75
75
|
expect(rg.path_between(test,foo)).to be
|
76
76
|
end
|
77
77
|
|
78
|
+
it 'should filter out undefined edges as they cause errors' do
|
79
|
+
rg = compile_to_relationship_graph("notify { test: }\n create_resources('notify', {'foo'=>{'require'=>undef}})")
|
80
|
+
test = rg.vertices.find { |v| v.title == 'test' }
|
81
|
+
foo = rg.vertices.find { |v| v.title == 'foo' }
|
82
|
+
expect(test).to be
|
83
|
+
expect(foo).to be
|
84
|
+
expect(rg.path_between(foo,nil)).to_not be
|
85
|
+
end
|
86
|
+
|
78
87
|
it 'should account for default values' do
|
79
88
|
catalog = compile_to_catalog("create_resources('file', {'/etc/foo'=>{'ensure'=>'present'}, '/etc/baz'=>{'group'=>'food'}}, {'group' => 'bar'})")
|
80
89
|
expect(catalog.resource(:file, "/etc/foo")['group']).to eq('bar')
|
@@ -103,6 +103,14 @@ describe "egrammar parsing function calls" do
|
|
103
103
|
")))"
|
104
104
|
].join("\n"))
|
105
105
|
end
|
106
|
+
|
107
|
+
it "notice 42.type()" do
|
108
|
+
expect(dump(parse("notice 42.type()"))).to eq('(invoke notice (call-method (. 42 type)))')
|
109
|
+
end
|
110
|
+
|
111
|
+
it "notice 42.type(detailed)" do
|
112
|
+
expect(dump(parse("notice 42.type(detailed)"))).to eq('(invoke notice (call-method (. 42 type) detailed))')
|
113
|
+
end
|
106
114
|
end
|
107
115
|
|
108
116
|
context "When parsing an illegal argument list" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-06-
|
12
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: facter
|