From f1dba91bbde7919cb0a0fd412faacb1f7dd2c84d Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 27 May 2009 11:11:28 -0500 Subject: Fixing #2230 - exported resources work again This somehow got lost in the conversion from Parser resources to Puppet resources. We now copy over the 'exported' value. Signed-off-by: Luke Kanies --- lib/puppet/parser/resource.rb | 1 + spec/unit/parser/resource.rb | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index 8d5e5a359..17bf7867a 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -263,6 +263,7 @@ class Puppet::Parser::Resource result.file = self.file result.line = self.line + result.exported = self.exported result.tag(*self.tags) return result diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb index 926f613bb..e879fb315 100755 --- a/spec/unit/parser/resource.rb +++ b/spec/unit/parser/resource.rb @@ -397,6 +397,11 @@ describe Puppet::Parser::Resource do @parser_resource.to_resource.file.should == "/my/file" end + it "should copy over the 'exported' value" do + @parser_resource.exported = true + @parser_resource.to_resource.exported.should be_true + end + it "should convert any parser resource references to Puppet::Resource::Reference instances" do ref = Puppet::Parser::Resource::Reference.new(:title => "/my/file", :type => "file") @parser_resource = mkresource :source => @source, :params => {:foo => "bar", :fee => ref} -- cgit