[Pkg-puppet-devel] [facter] 210/352: (fact-81) Use Emit.dump rather than to_plist

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit b6a0a65a34192a1e8b2755e528cbffd7d00a251c
Author: Kylo Ginsberg <kylo at puppetlabs.com>
Date:   Wed Feb 5 11:42:57 2014 -0800

    (fact-81) Use Emit.dump rather than to_plist
    
    See https://github.com/puppetlabs/facter/pull/499 and the linked
    redmine tickets for backstory. The basic issue here is that
    CFPropertyList monkey-patches some core ruby classes with a
    to_plist method, which defaults to returning binary data. This
    code was originally written to the vendored CFPropertyList
    previously included in facter (but unvendored in fact-94),
    which provided a different to_plist implementation returning
    text data.
    
    This commit avoids the conflicting to_plist implementations by
    calling its own dump method, thus no change in behavior.
---
 lib/facter/util/plist/generator.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/facter/util/plist/generator.rb b/lib/facter/util/plist/generator.rb
index 8f9ea3a..6cbc4b3 100644
--- a/lib/facter/util/plist/generator.rb
+++ b/lib/facter/util/plist/generator.rb
@@ -51,7 +51,7 @@ module Plist
     # Writes the serialized object's plist to the specified filename.
     def self.save_plist(obj, filename)
       File.open(filename, 'wb') do |f|
-        f.write(obj.to_plist)
+        f.write(Plist::Emit.dump(obj))
       end
     end
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list