From e75f591deed4b1884bb7cc2fc9338285b085d2b2 Mon Sep 17 00:00:00 2001
From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
Date: Thu, 31 Dec 2020 07:00:47 +0000
Subject: [PATCH] brew vendor-gems: commit updates.
---
.../Homebrew/vendor/bundle/bundler/setup.rb | 2 +-
.../gems/plist-3.5.0/lib/plist/generator.rb | 230 ------------------
.../{plist-3.5.0 => plist-3.6.0}/lib/plist.rb | 6 +-
.../gems/plist-3.6.0/lib/plist/generator.rb | 180 ++++++++++++++
.../lib/plist/parser.rb | 17 +-
.../lib/plist/version.rb | 2 +-
6 files changed, 199 insertions(+), 238 deletions(-)
delete mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/generator.rb
rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{plist-3.5.0 => plist-3.6.0}/lib/plist.rb (72%)
create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/generator.rb
rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{plist-3.5.0 => plist-3.6.0}/lib/plist/parser.rb (90%)
rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{plist-3.5.0 => plist-3.6.0}/lib/plist/version.rb (57%)
diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb
index f6b2da3963..0ba589cb33 100644
--- a/Library/Homebrew/vendor/bundle/bundler/setup.rb
+++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb
@@ -52,7 +52,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.6189/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parlour-4.0.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/patchelf-1.3.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/pry-0.13.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rack-2.2.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-20/2.6.0/rdiscount-2.2.0.2"
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/generator.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/generator.rb
deleted file mode 100644
index fb67f6701c..0000000000
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/generator.rb
+++ /dev/null
@@ -1,230 +0,0 @@
-# encoding: utf-8
-
-# = plist
-#
-# Copyright 2006-2010 Ben Bleything and Patrick May
-# Distributed under the MIT License
-#
-
-module Plist
- # === Create a plist
- # You can dump an object to a plist in one of two ways:
- #
- # * Plist::Emit.dump(obj)
- # * obj.to_plist
- # * This requires that you mixin the Plist::Emit module, which is already done for +Array+ and +Hash+.
- #
- # The following Ruby classes are converted into native plist types:
- # Array, Bignum, Date, DateTime, Fixnum, Float, Hash, Integer, String, Symbol, Time, true, false
- # * +Array+ and +Hash+ are both recursive; their elements will be converted into plist nodes inside the and containers (respectively).
- # * +IO+ (and its descendants) and +StringIO+ objects are read from and their contents placed in a element.
- # * User classes may implement +to_plist_node+ to dictate how they should be serialized; otherwise the object will be passed to Marshal.dump and the result placed in a element.
- #
- # For detailed usage instructions, refer to USAGE[link:files/docs/USAGE.html] and the methods documented below.
- module Emit
- DEFAULT_INDENT = "\t"
-
- # Helper method for injecting into classes. Calls Plist::Emit.dump with +self+.
- def to_plist(envelope = true, options = {})
- options = { :indent => DEFAULT_INDENT }.merge(options)
- return Plist::Emit.dump(self, envelope, options)
- end
-
- # Helper method for injecting into classes. Calls Plist::Emit.save_plist with +self+.
- def save_plist(filename, options = {})
- options = { :indent => DEFAULT_INDENT }.merge(options)
- Plist::Emit.save_plist(self, filename, options)
- end
-
- # The following Ruby classes are converted into native plist types:
- # Array, Bignum, Date, DateTime, Fixnum, Float, Hash, Integer, String, Symbol, Time
- #
- # Write us (via RubyForge) if you think another class can be coerced safely into one of the expected plist classes.
- #
- # +IO+ and +StringIO+ objects are encoded and placed in elements; other objects are Marshal.dump'ed unless they implement +to_plist_node+.
- #
- # The +envelope+ parameters dictates whether or not the resultant plist fragment is wrapped in the normal XML/plist header and footer. Set it to false if you only want the fragment.
- def self.dump(obj, envelope = true, options = {})
- options = { :indent => DEFAULT_INDENT }.merge(options)
- output = plist_node(obj, options)
-
- output = wrap(output) if envelope
-
- return output
- end
-
- # Writes the serialized object's plist to the specified filename.
- def self.save_plist(obj, filename, options = {})
- options = { :indent => DEFAULT_INDENT }.merge(options)
- File.open(filename, 'wb') do |f|
- f.write(obj.to_plist(true, options))
- end
- end
-
- private
- def self.plist_node(element, options = {})
- options = { :indent => DEFAULT_INDENT }.merge(options)
- output = ''
-
- if element.respond_to? :to_plist_node
- output << element.to_plist_node
- else
- case element
- when Array
- if element.empty?
- output << "\n"
- else
- output << tag('array', '', options) {
- element.collect {|e| plist_node(e, options)}
- }
- end
- when Hash
- if element.empty?
- output << "\n"
- else
- inner_tags = []
-
- element.keys.sort_by{|k| k.to_s }.each do |k|
- v = element[k]
- inner_tags << tag('key', CGI.escapeHTML(k.to_s), options)
- inner_tags << plist_node(v, options)
- end
-
- output << tag('dict', '', options) {
- inner_tags
- }
- end
- when true, false
- output << "<#{element}/>\n"
- when Time
- output << tag('date', element.utc.strftime('%Y-%m-%dT%H:%M:%SZ'), options)
- when Date # also catches DateTime
- output << tag('date', element.strftime('%Y-%m-%dT%H:%M:%SZ'), options)
- when String, Symbol, Integer, Float
- output << tag(element_type(element), CGI.escapeHTML(element.to_s), options)
- when IO, StringIO
- element.rewind
- contents = element.read
- # note that apple plists are wrapped at a different length then
- # what ruby's base64 wraps by default.
- # I used #encode64 instead of #b64encode (which allows a length arg)
- # because b64encode is b0rked and ignores the length arg.
- data = "\n"
- Base64.encode64(contents).gsub(/\s+/, '').scan(/.{1,68}/o) { data << $& << "\n" }
- output << tag('data', data, options)
- else
- output << comment('The element below contains a Ruby object which has been serialized with Marshal.dump.')
- data = "\n"
- Base64.encode64(Marshal.dump(element)).gsub(/\s+/, '').scan(/.{1,68}/o) { data << $& << "\n" }
- output << tag('data', data, options)
- end
- end
-
- return output
- end
-
- def self.comment(content)
- return "\n"
- end
-
- def self.tag(type, contents = '', options = {}, &block)
- options = { :indent => DEFAULT_INDENT }.merge(options)
- out = nil
-
- if block_given?
- out = IndentedString.new(options[:indent])
- out << "<#{type}>"
- out.raise_indent
-
- out << block.call
-
- out.lower_indent
- out << "#{type}>"
- else
- out = "<#{type}>#{contents.to_s}#{type}>\n"
- end
-
- return out.to_s
- end
-
- def self.wrap(contents)
- output = ''
-
- output << '' + "\n"
- output << '' + "\n"
- output << '' + "\n"
-
- output << contents
-
- output << '' + "\n"
-
- return output
- end
-
- def self.element_type(item)
- case item
- when String, Symbol
- 'string'
-
- when Integer
- 'integer'
-
- when Float
- 'real'
-
- else
- raise "Don't know about this data type... something must be wrong!"
- end
- end
- private
- class IndentedString #:nodoc:
- attr_accessor :indent_string
-
- def initialize(str = "\t")
- @indent_string = str
- @contents = ''
- @indent_level = 0
- end
-
- def to_s
- return @contents
- end
-
- def raise_indent
- @indent_level += 1
- end
-
- def lower_indent
- @indent_level -= 1 if @indent_level > 0
- end
-
- def <<(val)
- if val.is_a? Array
- val.each do |f|
- self << f
- end
- else
- # if it's already indented, don't bother indenting further
- unless val =~ /\A#{@indent_string}/
- indent = @indent_string * @indent_level
-
- @contents << val.gsub(/^/, indent)
- else
- @contents << val
- end
-
- # it already has a newline, don't add another
- @contents << "\n" unless val =~ /\n$/
- end
- end
- end
- end
-end
-
-class Array #:nodoc:
- include Plist::Emit
-end
-
-class Hash #:nodoc:
- include Plist::Emit
-end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist.rb
similarity index 72%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist.rb
index 5c0635116f..2304992dfa 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist.rb
@@ -13,6 +13,6 @@ require 'base64'
require 'cgi'
require 'stringio'
-require 'plist/generator'
-require 'plist/parser'
-require 'plist/version'
+require_relative 'plist/generator'
+require_relative 'plist/parser'
+require_relative 'plist/version'
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/generator.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/generator.rb
new file mode 100644
index 0000000000..0b8af54b3f
--- /dev/null
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/generator.rb
@@ -0,0 +1,180 @@
+# encoding: utf-8
+
+# = plist
+#
+# Copyright 2006-2010 Ben Bleything and Patrick May
+# Distributed under the MIT License
+#
+
+module Plist
+ # === Create a plist
+ # You can dump an object to a plist in one of two ways:
+ #
+ # * Plist::Emit.dump(obj)
+ # * obj.to_plist
+ # * This requires that you mixin the Plist::Emit module, which is already done for +Array+ and +Hash+.
+ #
+ # The following Ruby classes are converted into native plist types:
+ # Array, Bignum, Date, DateTime, Fixnum, Float, Hash, Integer, String, Symbol, Time, true, false
+ # * +Array+ and +Hash+ are both recursive; their elements will be converted into plist nodes inside the and containers (respectively).
+ # * +IO+ (and its descendants) and +StringIO+ objects are read from and their contents placed in a element.
+ # * User classes may implement +to_plist_node+ to dictate how they should be serialized; otherwise the object will be passed to Marshal.dump and the result placed in a element.
+ #
+ # For detailed usage instructions, refer to USAGE[link:files/docs/USAGE.html] and the methods documented below.
+ module Emit
+ DEFAULT_INDENT = "\t"
+
+ # Helper method for injecting into classes. Calls Plist::Emit.dump with +self+.
+ def to_plist(envelope = true, options = {})
+ Plist::Emit.dump(self, envelope, options)
+ end
+
+ # Helper method for injecting into classes. Calls Plist::Emit.save_plist with +self+.
+ def save_plist(filename, options = {})
+ Plist::Emit.save_plist(self, filename, options)
+ end
+
+ # The following Ruby classes are converted into native plist types:
+ # Array, Bignum, Date, DateTime, Fixnum, Float, Hash, Integer, String, Symbol, Time
+ #
+ # Write us (via RubyForge) if you think another class can be coerced safely into one of the expected plist classes.
+ #
+ # +IO+ and +StringIO+ objects are encoded and placed in elements; other objects are Marshal.dump'ed unless they implement +to_plist_node+.
+ #
+ # The +envelope+ parameters dictates whether or not the resultant plist fragment is wrapped in the normal XML/plist header and footer. Set it to false if you only want the fragment.
+ def self.dump(obj, envelope = true, options = {})
+ options = { :indent => DEFAULT_INDENT }.merge(options)
+
+ output = PlistBuilder.new(options[:indent]).build(obj)
+ output = wrap(output) if envelope
+
+ output
+ end
+
+ # Writes the serialized object's plist to the specified filename.
+ def self.save_plist(obj, filename, options = {})
+ File.open(filename, 'wb') do |f|
+ f.write(obj.to_plist(true, options))
+ end
+ end
+
+ private
+
+ class PlistBuilder
+ def initialize(indent_str)
+ @indent_str = indent_str.to_s
+ end
+
+ def build(element, level=0)
+ if element.respond_to? :to_plist_node
+ element.to_plist_node
+ else
+ case element
+ when Array
+ if element.empty?
+ tag('array', nil, level)
+ else
+ tag('array', nil, level) {
+ element.collect {|e| build(e, level + 1) }.join
+ }
+ end
+ when Hash
+ if element.empty?
+ tag('dict', nil, level)
+ else
+ tag('dict', '', level) do
+ element.sort_by{|k,v| k.to_s }.collect do |k,v|
+ tag('key', CGI.escapeHTML(k.to_s), level + 1) +
+ build(v, level + 1)
+ end.join
+ end
+ end
+ when true, false
+ tag(element, nil, level)
+ when Time
+ tag('date', element.utc.strftime('%Y-%m-%dT%H:%M:%SZ'), level)
+ when Date # also catches DateTime
+ tag('date', element.strftime('%Y-%m-%dT%H:%M:%SZ'), level)
+ when String, Symbol, Integer, Float
+ tag(element_type(element), CGI.escapeHTML(element.to_s), level)
+ when IO, StringIO
+ data = element.tap(&:rewind).read
+ data_tag(data, level)
+ else
+ data = Marshal.dump(element)
+ comment_tag('The element below contains a Ruby object which has been serialized with Marshal.dump.') +
+ data_tag(data, level)
+ end
+ end
+ end
+
+ private
+
+ def tag(type, contents, level, &block)
+ if block_given?
+ indent("<#{type}>\n", level) +
+ block.call +
+ indent("#{type}>\n", level)
+ elsif contents.to_s.empty?
+ indent("<#{type}/>\n", level)
+ else
+ indent("<#{type}>#{contents.to_s}#{type}>\n", level)
+ end
+ end
+
+ def data_tag(data, level)
+ # note that apple plists are wrapped at a different length then
+ # what ruby's base64 wraps by default.
+ # I used #encode64 instead of #b64encode (which allows a length arg)
+ # because b64encode is b0rked and ignores the length arg.
+ tag('data', nil, level) do
+ Base64.encode64(data)
+ .gsub(/\s+/, '')
+ .scan(/.{1,68}/o)
+ .collect { |line| indent(line, level) }
+ .join("\n")
+ .concat("\n")
+ end
+ end
+
+ def indent(str, level)
+ @indent_str.to_s * level + str
+ end
+
+ def element_type(item)
+ case item
+ when String, Symbol
+ 'string'
+ when Integer
+ 'integer'
+ when Float
+ 'real'
+ else
+ raise "Don't know about this data type... something must be wrong!"
+ end
+ end
+
+ def comment_tag(content)
+ return "\n"
+ end
+ end
+
+ def self.wrap(contents)
+ output = '' + "\n"
+ output << '' + "\n"
+ output << '' + "\n"
+ output << contents
+ output << '' + "\n"
+
+ output
+ end
+ end
+end
+
+class Array #:nodoc:
+ include Plist::Emit
+end
+
+class Hash #:nodoc:
+ include Plist::Emit
+end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/parser.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/parser.rb
similarity index 90%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/parser.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/parser.rb
index c4fd32fa6e..f325988b05 100755
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/parser.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/parser.rb
@@ -13,6 +13,9 @@
#
# r = Plist.parse_xml(filename_or_xml)
module Plist
+ # Raised when an element is not implemented
+ class UnimplementedElementError < RuntimeError; end
+
# Note that I don't use these two elements much:
#
# + Date elements are returned as DateTime objects.
@@ -46,7 +49,10 @@ module Plist
end
def text(contents)
- @open.last.text = contents if @open.last
+ if @open.last
+ @open.last.text ||= ''
+ @open.last.text.concat(contents)
+ end
end
def tag_end(name)
@@ -72,11 +78,14 @@ module Plist
@listener = listener
end
- TEXT = /([^<]+)/
+ TEXT = /([^<]+)/
+ CDATA = //
XMLDECL_PATTERN = /<\?xml\s+(.*?)\?>*/m
DOCTYPE_PATTERN = /\s*)/m
COMMENT_START = /\A/m
+ UNIMPLEMENTED_ERROR = 'Unimplemented element. ' \
+ 'Consider reporting via https://github.com/patsplat/plist/issues'
def parse
plist_tags = PTag.mappings.keys.join('|')
@@ -105,10 +114,12 @@ module Plist
end
elsif @scanner.scan(TEXT)
@listener.text(@scanner[1])
+ elsif @scanner.scan(CDATA)
+ @listener.text(@scanner[1])
elsif @scanner.scan(end_tag)
@listener.tag_end(@scanner[1])
else
- raise "Unimplemented element"
+ raise UnimplementedElementError.new(UNIMPLEMENTED_ERROR)
end
end
end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/version.rb
similarity index 57%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/version.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/version.rb
index b3fa5297cf..936004a70b 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.5.0/lib/plist/version.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/plist-3.6.0/lib/plist/version.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
module Plist
- VERSION = '3.5.0'.freeze
+ VERSION = '3.6.0'.freeze
end