[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1456-g2f0b1e5

James Turnbull james at lovedthanlost.net
Tue Oct 27 17:05:10 UTC 2009


The following commit has been merged in the upstream branch:
commit fd2a1904f61c8dc1d47445833a91e365bd8ab708
Author: Markus Roberts <Markus at reality.com>
Date:   Tue Sep 15 16:02:45 2009 -0700

    Fix for #2621 (JSON serialization of exec)
    
    Removed the array wrapping of values for JSON serialization, and
    the associated test.
    
    Signed-off-by: Markus Roberts <Markus at reality.com>

diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 1340765..3e27e0e 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -55,7 +55,6 @@ class Puppet::Resource
 
             # Don't duplicate the title as the namevar
             next hash if param == namevar and value == title
-            value = [value] unless value.is_a?(Array)
             hash[param] = value
             hash
         end
diff --git a/spec/unit/resource.rb b/spec/unit/resource.rb
index 2205619..c233dd3 100755
--- a/spec/unit/resource.rb
+++ b/spec/unit/resource.rb
@@ -422,12 +422,6 @@ describe Puppet::Resource do
             result["foo"].should == %w{bar eh}
             result["fee"].should == %w{baz}
         end
-
-        it "should set all parameter values as arrays" do
-            resource = Puppet::Resource.new("File", "/foo")
-            resource[:foo] = "bar"
-            JSON.parse(resource.to_json)["foo"].should == %w{bar}
-        end
     end
 
     describe "when converting from json" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list