nokogiri 1.10.6-java → 1.11.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/LICENSE-DEPENDENCIES.md +1015 -947
  4. data/README.md +165 -91
  5. data/ext/java/nokogiri/HtmlDocument.java +34 -46
  6. data/ext/java/nokogiri/HtmlSaxParserContext.java +88 -58
  7. data/ext/java/nokogiri/HtmlSaxPushParser.java +1 -1
  8. data/ext/java/nokogiri/NokogiriService.java +1 -1
  9. data/ext/java/nokogiri/XmlAttr.java +13 -20
  10. data/ext/java/nokogiri/XmlAttributeDecl.java +11 -12
  11. data/ext/java/nokogiri/XmlCdata.java +3 -4
  12. data/ext/java/nokogiri/XmlComment.java +1 -1
  13. data/ext/java/nokogiri/XmlDocument.java +148 -175
  14. data/ext/java/nokogiri/XmlDocumentFragment.java +13 -31
  15. data/ext/java/nokogiri/XmlDtd.java +5 -8
  16. data/ext/java/nokogiri/XmlElement.java +1 -20
  17. data/ext/java/nokogiri/XmlElementDecl.java +23 -28
  18. data/ext/java/nokogiri/XmlEntityDecl.java +23 -27
  19. data/ext/java/nokogiri/XmlEntityReference.java +2 -2
  20. data/ext/java/nokogiri/XmlNamespace.java +72 -89
  21. data/ext/java/nokogiri/XmlNode.java +303 -406
  22. data/ext/java/nokogiri/XmlNodeSet.java +72 -77
  23. data/ext/java/nokogiri/XmlReader.java +12 -13
  24. data/ext/java/nokogiri/XmlRelaxng.java +10 -3
  25. data/ext/java/nokogiri/XmlSaxParserContext.java +15 -10
  26. data/ext/java/nokogiri/XmlSchema.java +87 -27
  27. data/ext/java/nokogiri/XmlSyntaxError.java +2 -6
  28. data/ext/java/nokogiri/XmlText.java +12 -9
  29. data/ext/java/nokogiri/XmlXpathContext.java +55 -25
  30. data/ext/java/nokogiri/XsltStylesheet.java +7 -15
  31. data/ext/java/nokogiri/internals/HtmlDomParserContext.java +52 -46
  32. data/ext/java/nokogiri/internals/NokogiriHandler.java +1 -1
  33. data/ext/java/nokogiri/internals/NokogiriHelpers.java +71 -135
  34. data/ext/java/nokogiri/internals/NokogiriNamespaceCache.java +90 -58
  35. data/ext/java/nokogiri/internals/NokogiriNamespaceContext.java +9 -2
  36. data/ext/java/nokogiri/internals/NokogiriXPathFunction.java +67 -10
  37. data/ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java +4 -2
  38. data/ext/java/nokogiri/internals/ParserContext.java +27 -73
  39. data/ext/java/nokogiri/internals/ReaderNode.java +2 -4
  40. data/ext/java/nokogiri/internals/XmlDomParserContext.java +18 -33
  41. data/ext/nokogiri/depend +476 -357
  42. data/ext/nokogiri/extconf.rb +507 -357
  43. data/ext/nokogiri/html_document.c +79 -78
  44. data/ext/nokogiri/html_sax_parser_context.c +2 -2
  45. data/ext/nokogiri/nokogiri.c +34 -40
  46. data/ext/nokogiri/xml_document.c +18 -4
  47. data/ext/nokogiri/xml_io.c +8 -6
  48. data/ext/nokogiri/xml_node.c +21 -1
  49. data/ext/nokogiri/xml_node_set.c +1 -1
  50. data/ext/nokogiri/xml_reader.c +6 -17
  51. data/ext/nokogiri/xml_relax_ng.c +29 -11
  52. data/ext/nokogiri/xml_sax_parser.c +2 -7
  53. data/ext/nokogiri/xml_sax_parser_context.c +2 -2
  54. data/ext/nokogiri/xml_schema.c +84 -13
  55. data/ext/nokogiri/xml_xpath_context.c +80 -4
  56. data/ext/nokogiri/xslt_stylesheet.c +1 -8
  57. data/lib/nokogiri.rb +22 -22
  58. data/lib/nokogiri/css.rb +1 -0
  59. data/lib/nokogiri/css/node.rb +1 -0
  60. data/lib/nokogiri/css/parser.rb +63 -62
  61. data/lib/nokogiri/css/parser.y +2 -2
  62. data/lib/nokogiri/css/parser_extras.rb +39 -36
  63. data/lib/nokogiri/css/syntax_error.rb +1 -0
  64. data/lib/nokogiri/css/tokenizer.rb +1 -0
  65. data/lib/nokogiri/css/xpath_visitor.rb +73 -43
  66. data/lib/nokogiri/decorators/slop.rb +1 -0
  67. data/lib/nokogiri/html.rb +1 -0
  68. data/lib/nokogiri/html/builder.rb +1 -0
  69. data/lib/nokogiri/html/document.rb +13 -26
  70. data/lib/nokogiri/html/document_fragment.rb +1 -0
  71. data/lib/nokogiri/html/element_description.rb +1 -0
  72. data/lib/nokogiri/html/element_description_defaults.rb +1 -0
  73. data/lib/nokogiri/html/entity_lookup.rb +1 -0
  74. data/lib/nokogiri/html/sax/parser.rb +1 -0
  75. data/lib/nokogiri/html/sax/parser_context.rb +1 -0
  76. data/lib/nokogiri/html/sax/push_parser.rb +1 -0
  77. data/lib/nokogiri/jruby/dependencies.rb +20 -0
  78. data/lib/nokogiri/nokogiri.jar +0 -0
  79. data/lib/nokogiri/syntax_error.rb +1 -0
  80. data/lib/nokogiri/version.rb +3 -109
  81. data/lib/nokogiri/version/constant.rb +5 -0
  82. data/lib/nokogiri/version/info.rb +182 -0
  83. data/lib/nokogiri/xml.rb +1 -0
  84. data/lib/nokogiri/xml/attr.rb +1 -0
  85. data/lib/nokogiri/xml/attribute_decl.rb +1 -0
  86. data/lib/nokogiri/xml/builder.rb +3 -2
  87. data/lib/nokogiri/xml/cdata.rb +1 -0
  88. data/lib/nokogiri/xml/character_data.rb +1 -0
  89. data/lib/nokogiri/xml/document.rb +20 -15
  90. data/lib/nokogiri/xml/document_fragment.rb +5 -6
  91. data/lib/nokogiri/xml/dtd.rb +1 -0
  92. data/lib/nokogiri/xml/element_content.rb +1 -0
  93. data/lib/nokogiri/xml/element_decl.rb +1 -0
  94. data/lib/nokogiri/xml/entity_decl.rb +1 -0
  95. data/lib/nokogiri/xml/entity_reference.rb +1 -0
  96. data/lib/nokogiri/xml/namespace.rb +1 -0
  97. data/lib/nokogiri/xml/node.rb +587 -249
  98. data/lib/nokogiri/xml/node/save_options.rb +1 -0
  99. data/lib/nokogiri/xml/node_set.rb +1 -0
  100. data/lib/nokogiri/xml/notation.rb +1 -0
  101. data/lib/nokogiri/xml/parse_options.rb +10 -3
  102. data/lib/nokogiri/xml/pp.rb +1 -0
  103. data/lib/nokogiri/xml/pp/character_data.rb +1 -0
  104. data/lib/nokogiri/xml/pp/node.rb +1 -0
  105. data/lib/nokogiri/xml/processing_instruction.rb +1 -0
  106. data/lib/nokogiri/xml/reader.rb +7 -3
  107. data/lib/nokogiri/xml/relax_ng.rb +7 -2
  108. data/lib/nokogiri/xml/sax.rb +1 -0
  109. data/lib/nokogiri/xml/sax/document.rb +1 -0
  110. data/lib/nokogiri/xml/sax/parser.rb +1 -0
  111. data/lib/nokogiri/xml/sax/parser_context.rb +1 -0
  112. data/lib/nokogiri/xml/sax/push_parser.rb +1 -0
  113. data/lib/nokogiri/xml/schema.rb +13 -4
  114. data/lib/nokogiri/xml/searchable.rb +25 -16
  115. data/lib/nokogiri/xml/syntax_error.rb +1 -0
  116. data/lib/nokogiri/xml/text.rb +1 -0
  117. data/lib/nokogiri/xml/xpath.rb +1 -0
  118. data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -0
  119. data/lib/nokogiri/xml/xpath_context.rb +1 -0
  120. data/lib/nokogiri/xslt.rb +1 -0
  121. data/lib/nokogiri/xslt/stylesheet.rb +1 -0
  122. data/lib/xsd/xmlparser/nokogiri.rb +1 -0
  123. metadata +92 -157
  124. data/ext/java/nokogiri/internals/NokogiriEncodingReaderWrapper.java +0 -107
  125. data/ext/java/nokogiri/internals/UncloseableInputStream.java +0 -102
  126. data/ext/nokogiri/html_document.h +0 -10
  127. data/ext/nokogiri/html_element_description.h +0 -10
  128. data/ext/nokogiri/html_entity_lookup.h +0 -8
  129. data/ext/nokogiri/html_sax_parser_context.h +0 -11
  130. data/ext/nokogiri/html_sax_push_parser.h +0 -9
  131. data/ext/nokogiri/nokogiri.h +0 -121
  132. data/ext/nokogiri/xml_attr.h +0 -9
  133. data/ext/nokogiri/xml_attribute_decl.h +0 -9
  134. data/ext/nokogiri/xml_cdata.h +0 -9
  135. data/ext/nokogiri/xml_comment.h +0 -9
  136. data/ext/nokogiri/xml_document.h +0 -23
  137. data/ext/nokogiri/xml_document_fragment.h +0 -10
  138. data/ext/nokogiri/xml_dtd.h +0 -10
  139. data/ext/nokogiri/xml_element_content.h +0 -10
  140. data/ext/nokogiri/xml_element_decl.h +0 -9
  141. data/ext/nokogiri/xml_encoding_handler.h +0 -8
  142. data/ext/nokogiri/xml_entity_decl.h +0 -10
  143. data/ext/nokogiri/xml_entity_reference.h +0 -9
  144. data/ext/nokogiri/xml_io.h +0 -11
  145. data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
  146. data/ext/nokogiri/xml_namespace.h +0 -14
  147. data/ext/nokogiri/xml_node.h +0 -13
  148. data/ext/nokogiri/xml_node_set.h +0 -12
  149. data/ext/nokogiri/xml_processing_instruction.h +0 -9
  150. data/ext/nokogiri/xml_reader.h +0 -10
  151. data/ext/nokogiri/xml_relax_ng.h +0 -9
  152. data/ext/nokogiri/xml_sax_parser.h +0 -39
  153. data/ext/nokogiri/xml_sax_parser_context.h +0 -10
  154. data/ext/nokogiri/xml_sax_push_parser.h +0 -9
  155. data/ext/nokogiri/xml_schema.h +0 -9
  156. data/ext/nokogiri/xml_syntax_error.h +0 -13
  157. data/ext/nokogiri/xml_text.h +0 -9
  158. data/ext/nokogiri/xml_xpath_context.h +0 -10
  159. data/ext/nokogiri/xslt_stylesheet.h +0 -14
  160. data/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +0 -78
  161. data/patches/libxml2/0002-Remove-script-macro-support.patch +0 -40
  162. data/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch +0 -44
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class Node
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ####
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class Notation < Struct.new(:name, :public_id, :system_id)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ###
@@ -5,11 +6,11 @@ module Nokogiri
5
6
  #
