Ori.livneh has submitted this change and it was merged. Change subject: ordered_yaml(): omit document header ......................................................................
ordered_yaml(): omit document header According to the YAML spec, 'If no explicit header line is specified at the start of the stream, the processor should behave as if a header line containing an unadorned “---” was specified.' (<http://yaml.org/spec/1.0/>). Since some applications barf on the document header, omit it. Change-Id: Id8163d372669b8d7fcae30e7cd40bbbbf419c7a7 --- M modules/wmflib/lib/puppet/parser/functions/ordered_json.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/wmflib/lib/puppet/parser/functions/ordered_json.rb b/modules/wmflib/lib/puppet/parser/functions/ordered_json.rb index 7cefe32..2881495 100644 --- a/modules/wmflib/lib/puppet/parser/functions/ordered_json.rb +++ b/modules/wmflib/lib/puppet/parser/functions/ordered_json.rb @@ -27,7 +27,7 @@ module Puppet::Parser::Functions {:ordered_json => :to_json, :ordered_yaml => :to_yaml}.each do |func, method| newfunction(func, :type => :rvalue, :arity => 1) do |args| - sort_keys_recursive(args.first).send(method) + sort_keys_recursive(args.first).send(method).gsub(/^---\s*/, '') << "\n" end end end -- To view, visit https://gerrit.wikimedia.org/r/153970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id8163d372669b8d7fcae30e7cd40bbbbf419c7a7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh <[email protected]> Gerrit-Reviewer: Ori.livneh <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
