This is required for Rails support.

Signed-off-by: Luke Kanies <[email protected]>
---
 lib/puppet/resource.rb |    6 +++++-
 spec/unit/resource.rb  |    7 +++++++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 50663cb..7082e26 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -7,7 +7,7 @@ require 'puppet/resource/reference'
 class Puppet::Resource
     include Puppet::Util::Tagging
     include Enumerable
-    attr_accessor :type, :title, :file, :line, :catalog
+    attr_accessor :type, :title, :file, :line, :catalog, :exported
 
     # Proxy these methods to the parameters hash.  It's likely they'll
     # be overridden at some point, but this works for now.
@@ -44,6 +44,10 @@ class Puppet::Resource
         @parameters.each { |p,v| yield p, v }
     end
 
+    def exported?
+        exported
+    end
+
     # Create our resource.
     def initialize(type, title, parameters = {})
         @reference = Puppet::Resource::Reference.new(type, title)
diff --git a/spec/unit/resource.rb b/spec/unit/resource.rb
index 141986f..5d838b2 100755
--- a/spec/unit/resource.rb
+++ b/spec/unit/resource.rb
@@ -82,6 +82,13 @@ describe Puppet::Resource do
         Puppet::Resource.ancestors.should be_include(Puppet::Util::Tagging)
     end
 
+    it "should have an 'exported' attribute" do
+        resource = Puppet::Resource.new("file", "/f")
+        resource.exported = true
+        resource.exported.should == true
+        resource.should be_exported
+    end
+
     describe "when managing parameters" do
         before do
             @resource = Puppet::Resource.new("file", "/my/file")
-- 
1.6.1


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to