brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2023-02-22 18:14:20 +00:00
parent 25f604f86f
commit be7319bd98
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
5 changed files with 20 additions and 13 deletions

View File

@ -81,7 +81,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.10461/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.10461/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parlour-8.1.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parlour-8.1.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.4.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.4.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.6.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pry-0.14.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pry-0.14.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rack-3.0.4.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rack-3.0.4.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unparser-0.6.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unparser-0.6.4/lib")

View File

@ -26,8 +26,13 @@ module Plist
# can't be parsed into a Time object, please create an issue # can't be parsed into a Time object, please create an issue
# attaching your plist file at https://github.com/patsplat/plist/issues # attaching your plist file at https://github.com/patsplat/plist/issues
# so folks can implement the proper support. # so folks can implement the proper support.
def self.parse_xml(filename_or_xml) #
listener = Listener.new # By default, <data> will be assumed to be a marshaled Ruby object and
# interpreted with <tt>Marshal.load</tt>. Pass <tt>marshal: false</tt>
# to disable this behavior and return the raw binary data as an IO
# object instead.
def self.parse_xml(filename_or_xml, options={})
listener = Listener.new(options)
# parser = REXML::Parsers::StreamParser.new(File.new(filename), listener) # parser = REXML::Parsers::StreamParser.new(File.new(filename), listener)
parser = StreamParser.new(filename_or_xml, listener) parser = StreamParser.new(filename_or_xml, listener)
parser.parse parser.parse
@ -39,13 +44,14 @@ module Plist
attr_accessor :result, :open attr_accessor :result, :open
def initialize def initialize(options={})
@result = nil @result = nil
@open = [] @open = []
@options = { :marshal => true }.merge(options).freeze
end end
def tag_start(name, attributes) def tag_start(name, attributes)
@open.push PTag.mappings[name].new @open.push PTag.mappings[name].new(@options)
end end
def text(contents) def text(contents)
@ -154,9 +160,10 @@ module Plist
mappings[key] = sub_class mappings[key] = sub_class
end end
attr_accessor :text, :children attr_accessor :text, :children, :options
def initialize def initialize(options)
@children = [] @children = []
@options = options
end end
def to_ruby def to_ruby
@ -244,13 +251,13 @@ module Plist
def to_ruby def to_ruby
data = Base64.decode64(text.gsub(/\s+/, '')) unless text.nil? data = Base64.decode64(text.gsub(/\s+/, '')) unless text.nil?
begin begin
return Marshal.load(data) return Marshal.load(data) if options[:marshal]
rescue Exception rescue Exception
end
io = StringIO.new io = StringIO.new
io.write data io.write data
io.rewind io.rewind
return io io
end
end end
end end
end end

View File

@ -1,5 +1,5 @@
# encoding: utf-8 # encoding: utf-8
module Plist module Plist
VERSION = '3.6.0'.freeze VERSION = '3.7.0'.freeze
end end