6
7
  # == Building combinations of parse options
7
8
  # You can build your own combinations of these parse options by using any of the following methods:
8
- # *Note*: All examples attempt to set the +RECOVER+ & +NOENT+ options. All examples use Ruby 2 optional parameter syntax.
9
+ # *Note*: All examples attempt to set the +RECOVER+ & +NOENT+ options.
9
10
  # [Ruby's bitwise operators] You can use the Ruby bitwise operators to set various combinations.
10
- # Nokogiri.XML('<content>Chapter 1</content', options: Nokogiri::XML::ParseOptions.new((1 << 0) | (1 << 1)))
11
+ # Nokogiri.XML('<content>Chapter 1</content', nil, nil, Nokogiri::XML::ParseOptions.new((1 << 0) | (1 << 1)))
11
12
  # [Method chaining] Every option has an equivalent method in lowercase. You can chain these methods together to set various combinations.
12
- # Nokogiri.XML('<content>Chapter 1</content', options: Nokogiri::XML::ParseOptions.new.recover.noent)
13
+ # Nokogiri.XML('<content>Chapter 1</content', nil, nil, Nokogiri::XML::ParseOptions.new.recover.noent)
13
14
  # [Using Ruby Blocks] You can also setup parse combinations in the block passed to Nokogiri.XML or Nokogiri.HTML
