diff options
author | Luke Kanies <luke@madstop.com> | 2009-04-24 16:24:18 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-04-24 16:27:21 -0500 |
commit | 6f8900d2931acfb96b810904572aecc675d28168 (patch) | |
tree | f89627efe11a66b5fe270bdb9f18c0224cc4d567 /lib/puppet | |
parent | 3f7cd18604e972e78bc9182e09cc4defa46b7d8d (diff) | |
download | puppet-6f8900d2931acfb96b810904572aecc675d28168.tar.gz puppet-6f8900d2931acfb96b810904572aecc675d28168.tar.xz puppet-6f8900d2931acfb96b810904572aecc675d28168.zip |
Always making sure graph edges appear first
If we don't do this, there's a chance we'll get hit
by the ruby yaml bug again.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/simple_graph.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/puppet/simple_graph.rb b/lib/puppet/simple_graph.rb index 97098325b..dacea1a9f 100644 --- a/lib/puppet/simple_graph.rb +++ b/lib/puppet/simple_graph.rb @@ -360,7 +360,17 @@ class Puppet::SimpleGraph end def to_yaml_properties - instance_variables + 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 "@edges" + result.unshift "@edges" + + result end # Just walk the tree and pass each edge. |