summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/defaults.rb2
-rw-r--r--lib/puppet/resource.rb8
-rwxr-xr-xspec/integration/defaults.rb4
-rwxr-xr-xspec/unit/resource.rb4
4 files changed, 5 insertions, 13 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 8743f859d..a2ccd8a05 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -490,7 +490,7 @@ module Puppet
authority requests. It's a separate server because it cannot
and does not need to horizontally scale."],
:ca_port => ["$masterport", "The port to use for the certificate authority."],
- :preferred_serialization_format => ["yaml", "The preferred means of serializing
+ :preferred_serialization_format => ["json", "The preferred means of serializing
ruby instances for passing over the wire. This won't guarantee that all
instances will be serialized using this method, since not all classes
can be guaranteed to support this format, but it will be used for all
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 862aadf99..0de089cd7 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -68,14 +68,6 @@ class Puppet::Resource
'json_class' => self.class.name,
'data' => data
}
- #data.each do |key, value|
- # puts "Converting %s (%s)" % [key, value.inspect]
- # p value
- # value.to_json(*args)
- # key.to_json(*args)
- #end
- #puts "Converted all"
- #p res
res.to_json(*args)
end
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb
index 2d51a3cbc..a7c330509 100755
--- a/spec/integration/defaults.rb
+++ b/spec/integration/defaults.rb
@@ -73,6 +73,10 @@ describe "Puppet defaults" do
end
end
+ it "should default to json for the preferred serialization format" do
+ Puppet.settings.value(:preferred_serialization_format).should == "json"
+ end
+
describe "when enabling storeconfigs" do
before do
Puppet::Resource::Catalog.stubs(:cache_class=)
diff --git a/spec/unit/resource.rb b/spec/unit/resource.rb
index c993f8d98..2205619c5 100755
--- a/spec/unit/resource.rb
+++ b/spec/unit/resource.rb
@@ -452,10 +452,6 @@ describe Puppet::Resource do
Puppet::Resource.from_json(@data).title.should == "yay"
end
- it "should set its title to the provided title" do
- Puppet::Resource.from_json(@data).title.should == "yay"
- end
-
it "should tag the resource with any provided tags" do
@data['tags'] = %w{foo bar}
resource = Puppet::Resource.from_json(@data)