14
15
  # Nokogiri.XML('<content>Chapter 1</content') {|config| config.recover.noent}
15
16
  #
@@ -72,6 +73,8 @@ module Nokogiri
72
73
  DEFAULT_XML = RECOVER | NONET
73
74
  # the default options used for parsing HTML documents
74
75
  DEFAULT_HTML = RECOVER | NOERROR | NOWARNING | NONET
76
+ # the default options used for parsing XML schemas
77
+ DEFAULT_SCHEMA = NONET
75
78
 
76
79
  attr_accessor :options
77
80
  def initialize options = STRICT
@@ -106,6 +109,10 @@ module Nokogiri
106
109
  @options & RECOVER == STRICT
107
110
  end
108
111
 
112
+ def ==(other)
113
+ other.to_i == to_i
114
+ end
115
+
109
116
  alias :to_i :options
110
117
 
111
118
  def inspect
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xml/pp/node'
2
3
  require 'nokogiri/xml/pp/character_data'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module PP
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module PP
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class ProcessingInstruction < Node
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ###
@@ -87,9 +88,12 @@ module Nokogiri
87
88
  ###
88
89
  # Get a list of attributes for the current node.
89
90
  def attributes
90
- Hash[attribute_nodes.map { |node|
91
- [node.name, node.to_s]
92
- }].merge(namespaces || {})
91
+ attrs_hash = attribute_nodes.each_with_object({}) do |node, hash|
92
+ hash[node.name] = node.to_s
93
+ end
94
+ ns = namespaces
95
+ attrs_hash.merge!(ns) if ns
96
+ attrs_hash
93
97
  end
94
98
 
95
99
  ###
@@ -1,11 +1,12 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class << self
4
5
  ###
5
6
  # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+.
6
7
  # See Nokogiri::XML::RelaxNG for an example.
7
- def RelaxNG string_or_io
8
- RelaxNG.new(string_or_io)
8
+ def RelaxNG(string_or_io, options = ParseOptions::DEFAULT_SCHEMA)
9
+ RelaxNG.new(string_or_io, options)
9
10
  end
10
11
  end
11
12
 
@@ -26,6 +27,10 @@ module Nokogiri
26
27
  # end
27
28
  #
28
29
  # The list of errors are Nokogiri::XML::SyntaxError objects.
30
+ #
31
+ # NOTE: RelaxNG input is always treated as TRUSTED documents, meaning that they will cause the
32
+ # underlying parsing libraries to access network resources. This is counter to Nokogiri's
33
+ # "untrusted by default" security policy, but is a limitation of the underlying libraries.
29
34
  class RelaxNG < Nokogiri::XML::Schema
30
35
  end
31
36
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xml/sax/document'
2
3
  require 'nokogiri/xml/sax/parser_context'
3
4
  require 'nokogiri/xml/sax/parser'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module SAX
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module SAX
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module SAX
@@ -1,11 +1,12 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class << self
4
5
  ###
5
6
  # Create a new Nokogiri::XML::Schema object using a +string_or_io+
6
7
  # object.
7
- def Schema string_or_io
8
- Schema.new(string_or_io)
8
+ def Schema(string_or_io, options = ParseOptions::DEFAULT_SCHEMA)
9
+ Schema.new(string_or_io, options)
9
10
  end
10
11
  end
11
12
 
@@ -26,15 +27,23 @@ module Nokogiri
26
27
  # end
27
28
  #
28
29
  # The list of errors are Nokogiri::XML::SyntaxError objects.
30
+ #
31
+ # NOTE: As of v1.11.0, Schema treats inputs as UNTRUSTED by default, and so external entities
32
+ # are not resolved from the network (`http://` or `ftp://`). Previously, parsing treated
33
+ # documents as "trusted" by default which was counter to Nokogiri's "untrusted by default"
34
+ # security policy. If a document is trusted, then the caller may turn off the NONET option via
35
+ # the ParseOptions to re-enable external entity resolution over a network connection.
29
36
  class Schema
