diff options
author | Luke Kanies <luke@madstop.com> | 2009-05-27 11:11:28 -0500 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-06-03 07:33:33 +1000 |
commit | f1dba91bbde7919cb0a0fd412faacb1f7dd2c84d (patch) | |
tree | 30e6982b71c46b56a320bedfe3cca9c4d2c09f80 | |
parent | 5522eb85a041d9ec77cf8c2b04f3351f48716246 (diff) | |
download | puppet-f1dba91bbde7919cb0a0fd412faacb1f7dd2c84d.tar.gz puppet-f1dba91bbde7919cb0a0fd412faacb1f7dd2c84d.tar.xz puppet-f1dba91bbde7919cb0a0fd412faacb1f7dd2c84d.zip |
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 <luke@madstop.com>
-rw-r--r-- | lib/puppet/parser/resource.rb | 1 | ||||
-rwxr-xr-x | spec/unit/parser/resource.rb | 5 |
2 files changed, 6 insertions, 0 deletions
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} |