+1 /me so smart
On Sep 15, 2009, at 4:04 PM, Markus Roberts wrote: > > Removed the array wrapping of values for JSON serialization, and > the associated test. > > Signed-off-by: Markus Roberts <[email protected]> > --- > lib/puppet/resource.rb | 1 - > spec/unit/resource.rb | 6 ------ > 2 files changed, 0 insertions(+), 7 deletions(-) > > 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 > -- > 1.6.4 > > > > -- On Bureaucracy.... The Pythagorean theorem contains 24 words. Archimedes Principle, 67. The Ten Commandments, 179. The American Declaration of Independence, 300. And recent legislation in Europe concerning when and where to smoke, 23,942. -- The European, June 23-29, 1995 --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