30
37
  # Errors while parsing the schema file
31
38
  attr_accessor :errors
39
+ # The Nokogiri::XML::ParseOptions used to parse the schema
40
+ attr_accessor :parse_options
32
41
 
33
42
  ###
34
43
  # Create a new Nokogiri::XML::Schema object using a +string_or_io+
35
44
  # object.
36
- def self.new string_or_io
37
- from_document Nokogiri::XML(string_or_io)
45
+ def self.new string_or_io, options = ParseOptions::DEFAULT_SCHEMA
46
+ from_document(Nokogiri::XML(string_or_io), options)
38
47
  end
39
48
 
40
49
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  #
@@ -11,7 +12,9 @@ module Nokogiri
11
12
  # Regular expression used by Searchable#search to determine if a query
12
13
  # string is CSS or XPath
13
14
  LOOKS_LIKE_XPATH = /^(\.\/|\/|\.\.|\.$)/
14
-
15
+
16
+ # @!group Searching via XPath or CSS Queries
17
+
15
18
  ###
16
19
  # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]
17
20
  #
@@ -45,7 +48,7 @@ module Nokogiri
45
48
  # )
46
49
  #
47
50
  # See Searchable#xpath and Searchable#css for further usage help.
48
- def search *args
51
+ def search(*args)
49
52
  paths, handler, ns, binds = extract_params(args)
50
53
 
51
54
  xpaths = paths.map(&:to_s).map do |path|
@@ -54,6 +57,7 @@ module Nokogiri
54
57
 
55
58
  xpath(*(xpaths + [ns, handler, binds].compact))
56
59
  end
60
+
57
61
  alias :/ :search
58
62
 
59
63
  ###
@@ -63,9 +67,10 @@ module Nokogiri
63
67
  # result. +paths+ must be one or more XPath or CSS queries.
64
68
  #
65
69
  # See Searchable#search for more information.
66
- def at *args
70
+ def at(*args)
67
71
  search(*args).first
68
72
  end
73
+
69
74
  alias :% :at
70
75
 
71
76
  ###
@@ -101,7 +106,7 @@ module Nokogiri
101
106
  # found in an XML document, where tags names are case-sensitive
102
107
  # (e.g., "H1" is distinct from "h1").
103
108
  #
104
- def css *args
109
+ def css(*args)
105
110
  rules, handler, ns, _ = extract_params(args)
106
111
 
107
112
  css_internal self, rules, handler, ns
@@ -114,7 +119,7 @@ module Nokogiri
114
119
  # match. +rules+ must be one or more CSS selectors.
115
120
  #
116
121
  # See Searchable#css for more information.
117
- def at_css *args
122
+ def at_css(*args)
118
123
  css(*args).first
119
124
  end
120
125
 
@@ -148,7 +153,7 @@ module Nokogiri
148
153
  # end
149
154
  # }.new)
150
155
  #
151
- def xpath *args
156
+ def xpath(*args)
152
157
  paths, handler, ns, binds = extract_params(args)
153
158
 
154
159
  xpath_internal self, paths, handler, ns, binds
@@ -161,17 +166,19 @@ module Nokogiri
161
166
  # match. +paths+ must be one or more XPath queries.
162
167
  #
163
168
  # See Searchable#xpath for more information.
164
- def at_xpath *args
169
+ def at_xpath(*args)
165
170
  xpath(*args).first
166
171
  end
167
172
 
173
+ # @!endgroup
174
+
168
175
  private
169
176
 
170
- def css_internal node, rules, handler, ns
177
+ def css_internal(node, rules, handler, ns)
171
178
  xpath_internal node, css_rules_to_xpath(rules, ns), handler, ns, nil
172
179
  end
173
180
 
174
- def xpath_internal node, paths, handler, ns, binds
181
+ def xpath_internal(node, paths, handler, ns, binds)
175
182
  document = node.document
176
183
  return NodeSet.new(document) unless document
177
184
 
@@ -186,12 +193,12 @@ module Nokogiri
186
193
  end
187
194
  end
188
195
 
189
- def xpath_impl node, path, handler, ns, binds
196
+ def xpath_impl(node, path, handler, ns, binds)
190
197
  ctx = XPathContext.new(node)
191
198
  ctx.register_namespaces(ns)
192
- path = path.gsub(/xmlns:/, ' :') unless Nokogiri.uses_libxml?
199
+ path = path.gsub(/xmlns:/, " :") unless Nokogiri.uses_libxml?
193
200
 
194
- binds.each do |key,value|
201
+ binds.each do |key, value|
195
202
  ctx.register_variable key.to_s, value
196
203
  end if binds
197
204
 
@@ -202,13 +209,15 @@ module Nokogiri
202
209
  rules.map { |rule| xpath_query_from_css_rule(rule, ns) }
203
210
  end
204
211
 
205
- def xpath_query_from_css_rule rule, ns
212
+ def xpath_query_from_css_rule(rule, ns)
213
+ visitor = Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins.new
206
214
  self.class::IMPLIED_XPATH_CONTEXTS.map do |implied_xpath_context|
207
- CSS.xpath_for(rule.to_s, :prefix => implied_xpath_context, :ns => ns)
208
- end.join(' | ')
215
+ CSS.xpath_for(rule.to_s, {:prefix => implied_xpath_context, :ns => ns,
216
+ :visitor => visitor})
217
+ end.join(" | ")
209
218
  end
