[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:23 UTC 2009


The following commit has been merged in the master branch:
commit a3bb201bd4c964ab4f68e00895b692d9d9585407
Author: Luke Kanies <luke at madstop.com>
Date:   Fri Mar 6 18:11:33 2009 -0600

    Fixing change printing when list properties are absent
    
    They were throwing an exception when the 'is' value
    was 'absent'.
    
    Signed-off-by: Luke Kanies <luke at madstop.com>

diff --git a/lib/puppet/property/list.rb b/lib/puppet/property/list.rb
index 0c933f1..b7db8b4 100644
--- a/lib/puppet/property/list.rb
+++ b/lib/puppet/property/list.rb
@@ -10,7 +10,11 @@ module Puppet
             end
 
             def is_to_s(currentvalue)
-                currentvalue.join(delimiter)
+                if currentvalue == :absent
+                    return "absent"
+                else
+                    return currentvalue.join(delimiter)
+                end
             end
 
             def membership
diff --git a/spec/unit/property/list.rb b/spec/unit/property/list.rb
index 2fab868..854ab48 100644
--- a/spec/unit/property/list.rb
+++ b/spec/unit/property/list.rb
@@ -36,6 +36,10 @@ describe list_class do
             @property.is_to_s(["foo","bar"]).should == "foo,bar"
         end
 
+        it "should be able to correctly convert ':absent' to a string" do
+            @property.is_to_s(:absent).should == "absent"
+        end
+
         describe "when adding should to current" do
             it "should add the arrays when current is an array" do
                 @property.add_should_with_current(["foo"], ["bar"]).should == ["foo", "bar"]

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list