[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5

James Turnbull james at lovedthanlost.net
Wed Apr 8 21:48:01 UTC 2009


The following commit has been merged in the master branch:
commit 5c644352714f1363e262115357297ad68be49103
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date:   Thu Jan 29 20:17:33 2009 +0100

    Rails serialization module to help serialize/unserialize some Puppet Objects
    
    Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>

diff --git a/lib/puppet/util/rails/reference_serializer.rb b/lib/puppet/util/rails/reference_serializer.rb
new file mode 100644
index 0000000..8c4f1aa
--- /dev/null
+++ b/lib/puppet/util/rails/reference_serializer.rb
@@ -0,0 +1,18 @@
+
+module Puppet::Util::ReferenceSerializer
+    def unserialize_value(val)
+        if val =~ /^--- [!:]/
+            YAML.load(val)
+        else
+            val
+        end
+    end
+
+    def serialize_value(val)
+        if val.is_a?(Puppet::Parser::Resource::Reference)
+            YAML.dump(val)
+        else
+            val
+        end
+    end
+end
\ No newline at end of file

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list