210
219
 
211
- def extract_params params # :nodoc:
220
+ def extract_params(params) # :nodoc:
212
221
  handler = params.find do |param|
213
222
  ![Hash, String, Symbol].include?(param.class)
214
223
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class Text < Nokogiri::XML::CharacterData
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xml/xpath/syntax_error'
2
3
 
3
4
  module Nokogiri
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class XPath
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class XPathContext
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xslt/stylesheet'
2
3
 
3
4
  module Nokogiri
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XSLT
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri'
2
3
 
3
4
  module XSD # :nodoc:
metadata CHANGED
@@ -1,91 +1,80 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.6
4
+ version: 1.11.0
5
5
  platform: java
6
6
  authors:
7
- - Aaron Patterson
8
7
  - Mike Dalessio
8
+ - Aaron Patterson
9
9
  - Yoko Harada
10
- - Tim Elliott
11
10
  - Akinori MUSHA
12
11
  - John Shahid
12
+ - Karol Bucek
13
13
  - Lars Kanis
14
+ - Sergio Arbeo
15
+ - Timothy Elliott
16
+ - Nobuyoshi Nakada
14
17
  autorequire:
15
18
  bindir: bin
16
19
  cert_chain: []
17
- date: 2019-12-04 00:00:00.000000000 Z
20
+ date: 2021-01-04 00:00:00.000000000 Z
18
21
  dependencies:
19
22
  - !ruby/object:Gem::Dependency
20
23
  requirement: !ruby/object:Gem::Requirement
21
24
  requirements:
22
25
  - - "~>"
23
26
  - !ruby/object:Gem::Version
24
- version: '0.24'
25
- name: concourse
27
+ version: '1.4'
28
+ name: racc
29
+ type: :runtime
26
30
  prerelease: false
27
- type: :development
28
31
  version_requirements: !ruby/object:Gem::Requirement
29
32
  requirements:
30
33
  - - "~>"
31
34
  - !ruby/object:Gem::Version
32
- version: '0.24'
35
+ version: '1.4'
33
36
  - !ruby/object:Gem::Dependency
34
37
  requirement: !ruby/object:Gem::Requirement
35
38
  requirements:
36
39
  - - "~>"
37
40
  - !ruby/object:Gem::Version
38
- version: '1.2'
39
- name: hoe-bundler
40
- prerelease: false
41
+ version: '2.2'
42
+ name: bundler
41
43
  type: :development
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '1.2'
47
- - !ruby/object:Gem::Dependency
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - "~>"
51
- - !ruby/object:Gem::Version
52
- version: '2.0'
53
- name: hoe-debugging
54
44
  prerelease: false
55
- type: :development
56
45
  version_requirements: !ruby/object:Gem::Requirement
57
46
  requirements:
58
47
  - - "~>"
59
48
  - !ruby/object:Gem::Version
60
- version: '2.0'
49
+ version: '2.2'
61
50
  - !ruby/object:Gem::Dependency
62
51
  requirement: !ruby/object:Gem::Requirement
63
52
  requirements:
64
53
  - - "~>"
65
54
  - !ruby/object:Gem::Version
66
- version: '1.0'
67
- name: hoe-gemspec
68
- prerelease: false
55
+ version: '0.41'
56
+ name: concourse
69
57
  type: :development
58
+ prerelease: false
70
59
  version_requirements: !ruby/object:Gem::Requirement
71
60
  requirements:
72
61
  - - "~>"
73
62
  - !ruby/object:Gem::Version
74
- version: '1.0'
63
+ version: '0.41'
75
64
  - !ruby/object:Gem::Dependency
76
65
  requirement: !ruby/object:Gem::Requirement
77
66
  requirements:
78
67
  - - "~>"
79
68
  - !ruby/object:Gem::Version
80
- version: '1.6'
81
- name: hoe-git
82
- prerelease: false
69
+ version: '1.1'
70
+ name: hoe-markdown
83
71
  type: :development
72
+ prerelease: false
84
73
  version_requirements: !ruby/object:Gem::Requirement
85
74
  requirements:
86
75
  - - "~>"
87
76
  - !ruby/object:Gem::Version
88
- version: '1.6'
77
+ version: '1.1'
89
78
  - !ruby/object:Gem::Dependency
90
79
  requirement: !ruby/object:Gem::Requirement
91
80
  requirements:
@@ -93,8 +82,8 @@ dependencies:
93
82
  - !ruby/object:Gem::Version
94
83
  version: '5.8'
95
84
  name: minitest
96
- prerelease: false
97
85
  type: :development
86
+ prerelease: false
98
87
  version_requirements: !ruby/object:Gem::Requirement
99
88
  requirements:
100
89
  - - "~>"
@@ -105,57 +94,57 @@ dependencies:
105
94
  requirements:
106
95
  - - "~>"
107
96
  - !ruby/object:Gem::Version
108
- version: 1.4.14
109
- name: racc
110
- prerelease: false
97
+ version: '1.4'
98
+ name: minitest-reporters
111
99
  type: :development
100
+ prerelease: false
112
101
  version_requirements: !ruby/object:Gem::Requirement
113
102
  requirements:
114
103
  - - "~>"
115
104
  - !ruby/object:Gem::Version
116
- version: 1.4.14
105
+ version: '1.4'
117
106
  - !ruby/object:Gem::Dependency
118
107
  requirement: !ruby/object:Gem::Requirement
119
108
  requirements:
120
109
  - - "~>"
121
110
  - !ruby/object:Gem::Version
122
- version: '12.0'
111
+ version: '13.0'
123
112
  name: rake
124
- prerelease: false
125
113
  type: :development
114
+ prerelease: false
126
115
  version_requirements: !ruby/object:Gem::Requirement
127
116
  requirements:
128
117
  - - "~>"
129
118
  - !ruby/object:Gem::Version
130
- version: '12.0'
119
+ version: '13.0'
131
120
  - !ruby/object:Gem::Dependency
132
121
  requirement: !ruby/object:Gem::Requirement
133
122
  requirements:
134
123
  - - "~>"
135
124
  - !ruby/object:Gem::Version
136
- version: 1.0.3
125
+ version: '1.1'
137
126
  name: rake-compiler
138
- prerelease: false
139
127
  type: :development
128
+ prerelease: false
140
129
  version_requirements: !ruby/object:Gem::Requirement
141
130
  requirements:
142
131
  - - "~>"
143
132
  - !ruby/object:Gem::Version
144
- version: 1.0.3
133
+ version: '1.1'
145
134
  - !ruby/object:Gem::Dependency
146
135
  requirement: !ruby/object:Gem::Requirement
147
136
  requirements:
148
137
  - - "~>"
149
138
  - !ruby/object:Gem::Version
150
- version: 0.7.0
139
+ version: '1.1'
151
140
  name: rake-compiler-dock
152
- prerelease: false
153
141
  type: :development
142
+ prerelease: false
154
143
  version_requirements: !ruby/object:Gem::Requirement
155
144
  requirements:
156
145
  - - "~>"
157
146
  - !ruby/object:Gem::Version
158
- version: 0.7.0
147
+ version: '1.1'
159
148
  - !ruby/object:Gem::Dependency
160
149
  requirement: !ruby/object:Gem::Requirement
161
150
  requirements:
@@ -163,8 +152,8 @@ dependencies:
163
152
  - !ruby/object:Gem::Version
164
153
  version: 1.0.5
165
154
  name: rexical
166
- prerelease: false
167
155
  type: :development
156
+ prerelease: false
168
157
  version_requirements: !ruby/object:Gem::Requirement
169
158
  requirements:
170
159
  - - "~>"
@@ -175,111 +164,89 @@ dependencies:
175
164
  requirements:
176
165
  - - "~>"
177
166
  - !ruby/object:Gem::Version
178
- version: '0.73'
167
+ version: '0.88'
179
168
  name: rubocop
180
- prerelease: false
181
169
  type: :development
170
+ prerelease: false
182
171
  version_requirements: !ruby/object:Gem::Requirement
183
172
  requirements:
184
173
  - - "~>"
185
174
  - !ruby/object:Gem::Version
186
- version: '0.73'
175
+ version: '0.88'
187
176
  - !ruby/object:Gem::Dependency
188
177
  requirement: !ruby/object:Gem::Requirement
189
178
  requirements:
190
179
  - - "~>"
191
180
  - !ruby/object:Gem::Version
192
- version: '0.16'
181
+ version: '0.20'
193
182
  name: simplecov
194
- prerelease: false
195
183
  type: :development
196
- version_requirements: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - "~>"
199
- - !ruby/object:Gem::Version
200
- version: '0.16'
201
- - !ruby/object:Gem::Dependency
202
- requirement: !ruby/object:Gem::Requirement
203
- requirements:
204
- - - "~>"
205
- - !ruby/object:Gem::Version
206
- version: '4.0'
207
- name: rdoc
208
184
  prerelease: false
209
- type: :development
210
185
  version_requirements: !ruby/object:Gem::Requirement
211
186
  requirements:
212
187
  - - "~>"
213
188
  - !ruby/object:Gem::Version
214
- version: '4.0'
189
+ version: '0.20'
215
190
  - !ruby/object:Gem::Dependency
216
191
  requirement: !ruby/object:Gem::Requirement
217
192
  requirements:
218
193
  - - "~>"
219
194
  - !ruby/object:Gem::Version
220
- version: '3.16'
221
- name: hoe
222
- prerelease: false
195
+ version: '0.9'
196
+ name: yard
223
197
  type: :development
198
+ prerelease: false
224
199
  version_requirements: !ruby/object:Gem::Requirement
225
200
  requirements:
226
201
  - - "~>"
227
202
  - !ruby/object:Gem::Version
228
- version: '3.16'
229
- description: |-
230
- Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
231
- Nokogiri's many features is the ability to search documents via XPath
232
- or CSS3 selectors.
233
- email:
234
- - aaronp@rubyforge.org
235
- - mike.dalessio@gmail.com
236
- - yokolet@gmail.com
237
- - tle@holymonkey.com
238
- - knu@idaemons.org
239
- - jvshahid@gmail.com
240
- - lars@greiz-reinsdorf.de
203
+ version: '0.9'
204
+ description: |
205
+ Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a
206
+ sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is
207
+ fast and standards-compliant by relying on native parsers like libxml2 (C) and xerces (Java).
208
+ email: nokogiri-talk@googlegroups.com
241
209
  executables:
242
210
  - nokogiri
243
211
  extensions: []
244
212
  extra_rdoc_files:
245
- - LICENSE-DEPENDENCIES.md
246
- - LICENSE.md
247
- - README.md
248
- - ext/nokogiri/html_document.c
249
- - ext/nokogiri/html_element_description.c
250
- - ext/nokogiri/html_entity_lookup.c
251
- - ext/nokogiri/html_sax_parser_context.c
252
- - ext/nokogiri/html_sax_push_parser.c
253
- - ext/nokogiri/nokogiri.c
213
+ - ext/nokogiri/xml_dtd.c
214
+ - ext/nokogiri/xml_xpath_context.c
254
215
  - ext/nokogiri/xml_attr.c
255
- - ext/nokogiri/xml_attribute_decl.c
256
- - ext/nokogiri/xml_cdata.c
257
216
  - ext/nokogiri/xml_comment.c
258
- - ext/nokogiri/xml_document.c
259
- - ext/nokogiri/xml_document_fragment.c
260
- - ext/nokogiri/xml_dtd.c
217
+ - ext/nokogiri/nokogiri.c
218
+ - ext/nokogiri/xml_sax_parser_context.c
219
+ - ext/nokogiri/xml_node_set.c
220
+ - ext/nokogiri/xml_reader.c
221
+ - ext/nokogiri/xml_libxml2_hacks.c
222
+ - ext/nokogiri/xml_cdata.c
261
223
  - ext/nokogiri/xml_element_content.c
224
+ - ext/nokogiri/html_entity_lookup.c
225
+ - ext/nokogiri/xml_namespace.c
226
+ - ext/nokogiri/xml_io.c
227
+ - ext/nokogiri/xml_document.c
262
228
  - ext/nokogiri/xml_element_decl.c
229
+ - ext/nokogiri/xml_schema.c
230
+ - ext/nokogiri/html_document.c
231
+ - ext/nokogiri/xml_processing_instruction.c
232
+ - ext/nokogiri/xml_text.c
233
+ - ext/nokogiri/xml_syntax_error.c
234
+ - ext/nokogiri/xml_document_fragment.c
235
+ - ext/nokogiri/xml_sax_push_parser.c
263
236
  - ext/nokogiri/xml_encoding_handler.c
237
+ - ext/nokogiri/html_sax_push_parser.c
238
+ - ext/nokogiri/xml_relax_ng.c
264
239
  - ext/nokogiri/xml_entity_decl.c
265
- - ext/nokogiri/xml_entity_reference.c
266
- - ext/nokogiri/xml_io.c
267
- - ext/nokogiri/xml_libxml2_hacks.c
268
- - ext/nokogiri/xml_namespace.c
269
240
  - ext/nokogiri/xml_node.c
270
- - ext/nokogiri/xml_node_set.c
271
- - ext/nokogiri/xml_processing_instruction.c
272
- - ext/nokogiri/xml_reader.c
273
- - ext/nokogiri/xml_relax_ng.c
274
- - ext/nokogiri/xml_sax_parser.c
275
- - ext/nokogiri/xml_sax_parser_context.c
276
- - ext/nokogiri/xml_sax_push_parser.c
277
- - ext/nokogiri/xml_schema.c
278
- - ext/nokogiri/xml_syntax_error.c
279
- - ext/nokogiri/xml_text.c
280
- - ext/nokogiri/xml_xpath_context.c
241
+ - ext/nokogiri/xml_entity_reference.c
281
242
  - ext/nokogiri/xslt_stylesheet.c
243
+ - ext/nokogiri/html_sax_parser_context.c
244
+ - ext/nokogiri/xml_sax_parser.c
245
+ - ext/nokogiri/xml_attribute_decl.c
246
+ - ext/nokogiri/html_element_description.c
247
+ - README.md
282
248
  files:
249
+ - Gemfile
283
250
  - LICENSE-DEPENDENCIES.md
284
251
  - LICENSE.md
285
252
  - README.md
@@ -322,7 +289,6 @@ files:
322
289
  - ext/java/nokogiri/internals/IgnoreSchemaErrorsErrorHandler.java
323
290
  - ext/java/nokogiri/internals/NokogiriBlockingQueueInputStream.java
324
291
  - ext/java/nokogiri/internals/NokogiriDomParser.java
325
- - ext/java/nokogiri/internals/NokogiriEncodingReaderWrapper.java
326
292
  - ext/java/nokogiri/internals/NokogiriEntityResolver.java
327
293
  - ext/java/nokogiri/internals/NokogiriErrorHandler.java
328
294
  - ext/java/nokogiri/internals/NokogiriHandler.java
@@ -340,7 +306,6 @@ files:
340
306
  - ext/java/nokogiri/internals/ReaderNode.java
341
307
  - ext/java/nokogiri/internals/SaveContextVisitor.java
342
308
  - ext/java/nokogiri/internals/SchemaErrorHandler.java
343
- - ext/java/nokogiri/internals/UncloseableInputStream.java
344
309
  - ext/java/nokogiri/internals/XalanDTMManagerPatch.java
345
310
  - ext/java/nokogiri/internals/XmlDeclHandler.java
346
311
  - ext/java/nokogiri/internals/XmlDomParserContext.java
@@ -377,73 +342,39 @@ files:
377
342
  - ext/nokogiri/depend
378
343
  - ext/nokogiri/extconf.rb
379
344
  - ext/nokogiri/html_document.c
380
- - ext/nokogiri/html_document.h
381
345
  - ext/nokogiri/html_element_description.c
382
- - ext/nokogiri/html_element_description.h
383
346
  - ext/nokogiri/html_entity_lookup.c
384
- - ext/nokogiri/html_entity_lookup.h
385
347
  - ext/nokogiri/html_sax_parser_context.c
386
- - ext/nokogiri/html_sax_parser_context.h
387
348
  - ext/nokogiri/html_sax_push_parser.c
388
- - ext/nokogiri/html_sax_push_parser.h
389
349
  - ext/nokogiri/nokogiri.c
390
- - ext/nokogiri/nokogiri.h
391
350
  - ext/nokogiri/xml_attr.c
392
- - ext/nokogiri/xml_attr.h
393
351
  - ext/nokogiri/xml_attribute_decl.c
394
- - ext/nokogiri/xml_attribute_decl.h
395
352
  - ext/nokogiri/xml_cdata.c
