Created
April 21, 2009 22:01
-
-
Save lak/99422 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb | |
index 88aa951..cb0ce03 100644 | |
--- a/lib/puppet/resource/catalog.rb | |
+++ b/lib/puppet/resource/catalog.rb | |
@@ -416,6 +416,20 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph | |
super | |
end | |
+ def to_yaml_properties | |
+ result = instance_variables | |
+ | |
+ # There's a ruby bug that hits us without this: | |
+ # http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886 | |
+ # We need our resources to show up in as values in a hash | |
+ # before they show up as keys, because otherwise | |
+ # the loading fails. | |
+ result.delete "@resource_table" | |
+ result.unshift "@resource_table" | |
+ | |
+ result | |
+ end | |
+ | |
private | |
def cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment