nokogiri 1.11.0.rc1-java → 1.11.2-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/LICENSE-DEPENDENCIES.md +1015 -947
  4. data/LICENSE.md +1 -1
  5. data/README.md +171 -94
  6. data/ext/java/nokogiri/EncodingHandler.java +78 -59
  7. data/ext/java/nokogiri/HtmlDocument.java +137 -114
  8. data/ext/java/nokogiri/HtmlElementDescription.java +104 -87
  9. data/ext/java/nokogiri/HtmlEntityLookup.java +31 -26
  10. data/ext/java/nokogiri/HtmlSaxParserContext.java +220 -192
  11. data/ext/java/nokogiri/HtmlSaxPushParser.java +164 -139
  12. data/ext/java/nokogiri/NokogiriService.java +597 -526
  13. data/ext/java/nokogiri/XmlAttr.java +120 -96
  14. data/ext/java/nokogiri/XmlAttributeDecl.java +97 -76
  15. data/ext/java/nokogiri/XmlCdata.java +35 -26
  16. data/ext/java/nokogiri/XmlComment.java +48 -37
  17. data/ext/java/nokogiri/XmlDocument.java +642 -540
  18. data/ext/java/nokogiri/XmlDocumentFragment.java +127 -107
  19. data/ext/java/nokogiri/XmlDtd.java +450 -384
  20. data/ext/java/nokogiri/XmlElement.java +25 -18
  21. data/ext/java/nokogiri/XmlElementContent.java +345 -286
  22. data/ext/java/nokogiri/XmlElementDecl.java +126 -95
  23. data/ext/java/nokogiri/XmlEntityDecl.java +121 -97
  24. data/ext/java/nokogiri/XmlEntityReference.java +51 -42
  25. data/ext/java/nokogiri/XmlNamespace.java +177 -145
  26. data/ext/java/nokogiri/XmlNode.java +1843 -1590
  27. data/ext/java/nokogiri/XmlNodeSet.java +361 -299
  28. data/ext/java/nokogiri/XmlProcessingInstruction.java +49 -39
  29. data/ext/java/nokogiri/XmlReader.java +513 -418
  30. data/ext/java/nokogiri/XmlRelaxng.java +92 -72
  31. data/ext/java/nokogiri/XmlSaxParserContext.java +330 -280
  32. data/ext/java/nokogiri/XmlSaxPushParser.java +229 -190
  33. data/ext/java/nokogiri/XmlSchema.java +335 -210
  34. data/ext/java/nokogiri/XmlSyntaxError.java +113 -87
  35. data/ext/java/nokogiri/XmlText.java +57 -46
  36. data/ext/java/nokogiri/XmlXpathContext.java +242 -178
  37. data/ext/java/nokogiri/XsltStylesheet.java +282 -239
  38. data/ext/java/nokogiri/internals/ClosedStreamException.java +5 -2
  39. data/ext/java/nokogiri/internals/HtmlDomParserContext.java +203 -160
  40. data/ext/java/nokogiri/internals/IgnoreSchemaErrorsErrorHandler.java +17 -10
  41. data/ext/java/nokogiri/internals/NokogiriBlockingQueueInputStream.java +43 -16
  42. data/ext/java/nokogiri/internals/NokogiriDomParser.java +65 -50
  43. data/ext/java/nokogiri/internals/NokogiriEntityResolver.java +107 -88
  44. data/ext/java/nokogiri/internals/NokogiriErrorHandler.java +25 -18
  45. data/ext/java/nokogiri/internals/NokogiriHandler.java +316 -254
  46. data/ext/java/nokogiri/internals/NokogiriHelpers.java +738 -622
  47. data/ext/java/nokogiri/internals/NokogiriNamespaceCache.java +186 -143
  48. data/ext/java/nokogiri/internals/NokogiriNamespaceContext.java +81 -59
  49. data/ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler.java +66 -49
  50. data/ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler4NekoHtml.java +86 -69
  51. data/ext/java/nokogiri/internals/NokogiriStrictErrorHandler.java +44 -29
  52. data/ext/java/nokogiri/internals/NokogiriXPathFunction.java +121 -48
  53. data/ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java +34 -22
  54. data/ext/java/nokogiri/internals/NokogiriXPathVariableResolver.java +25 -17
  55. data/ext/java/nokogiri/internals/NokogiriXsltErrorListener.java +57 -42
  56. data/ext/java/nokogiri/internals/ParserContext.java +206 -179
  57. data/ext/java/nokogiri/internals/ReaderNode.java +478 -371
  58. data/ext/java/nokogiri/internals/SaveContextVisitor.java +822 -707
  59. data/ext/java/nokogiri/internals/SchemaErrorHandler.java +28 -19
  60. data/ext/java/nokogiri/internals/XalanDTMManagerPatch.java +129 -123
  61. data/ext/java/nokogiri/internals/XmlDeclHandler.java +5 -4
  62. data/ext/java/nokogiri/internals/XmlDomParserContext.java +208 -177
  63. data/ext/java/nokogiri/internals/XmlSaxParser.java +24 -17
  64. data/ext/java/nokogiri/internals/c14n/AttrCompare.java +71 -68
  65. data/ext/java/nokogiri/internals/c14n/C14nHelper.java +137 -118
  66. data/ext/java/nokogiri/internals/c14n/CanonicalFilter.java +27 -21
  67. data/ext/java/nokogiri/internals/c14n/CanonicalizationException.java +74 -61
  68. data/ext/java/nokogiri/internals/c14n/Canonicalizer.java +230 -205
  69. data/ext/java/nokogiri/internals/c14n/Canonicalizer11.java +572 -547
  70. data/ext/java/nokogiri/internals/c14n/Canonicalizer11_OmitComments.java +17 -10
  71. data/ext/java/nokogiri/internals/c14n/Canonicalizer11_WithComments.java +17 -10
  72. data/ext/java/nokogiri/internals/c14n/Canonicalizer20010315.java +323 -302
  73. data/ext/java/nokogiri/internals/c14n/Canonicalizer20010315Excl.java +232 -219
  74. data/ext/java/nokogiri/internals/c14n/Canonicalizer20010315ExclOmitComments.java +22 -15
  75. data/ext/java/nokogiri/internals/c14n/Canonicalizer20010315ExclWithComments.java +23 -16
  76. data/ext/java/nokogiri/internals/c14n/Canonicalizer20010315OmitComments.java +23 -16
  77. data/ext/java/nokogiri/internals/c14n/Canonicalizer20010315WithComments.java +22 -15
  78. data/ext/java/nokogiri/internals/c14n/CanonicalizerBase.java +575 -545
  79. data/ext/java/nokogiri/internals/c14n/CanonicalizerPhysical.java +141 -120
  80. data/ext/java/nokogiri/internals/c14n/CanonicalizerSpi.java +39 -38
  81. data/ext/java/nokogiri/internals/c14n/Constants.java +13 -10
  82. data/ext/java/nokogiri/internals/c14n/ElementProxy.java +279 -247
  83. data/ext/java/nokogiri/internals/c14n/HelperNodeList.java +66 -53
  84. data/ext/java/nokogiri/internals/c14n/IgnoreAllErrorHandler.java +44 -37
  85. data/ext/java/nokogiri/internals/c14n/InclusiveNamespaces.java +135 -120
  86. data/ext/java/nokogiri/internals/c14n/InvalidCanonicalizerException.java +59 -48
  87. data/ext/java/nokogiri/internals/c14n/NameSpaceSymbTable.java +384 -334
  88. data/ext/java/nokogiri/internals/c14n/NodeFilter.java +25 -24
  89. data/ext/java/nokogiri/internals/c14n/UtfHelpper.java +151 -140
  90. data/ext/java/nokogiri/internals/c14n/XMLUtils.java +456 -423
  91. data/ext/java/nokogiri/internals/dom2dtm/DOM2DTM.java +1466 -1500
  92. data/ext/java/nokogiri/internals/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java +626 -570
  93. data/ext/nokogiri/depend +37 -358
  94. data/ext/nokogiri/extconf.rb +585 -374
  95. data/ext/nokogiri/html_document.c +78 -82
  96. data/ext/nokogiri/html_element_description.c +84 -71
  97. data/ext/nokogiri/html_entity_lookup.c +21 -16
  98. data/ext/nokogiri/html_sax_parser_context.c +69 -66
  99. data/ext/nokogiri/html_sax_push_parser.c +42 -34
  100. data/ext/nokogiri/libxml2_backwards_compat.c +121 -0
  101. data/ext/nokogiri/nokogiri.c +192 -93
  102. data/ext/nokogiri/test_global_handlers.c +40 -0
  103. data/ext/nokogiri/xml_attr.c +15 -15
  104. data/ext/nokogiri/xml_attribute_decl.c +18 -18
  105. data/ext/nokogiri/xml_cdata.c +13 -18
  106. data/ext/nokogiri/xml_comment.c +19 -26
  107. data/ext/nokogiri/xml_document.c +225 -163
  108. data/ext/nokogiri/xml_document_fragment.c +13 -15
  109. data/ext/nokogiri/xml_dtd.c +54 -48
  110. data/ext/nokogiri/xml_element_content.c +30 -27
  111. data/ext/nokogiri/xml_element_decl.c +22 -22
  112. data/ext/nokogiri/xml_encoding_handler.c +17 -11
  113. data/ext/nokogiri/xml_entity_decl.c +32 -30
  114. data/ext/nokogiri/xml_entity_reference.c +16 -18
  115. data/ext/nokogiri/xml_namespace.c +56 -49
  116. data/ext/nokogiri/xml_node.c +338 -286
  117. data/ext/nokogiri/xml_node_set.c +168 -156
  118. data/ext/nokogiri/xml_processing_instruction.c +17 -19
  119. data/ext/nokogiri/xml_reader.c +195 -172
  120. data/ext/nokogiri/xml_relax_ng.c +52 -28
  121. data/ext/nokogiri/xml_sax_parser.c +118 -118
  122. data/ext/nokogiri/xml_sax_parser_context.c +103 -86
  123. data/ext/nokogiri/xml_sax_push_parser.c +36 -27
  124. data/ext/nokogiri/xml_schema.c +111 -34
  125. data/ext/nokogiri/xml_syntax_error.c +42 -21
  126. data/ext/nokogiri/xml_text.c +13 -17
  127. data/ext/nokogiri/xml_xpath_context.c +206 -123
  128. data/ext/nokogiri/xslt_stylesheet.c +158 -161
  129. data/lib/nokogiri.rb +4 -8
  130. data/lib/nokogiri/css/parser.rb +62 -62
  131. data/lib/nokogiri/css/parser.y +2 -2
  132. data/lib/nokogiri/css/parser_extras.rb +38 -36
  133. data/lib/nokogiri/css/xpath_visitor.rb +70 -42
  134. data/lib/nokogiri/extension.rb +26 -0
  135. data/lib/nokogiri/html/document.rb +12 -26
  136. data/lib/nokogiri/html/document_fragment.rb +15 -15
  137. data/lib/nokogiri/nokogiri.jar +0 -0
  138. data/lib/nokogiri/version.rb +2 -148
  139. data/lib/nokogiri/version/constant.rb +5 -0
  140. data/lib/nokogiri/version/info.rb +205 -0
  141. data/lib/nokogiri/xml/builder.rb +2 -2
  142. data/lib/nokogiri/xml/document.rb +48 -18
  143. data/lib/nokogiri/xml/document_fragment.rb +4 -6
  144. data/lib/nokogiri/xml/node.rb +599 -279
  145. data/lib/nokogiri/xml/parse_options.rb +6 -0
  146. data/lib/nokogiri/xml/reader.rb +2 -9
  147. data/lib/nokogiri/xml/relax_ng.rb +6 -2
  148. data/lib/nokogiri/xml/schema.rb +12 -4
  149. data/lib/nokogiri/xml/searchable.rb +24 -16
  150. data/lib/nokogiri/xml/xpath.rb +1 -3
  151. data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -1
  152. metadata +87 -158
  153. data/ext/nokogiri/html_document.h +0 -10
  154. data/ext/nokogiri/html_element_description.h +0 -10
  155. data/ext/nokogiri/html_entity_lookup.h +0 -8
  156. data/ext/nokogiri/html_sax_parser_context.h +0 -11
  157. data/ext/nokogiri/html_sax_push_parser.h +0 -9
  158. data/ext/nokogiri/nokogiri.h +0 -122
  159. data/ext/nokogiri/xml_attr.h +0 -9
  160. data/ext/nokogiri/xml_attribute_decl.h +0 -9
  161. data/ext/nokogiri/xml_cdata.h +0 -9
  162. data/ext/nokogiri/xml_comment.h +0 -9
  163. data/ext/nokogiri/xml_document.h +0 -23
  164. data/ext/nokogiri/xml_document_fragment.h +0 -10
  165. data/ext/nokogiri/xml_dtd.h +0 -10
  166. data/ext/nokogiri/xml_element_content.h +0 -10
  167. data/ext/nokogiri/xml_element_decl.h +0 -9
  168. data/ext/nokogiri/xml_encoding_handler.h +0 -8
  169. data/ext/nokogiri/xml_entity_decl.h +0 -10
  170. data/ext/nokogiri/xml_entity_reference.h +0 -9
  171. data/ext/nokogiri/xml_io.c +0 -61
  172. data/ext/nokogiri/xml_io.h +0 -11
  173. data/ext/nokogiri/xml_libxml2_hacks.c +0 -112
  174. data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
  175. data/ext/nokogiri/xml_namespace.h +0 -14
  176. data/ext/nokogiri/xml_node.h +0 -13
  177. data/ext/nokogiri/xml_node_set.h +0 -12
  178. data/ext/nokogiri/xml_processing_instruction.h +0 -9
  179. data/ext/nokogiri/xml_reader.h +0 -10
  180. data/ext/nokogiri/xml_relax_ng.h +0 -9
  181. data/ext/nokogiri/xml_sax_parser.h +0 -39
  182. data/ext/nokogiri/xml_sax_parser_context.h +0 -10
  183. data/ext/nokogiri/xml_sax_push_parser.h +0 -9
  184. data/ext/nokogiri/xml_schema.h +0 -9
  185. data/ext/nokogiri/xml_syntax_error.h +0 -13
  186. data/ext/nokogiri/xml_text.h +0 -9
  187. data/ext/nokogiri/xml_xpath_context.h +0 -10
  188. data/ext/nokogiri/xslt_stylesheet.h +0 -14
@@ -73,6 +73,8 @@ module Nokogiri
73
73
  DEFAULT_XML = RECOVER | NONET
74
74
  # the default options used for parsing HTML documents
75
75
  DEFAULT_HTML = RECOVER | NOERROR | NOWARNING | NONET
76
+ # the default options used for parsing XML schemas
77
+ DEFAULT_SCHEMA = NONET
76
78
 
77
79
  attr_accessor :options
78
80
  def initialize options = STRICT
@@ -107,6 +109,10 @@ module Nokogiri
107
109
  @options & RECOVER == STRICT
108
110
  end
109
111
 
112
+ def ==(other)
113
+ other.to_i == to_i
114
+ end
115
+
110
116
  alias :to_i :options
111
117
 
112
118
  def inspect
@@ -86,7 +86,8 @@ module Nokogiri
86
86
  private :initialize
87
87
 
88
88
  ###
89
- # Get a list of attributes for the current node.
89
+ # Get the attributes of the current node as a Hash
90
+ # @return [Hash<String, String>] Attribute names and values
90
91
  def attributes
91
92
  attrs_hash = attribute_nodes.each_with_object({}) do |node, hash|
92
93
  hash[node.name] = node.to_s
@@ -96,14 +97,6 @@ module Nokogiri
96
97
  attrs_hash
97
98
  end
98
99
 
99
- ###
100
- # Get a list of attributes for the current node
101
- def attribute_nodes
102
- nodes = attr_nodes
103
- nodes.each { |v| v.instance_variable_set(:@_r, self) }
104
- nodes
105
- end
106
-
107
100
  ###
108
101
  # Move the cursor through the document yielding the cursor to the block
109
102
  def each
@@ -5,8 +5,8 @@ module Nokogiri
5
5
  ###
6
6
  # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+.
7
7
  # See Nokogiri::XML::RelaxNG for an example.
8
- def RelaxNG string_or_io
9
- RelaxNG.new(string_or_io)
8
+ def RelaxNG(string_or_io, options = ParseOptions::DEFAULT_SCHEMA)
9
+ RelaxNG.new(string_or_io, options)
10
10
  end
11
11
  end
12
12
 
@@ -27,6 +27,10 @@ module Nokogiri
27
27
  # end
28
28
  #
29
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.
30
34
  class RelaxNG < Nokogiri::XML::Schema
31
35
  end
32
36
  end
@@ -5,8 +5,8 @@ module Nokogiri
5
5
  ###
6
6
  # Create a new Nokogiri::XML::Schema object using a +string_or_io+
7
7
  # object.
8
- def Schema string_or_io
9
- Schema.new(string_or_io)
8
+ def Schema(string_or_io, options = ParseOptions::DEFAULT_SCHEMA)
9
+ Schema.new(string_or_io, options)
10
10
  end
11
11
  end
12
12
 
@@ -27,15 +27,23 @@ module Nokogiri
27
27
  # end
28
28
  #
29
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.
30
36
  class Schema
31
37
  # Errors while parsing the schema file
32
38
  attr_accessor :errors
39
+ # The Nokogiri::XML::ParseOptions used to parse the schema
40
+ attr_accessor :parse_options
33
41
 
34
42
  ###
35
43
  # Create a new Nokogiri::XML::Schema object using a +string_or_io+
36
44
  # object.
37
- def self.new string_or_io
38
- 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)
39
47
  end
40
48
 
41
49
  ###
@@ -12,7 +12,9 @@ module Nokogiri
12
12
  # Regular expression used by Searchable#search to determine if a query
13
13
  # string is CSS or XPath
14
14
  LOOKS_LIKE_XPATH = /^(\.\/|\/|\.\.|\.$)/
15
-
15
+
16
+ # @!group Searching via XPath or CSS Queries
17
+
16
18
  ###
17
19
  # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]
18
20
  #
@@ -46,7 +48,7 @@ module Nokogiri
46
48
  # )
47
49
  #
48
50
  # See Searchable#xpath and Searchable#css for further usage help.
49
- def search *args
51
+ def search(*args)
50
52
  paths, handler, ns, binds = extract_params(args)
51
53
 
52
54
  xpaths = paths.map(&:to_s).map do |path|
@@ -55,6 +57,7 @@ module Nokogiri
55
57
 
56
58
  xpath(*(xpaths + [ns, handler, binds].compact))
57
59
  end
60
+
58
61
  alias :/ :search
59
62
 
60
63
  ###
@@ -64,9 +67,10 @@ module Nokogiri
64
67
  # result. +paths+ must be one or more XPath or CSS queries.
65
68
  #
66
69
  # See Searchable#search for more information.
67
- def at *args
70
+ def at(*args)
68
71
  search(*args).first
69
72
  end
73
+
70
74
  alias :% :at
71
75
 
72
76
  ###
@@ -102,7 +106,7 @@ module Nokogiri
102
106
  # found in an XML document, where tags names are case-sensitive
103
107
  # (e.g., "H1" is distinct from "h1").
104
108
  #
105
- def css *args
109
+ def css(*args)
106
110
  rules, handler, ns, _ = extract_params(args)
107
111
 
108
112
  css_internal self, rules, handler, ns
@@ -115,7 +119,7 @@ module Nokogiri
115
119
  # match. +rules+ must be one or more CSS selectors.
116
120
  #
117
121
  # See Searchable#css for more information.
118
- def at_css *args
122
+ def at_css(*args)
119
123
  css(*args).first
120
124
  end
121
125
 
@@ -149,7 +153,7 @@ module Nokogiri
149
153
  # end
150
154
  # }.new)
151
155
  #
152
- def xpath *args
156
+ def xpath(*args)
153
157
  paths, handler, ns, binds = extract_params(args)
154
158
 
155
159
  xpath_internal self, paths, handler, ns, binds
@@ -162,17 +166,19 @@ module Nokogiri
162
166
  # match. +paths+ must be one or more XPath queries.
163
167
  #
164
168
  # See Searchable#xpath for more information.
165
- def at_xpath *args
169
+ def at_xpath(*args)
166
170
  xpath(*args).first
167
171
  end
168
172
 
173
+ # @!endgroup
174
+
169
175
  private
170
176
 
171
- def css_internal node, rules, handler, ns
177
+ def css_internal(node, rules, handler, ns)
172
178
  xpath_internal node, css_rules_to_xpath(rules, ns), handler, ns, nil
173
179
  end
174
180
 
175
- def xpath_internal node, paths, handler, ns, binds
181
+ def xpath_internal(node, paths, handler, ns, binds)
176
182
  document = node.document
177
183
  return NodeSet.new(document) unless document
178
184
 
@@ -187,12 +193,12 @@ module Nokogiri
187
193
  end
188
194
  end
189
195
 
190
- def xpath_impl node, path, handler, ns, binds
196
+ def xpath_impl(node, path, handler, ns, binds)
191
197
  ctx = XPathContext.new(node)
192
198
  ctx.register_namespaces(ns)
193
- path = path.gsub(/xmlns:/, ' :') unless Nokogiri.uses_libxml?
199
+ path = path.gsub(/xmlns:/, " :") unless Nokogiri.uses_libxml?
194
200
 
195
- binds.each do |key,value|
201
+ binds.each do |key, value|
196
202
  ctx.register_variable key.to_s, value
197
203
  end if binds
198
204
 
@@ -203,13 +209,15 @@ module Nokogiri
203
209
  rules.map { |rule| xpath_query_from_css_rule(rule, ns) }
204
210
  end
205
211
 
206
- def xpath_query_from_css_rule rule, ns
212
+ def xpath_query_from_css_rule(rule, ns)
213
+ visitor = Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins.new
207
214
  self.class::IMPLIED_XPATH_CONTEXTS.map do |implied_xpath_context|
208
- CSS.xpath_for(rule.to_s, :prefix => implied_xpath_context, :ns => ns)
209
- end.join(' | ')
215
+ CSS.xpath_for(rule.to_s, {:prefix => implied_xpath_context, :ns => ns,
216
+ :visitor => visitor})
217
+ end.join(" | ")
210
218
  end
211
219
 
212
- def extract_params params # :nodoc:
220
+ def extract_params(params) # :nodoc:
213
221
  handler = params.find do |param|
214
222
  ![Hash, String, Symbol].include?(param.class)
215
223
  end
@@ -3,9 +3,7 @@ require 'nokogiri/xml/xpath/syntax_error'
3
3
 
4
4
  module Nokogiri
5
5
  module XML
6
- class XPath
7
- # The Nokogiri::XML::Document tied to this XPath instance
8
- attr_accessor :document
6
+ module XPath
9
7
  end
10
8
  end
11
9
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  module Nokogiri
3
3
  module XML
4
- class XPath
4
+ module XPath
5
5
  class SyntaxError < XML::SyntaxError
6
6
  def to_s
7
7
  [super.chomp, str1].compact.join(': ')
metadata CHANGED
@@ -1,105 +1,80 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0.rc1
4
+ version: 1.11.2
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: 2020-02-02 00:00:00.000000000 Z
20
+ date: 2021-03-11 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.30'
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.30'
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: '3.18'
39
- name: hoe
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: '3.18'
47
- - !ruby/object:Gem::Dependency
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - "~>"
51
- - !ruby/object:Gem::Version
52
- version: '1.2'
53
- name: hoe-bundler
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: '1.2'
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: '2.0'
67
- name: hoe-debugging
68
- prerelease: false
55
+ version: '0.41'
56
+ name: concourse
69
57
  type: :development
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '2.0'
75
- - !ruby/object:Gem::Dependency
76
- requirement: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: '1.0'
81
- name: hoe-gemspec
82
58
  prerelease: false
83
- type: :development
84
59
  version_requirements: !ruby/object:Gem::Requirement
85
60
  requirements:
86
61
  - - "~>"
87
62
  - !ruby/object:Gem::Version
88
- version: '1.0'
63
+ version: '0.41'
89
64
  - !ruby/object:Gem::Dependency
90
65
  requirement: !ruby/object:Gem::Requirement
91
66
  requirements:
92
67
  - - "~>"
93
68
  - !ruby/object:Gem::Version
94
- version: '1.6'
95
- name: hoe-git
96
- prerelease: false
69
+ version: '1.4'
70
+ name: hoe-markdown
97
71
  type: :development
72
+ prerelease: false
98
73
  version_requirements: !ruby/object:Gem::Requirement
99
74
  requirements:
100
75
  - - "~>"
101
76
  - !ruby/object:Gem::Version
102
- version: '1.6'
77
+ version: '1.4'
103
78
  - !ruby/object:Gem::Dependency
104
79
  requirement: !ruby/object:Gem::Requirement
105
80
  requirements:
@@ -107,8 +82,8 @@ dependencies:
107
82
  - !ruby/object:Gem::Version
108
83
  version: '5.8'
109
84
  name: minitest
110
- prerelease: false
111
85
  type: :development
86
+ prerelease: false
112
87
  version_requirements: !ruby/object:Gem::Requirement
113
88
  requirements:
114
89
  - - "~>"
@@ -119,15 +94,15 @@ dependencies:
119
94
  requirements:
120
95
  - - "~>"
121
96
  - !ruby/object:Gem::Version
122
- version: 1.4.14
123
- name: racc
124
- prerelease: false
97
+ version: '1.4'
98
+ name: minitest-reporters
125
99
  type: :development
100
+ prerelease: false
126
101
  version_requirements: !ruby/object:Gem::Requirement
127
102
  requirements:
128
103
  - - "~>"
129
104
  - !ruby/object:Gem::Version
130
- version: 1.4.14
105
+ version: '1.4'
131
106
  - !ruby/object:Gem::Dependency
132
107
  requirement: !ruby/object:Gem::Requirement
133
108
  requirements:
@@ -135,8 +110,8 @@ dependencies:
135
110
  - !ruby/object:Gem::Version
136
111
  version: '13.0'
137
112
  name: rake
138
- prerelease: false
139
113
  type: :development
114
+ prerelease: false
140
115
  version_requirements: !ruby/object:Gem::Requirement
141
116
  requirements:
142
117
  - - "~>"
@@ -149,8 +124,8 @@ dependencies:
149
124
  - !ruby/object:Gem::Version
150
125
  version: '1.1'
151
126
  name: rake-compiler
152
- prerelease: false
153
127
  type: :development
128
+ prerelease: false
154
129
  version_requirements: !ruby/object:Gem::Requirement
155
130
  requirements:
156
131
  - - "~>"
@@ -161,15 +136,15 @@ dependencies:
161
136
  requirements:
162
137
  - - "~>"
163
138
  - !ruby/object:Gem::Version
164
- version: '1.0'
139
+ version: '1.1'
165
140
  name: rake-compiler-dock
166
- prerelease: false
167
141
  type: :development
142
+ prerelease: false
168
143
  version_requirements: !ruby/object:Gem::Requirement
169
144
  requirements:
170
145
  - - "~>"
171
146
  - !ruby/object:Gem::Version
172
- version: '1.0'
147
+ version: '1.1'
173
148
  - !ruby/object:Gem::Dependency
174
149
  requirement: !ruby/object:Gem::Requirement
175
150
  requirements:
@@ -177,8 +152,8 @@ dependencies:
177
152
  - !ruby/object:Gem::Version
178
153
  version: 1.0.5
179
154
  name: rexical
180
- prerelease: false
181
155
  type: :development
156
+ prerelease: false
182
157
  version_requirements: !ruby/object:Gem::Requirement
183
158
  requirements:
184
159
  - - "~>"
@@ -189,103 +164,89 @@ dependencies:
189
164
  requirements:
190
165
  - - "~>"
191
166
  - !ruby/object:Gem::Version
192
- version: '0.73'
167
+ version: '1.7'
193
168
  name: rubocop
194
- prerelease: false
195
169
  type: :development
170
+ prerelease: false
196
171
  version_requirements: !ruby/object:Gem::Requirement
197
172
  requirements:
198
173
  - - "~>"
199
174
  - !ruby/object:Gem::Version
200
- version: '0.73'
175
+ version: '1.7'
201
176
  - !ruby/object:Gem::Dependency
202
177
  requirement: !ruby/object:Gem::Requirement
203
178
  requirements:
204
179
  - - "~>"
205
180
  - !ruby/object:Gem::Version
206
- version: '0.16'
181
+ version: '0.20'
207
182
  name: simplecov
208
- prerelease: false
209
183
  type: :development
184
+ prerelease: false
210
185
  version_requirements: !ruby/object:Gem::Requirement
211
186
  requirements:
212
187
  - - "~>"
213
188
  - !ruby/object:Gem::Version
214
- version: '0.16'
189
+ version: '0.20'
215
190
  - !ruby/object:Gem::Dependency
216
191
  requirement: !ruby/object:Gem::Requirement
217
192
  requirements:
218
- - - ">="
219
- - !ruby/object:Gem::Version
220
- version: '4.0'
221
- - - "<"
193
+ - - "~>"
222
194
  - !ruby/object:Gem::Version
223
- version: '7'
224
- name: rdoc
225
- prerelease: false
195
+ version: '0.9'
196
+ name: yard
226
197
  type: :development
198
+ prerelease: false
227
199
  version_requirements: !ruby/object:Gem::Requirement
228
200
  requirements:
229
- - - ">="
230
- - !ruby/object:Gem::Version
231
- version: '4.0'
232
- - - "<"
201
+ - - "~>"
233
202
  - !ruby/object:Gem::Version
234
- version: '7'
235
- description: |-
236
- Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
237
- Nokogiri's many features is the ability to search documents via XPath
238
- or CSS3 selectors.
239
- email:
240
- - aaronp@rubyforge.org
241
- - mike.dalessio@gmail.com
242
- - yokolet@gmail.com
243
- - tle@holymonkey.com
244
- - knu@idaemons.org
245
- - jvshahid@gmail.com
246
- - 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
247
209
  executables:
248
210
  - nokogiri
249
211
  extensions: []
250
212
  extra_rdoc_files:
251
- - LICENSE-DEPENDENCIES.md
252
- - LICENSE.md
253
- - README.md
254
- - ext/nokogiri/html_document.c
255
- - ext/nokogiri/html_element_description.c
256
- - ext/nokogiri/html_entity_lookup.c
257
- - ext/nokogiri/html_sax_parser_context.c
258
- - ext/nokogiri/html_sax_push_parser.c
259
- - ext/nokogiri/nokogiri.c
213
+ - ext/nokogiri/xml_dtd.c
214
+ - ext/nokogiri/xml_xpath_context.c
260
215
  - ext/nokogiri/xml_attr.c
261
- - ext/nokogiri/xml_attribute_decl.c
262
- - ext/nokogiri/xml_cdata.c
216
+ - ext/nokogiri/libxml2_backwards_compat.c
263
217
  - ext/nokogiri/xml_comment.c
264
- - ext/nokogiri/xml_document.c
265
- - ext/nokogiri/xml_document_fragment.c
266
- - ext/nokogiri/xml_dtd.c
218
+ - ext/nokogiri/nokogiri.c
219
+ - ext/nokogiri/xml_sax_parser_context.c
220
+ - ext/nokogiri/xml_node_set.c
221
+ - ext/nokogiri/xml_reader.c
222
+ - ext/nokogiri/xml_cdata.c
267
223
  - ext/nokogiri/xml_element_content.c
224
+ - ext/nokogiri/html_entity_lookup.c
225
+ - ext/nokogiri/xml_namespace.c
226
+ - ext/nokogiri/xml_document.c
268
227
  - ext/nokogiri/xml_element_decl.c
228
+ - ext/nokogiri/xml_schema.c
229
+ - ext/nokogiri/html_document.c
230
+ - ext/nokogiri/xml_processing_instruction.c
231
+ - ext/nokogiri/xml_text.c
232
+ - ext/nokogiri/xml_syntax_error.c
233
+ - ext/nokogiri/xml_document_fragment.c
234
+ - ext/nokogiri/xml_sax_push_parser.c
269
235
  - ext/nokogiri/xml_encoding_handler.c
236
+ - ext/nokogiri/html_sax_push_parser.c
237
+ - ext/nokogiri/xml_relax_ng.c
270
238
  - ext/nokogiri/xml_entity_decl.c
271
- - ext/nokogiri/xml_entity_reference.c
272
- - ext/nokogiri/xml_io.c
273
- - ext/nokogiri/xml_libxml2_hacks.c
274
- - ext/nokogiri/xml_namespace.c
239
+ - ext/nokogiri/test_global_handlers.c
275
240
  - ext/nokogiri/xml_node.c
276
- - ext/nokogiri/xml_node_set.c
277
- - ext/nokogiri/xml_processing_instruction.c
278
- - ext/nokogiri/xml_reader.c
279
- - ext/nokogiri/xml_relax_ng.c
280
- - ext/nokogiri/xml_sax_parser.c
281
- - ext/nokogiri/xml_sax_parser_context.c
282
- - ext/nokogiri/xml_sax_push_parser.c
283
- - ext/nokogiri/xml_schema.c
284
- - ext/nokogiri/xml_syntax_error.c
285
- - ext/nokogiri/xml_text.c
286
- - ext/nokogiri/xml_xpath_context.c
241
+ - ext/nokogiri/xml_entity_reference.c
287
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
288
248
  files:
249
+ - Gemfile
289
250
  - LICENSE-DEPENDENCIES.md
290
251
  - LICENSE.md
291
252
  - README.md
@@ -381,73 +342,39 @@ files:
381
342
  - ext/nokogiri/depend
382
343
  - ext/nokogiri/extconf.rb
383
344
  - ext/nokogiri/html_document.c
384
- - ext/nokogiri/html_document.h
385
345
  - ext/nokogiri/html_element_description.c
386
- - ext/nokogiri/html_element_description.h
387
346
  - ext/nokogiri/html_entity_lookup.c
388
- - ext/nokogiri/html_entity_lookup.h
389
347
  - ext/nokogiri/html_sax_parser_context.c
390
- - ext/nokogiri/html_sax_parser_context.h
391
348
  - ext/nokogiri/html_sax_push_parser.c
392
- - ext/nokogiri/html_sax_push_parser.h
349
+ - ext/nokogiri/libxml2_backwards_compat.c
393
350
  - ext/nokogiri/nokogiri.c
394
- - ext/nokogiri/nokogiri.h
351
+ - ext/nokogiri/test_global_handlers.c
395
352
  - ext/nokogiri/xml_attr.c
396
- - ext/nokogiri/xml_attr.h
397
353
  - ext/nokogiri/xml_attribute_decl.c
398
- - ext/nokogiri/xml_attribute_decl.h
399
354
  - ext/nokogiri/xml_cdata.c
400
- - ext/nokogiri/xml_cdata.h
401
355
  - ext/nokogiri/xml_comment.c
402
- - ext/nokogiri/xml_comment.h
403
356
  - ext/nokogiri/xml_document.c
404
- - ext/nokogiri/xml_document.h
405
357
  - ext/nokogiri/xml_document_fragment.c
406
- - ext/nokogiri/xml_document_fragment.h
407
358
  - ext/nokogiri/xml_dtd.c
408
- - ext/nokogiri/xml_dtd.h
409
359
  - ext/nokogiri/xml_element_content.c
410
- - ext/nokogiri/xml_element_content.h
411
360
  - ext/nokogiri/xml_element_decl.c
412
- - ext/nokogiri/xml_element_decl.h
413
361
  - ext/nokogiri/xml_encoding_handler.c
414
- - ext/nokogiri/xml_encoding_handler.h
415
362
  - ext/nokogiri/xml_entity_decl.c
416
- - ext/nokogiri/xml_entity_decl.h
417
363
  - ext/nokogiri/xml_entity_reference.c
418
- - ext/nokogiri/xml_entity_reference.h
419
- - ext/nokogiri/xml_io.c
420
- - ext/nokogiri/xml_io.h
421
- - ext/nokogiri/xml_libxml2_hacks.c
422
- - ext/nokogiri/xml_libxml2_hacks.h
423
364
  - ext/nokogiri/xml_namespace.c
424
- - ext/nokogiri/xml_namespace.h
425
365
  - ext/nokogiri/xml_node.c
426
- - ext/nokogiri/xml_node.h
427
366
  - ext/nokogiri/xml_node_set.c
428
- - ext/nokogiri/xml_node_set.h
429
367
  - ext/nokogiri/xml_processing_instruction.c
430
- - ext/nokogiri/xml_processing_instruction.h
431
368
  - ext/nokogiri/xml_reader.c
432
- - ext/nokogiri/xml_reader.h
433
369
  - ext/nokogiri/xml_relax_ng.c
434
- - ext/nokogiri/xml_relax_ng.h
435
370
  - ext/nokogiri/xml_sax_parser.c
436
- - ext/nokogiri/xml_sax_parser.h
437
371
  - ext/nokogiri/xml_sax_parser_context.c
438
- - ext/nokogiri/xml_sax_parser_context.h
439
372
  - ext/nokogiri/xml_sax_push_parser.c
440
- - ext/nokogiri/xml_sax_push_parser.h
441
373
  - ext/nokogiri/xml_schema.c
442
- - ext/nokogiri/xml_schema.h
443
374
  - ext/nokogiri/xml_syntax_error.c
444
- - ext/nokogiri/xml_syntax_error.h
445
375
  - ext/nokogiri/xml_text.c
446
- - ext/nokogiri/xml_text.h
447
376
  - ext/nokogiri/xml_xpath_context.c
448
- - ext/nokogiri/xml_xpath_context.h
449
377
  - ext/nokogiri/xslt_stylesheet.c
450
- - ext/nokogiri/xslt_stylesheet.h
451
378
  - lib/isorelax.jar
452
379
  - lib/jing.jar
453
380
  - lib/nekodtd.jar
@@ -463,6 +390,7 @@ files:
463
390
  - lib/nokogiri/css/tokenizer.rex
464
391
  - lib/nokogiri/css/xpath_visitor.rb
465
392
  - lib/nokogiri/decorators/slop.rb
393
+ - lib/nokogiri/extension.rb
466
394
  - lib/nokogiri/html.rb
467
395
  - lib/nokogiri/html/builder.rb
468
396
  - lib/nokogiri/html/document.rb
@@ -477,6 +405,8 @@ files:
477
405
  - lib/nokogiri/nokogiri.jar
478
406
  - lib/nokogiri/syntax_error.rb
479
407
  - lib/nokogiri/version.rb
408
+ - lib/nokogiri/version/constant.rb
409
+ - lib/nokogiri/version/info.rb
480
410
  - lib/nokogiri/xml.rb
481
411
  - lib/nokogiri/xml/attr.rb
482
412
  - lib/nokogiri/xml/attribute_decl.rb
@@ -540,16 +470,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
540
470
  requirements:
541
471
  - - ">="
542
472
  - !ruby/object:Gem::Version
543
- version: 2.4.0
473
+ version: 2.5.0
544
474
  required_rubygems_version: !ruby/object:Gem::Requirement
545
475
  requirements:
546
- - - ">"
476
+ - - ">="
547
477
  - !ruby/object:Gem::Version
548
- version: 1.3.1
478
+ version: '0'
549
479
  requirements: []
550
- rubyforge_project:
551
- rubygems_version: 2.7.10
480
+ rubygems_version: 3.0.6
552
481
  signing_key:
553
482
  specification_version: 4
554
- summary: Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
483
+ summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
555
484
  test_files: []