396
- - ext/nokogiri/xml_cdata.h
397
353
  - ext/nokogiri/xml_comment.c
398
- - ext/nokogiri/xml_comment.h
399
354
  - ext/nokogiri/xml_document.c
400
- - ext/nokogiri/xml_document.h
401
355
  - ext/nokogiri/xml_document_fragment.c
402
- - ext/nokogiri/xml_document_fragment.h
403
356
  - ext/nokogiri/xml_dtd.c
404
- - ext/nokogiri/xml_dtd.h
405
357
  - ext/nokogiri/xml_element_content.c
406
- - ext/nokogiri/xml_element_content.h
407
358
  - ext/nokogiri/xml_element_decl.c
408
- - ext/nokogiri/xml_element_decl.h
409
359
  - ext/nokogiri/xml_encoding_handler.c
410
- - ext/nokogiri/xml_encoding_handler.h
411
360
  - ext/nokogiri/xml_entity_decl.c
412
- - ext/nokogiri/xml_entity_decl.h
413
361
  - ext/nokogiri/xml_entity_reference.c
414
- - ext/nokogiri/xml_entity_reference.h
415
362
  - ext/nokogiri/xml_io.c
416
- - ext/nokogiri/xml_io.h
417
363
  - ext/nokogiri/xml_libxml2_hacks.c
418
- - ext/nokogiri/xml_libxml2_hacks.h
419
364
  - ext/nokogiri/xml_namespace.c
420
- - ext/nokogiri/xml_namespace.h
421
365
  - ext/nokogiri/xml_node.c
422
- - ext/nokogiri/xml_node.h
423
366
  - ext/nokogiri/xml_node_set.c
424
- - ext/nokogiri/xml_node_set.h
425
367
  - ext/nokogiri/xml_processing_instruction.c
426
- - ext/nokogiri/xml_processing_instruction.h
427
368
  - ext/nokogiri/xml_reader.c
428
- - ext/nokogiri/xml_reader.h
429
369
  - ext/nokogiri/xml_relax_ng.c
430
- - ext/nokogiri/xml_relax_ng.h
431
370
  - ext/nokogiri/xml_sax_parser.c
432
- - ext/nokogiri/xml_sax_parser.h
433
371
  - ext/nokogiri/xml_sax_parser_context.c
434
- - ext/nokogiri/xml_sax_parser_context.h
435
372
  - ext/nokogiri/xml_sax_push_parser.c
436
- - ext/nokogiri/xml_sax_push_parser.h
437
373
  - ext/nokogiri/xml_schema.c
438
- - ext/nokogiri/xml_schema.h
439
374
  - ext/nokogiri/xml_syntax_error.c
440
- - ext/nokogiri/xml_syntax_error.h
441
375
  - ext/nokogiri/xml_text.c
442
- - ext/nokogiri/xml_text.h
443
376
  - ext/nokogiri/xml_xpath_context.c
444
- - ext/nokogiri/xml_xpath_context.h
445
377
  - ext/nokogiri/xslt_stylesheet.c
446
- - ext/nokogiri/xslt_stylesheet.h
447
378
  - lib/isorelax.jar
448
379
  - lib/jing.jar
449
380
  - lib/nekodtd.jar
@@ -469,9 +400,12 @@ files:
469
400
  - lib/nokogiri/html/sax/parser.rb
470
401
  - lib/nokogiri/html/sax/parser_context.rb
471
402
  - lib/nokogiri/html/sax/push_parser.rb
403
+ - lib/nokogiri/jruby/dependencies.rb
472
404
  - lib/nokogiri/nokogiri.jar
473
405
  - lib/nokogiri/syntax_error.rb
474
406
  - lib/nokogiri/version.rb
407
+ - lib/nokogiri/version/constant.rb
408
+ - lib/nokogiri/version/info.rb
475
409
  - lib/nokogiri/xml.rb
476
410
  - lib/nokogiri/xml/attr.rb
477
411
  - lib/nokogiri/xml/attribute_decl.rb
@@ -516,13 +450,15 @@ files:
516
450
  - lib/xercesImpl.jar
517
451
  - lib/xml-apis.jar
518
452
  - lib/xsd/xmlparser/nokogiri.rb
519
- - patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
520
- - patches/libxml2/0002-Remove-script-macro-support.patch
521
- - patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch
522
- homepage:
453
+ homepage: https://nokogiri.org
523
454
  licenses:
524
455
  - MIT
525
- metadata: {}
456
+ metadata:
457
+ homepage_uri: https://nokogiri.org
458
+ bug_tracker_uri: https://github.com/sparklemotion/nokogiri/issues
459
+ documentation_uri: https://nokogiri.org/rdoc/index.html
460
+ changelog_uri: https://nokogiri.org/CHANGELOG.html
461
+ source_code_uri: https://github.com/sparklemotion/nokogiri
526
462
  post_install_message:
527
463
  rdoc_options:
528
464
  - "--main"
@@ -533,16 +469,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
533
469
  requirements:
534
470
  - - ">="
535
471
  - !ruby/object:Gem::Version
536
- version: 2.3.0
472
+ version: 2.5.0
537
473
  required_rubygems_version: !ruby/object:Gem::Requirement
538
474
  requirements:
539
475
  - - ">="
540
476
  - !ruby/object:Gem::Version
541
477
  version: '0'
542
478
  requirements: []
543
- rubyforge_project:
544
- rubygems_version: 2.7.6
479
+ rubygems_version: 3.0.6
545
480
  signing_key:
546
481
  specification_version: 4
547
- summary: Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
482
+ summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
548
483
  test_files: []