summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--lib/puppet/parser/collector.rb3
-rwxr-xr-xspec/unit/parser/collector.rb10
3 files changed, 10 insertions, 6 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 94d058128..01ee1815a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,8 @@
0.24.x
Fixed #1045 - Multiple metaparams all get added to resources.
+
+ Fixed #1472 -- defined, exported resources in the current compile now get expanded
+ correctly.
Fixed #1595 - Internally, Property#retrieve is no longer called
when no 'should' value is available for a resource.
diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb
index bcba9528e..0f9072510 100644
--- a/lib/puppet/parser/collector.rb
+++ b/lib/puppet/parser/collector.rb
@@ -72,7 +72,8 @@ class Puppet::Parser::Collector
def collect_exported
# First get everything from the export table. Just reuse our
# collect_virtual method but tell it to use 'exported? for the test.
- resources = collect_virtual(true).reject { |r| ! r.virtual? }
+ resources = collect_virtual(true).reject { |r| ! r.virtual? }.each { |r| r.exported = false }
+ #resources = collect_virtual(true).reject { |r| ! r.virtual? }
count = resources.length
diff --git a/spec/unit/parser/collector.rb b/spec/unit/parser/collector.rb
index 2dfae6786..ede583b96 100755
--- a/spec/unit/parser/collector.rb
+++ b/spec/unit/parser/collector.rb
@@ -234,16 +234,16 @@ describe Puppet::Parser::Collector, "when collecting exported resources" do
@collector.evaluate
end
- it "should return all matching resources from the current compile" do
+ it "should return all matching resources from the current compile and mark them non-virtual and non-exported" do
stub_rails(true)
one = stub 'one', :type => "Mytype", :virtual? => true, :exported? => true
two = stub 'two', :type => "Mytype", :virtual? => true, :exported? => true
- one.stubs(:exported=)
- one.stubs(:virtual=)
- two.stubs(:exported=)
- two.stubs(:virtual=)
+ one.expects(:exported=).with(false)
+ one.expects(:virtual=).with(false)
+ two.expects(:exported=).with(false)
+ two.expects(:virtual=).with(false)
@compiler.expects(:resources).returns([one, two])