nokogiri 1.12.5-x86_64-darwin → 1.13.0-x86_64-darwin

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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/README.md +9 -7
  4. data/bin/nokogiri +63 -50
  5. data/dependencies.yml +5 -6
  6. data/ext/nokogiri/extconf.rb +47 -35
  7. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +1 -0
  8. data/ext/nokogiri/include/libxslt/xsltconfig.h +1 -1
  9. data/ext/nokogiri/xml_document.c +35 -35
  10. data/ext/nokogiri/xml_document_fragment.c +0 -2
  11. data/ext/nokogiri/xml_dtd.c +2 -2
  12. data/ext/nokogiri/xml_encoding_handler.c +25 -11
  13. data/ext/nokogiri/xml_node.c +638 -333
  14. data/ext/nokogiri/xml_reader.c +37 -11
  15. data/ext/nokogiri/xml_xpath_context.c +72 -49
  16. data/lib/nokogiri/2.6/nokogiri.bundle +0 -0
  17. data/lib/nokogiri/2.7/nokogiri.bundle +0 -0
  18. data/lib/nokogiri/3.0/nokogiri.bundle +0 -0
  19. data/lib/nokogiri/{2.5 → 3.1}/nokogiri.bundle +0 -0
  20. data/lib/nokogiri/class_resolver.rb +67 -0
  21. data/lib/nokogiri/css/node.rb +9 -8
  22. data/lib/nokogiri/css/parser.rb +11 -3
  23. data/lib/nokogiri/css/parser.y +10 -2
  24. data/lib/nokogiri/css/parser_extras.rb +20 -20
  25. data/lib/nokogiri/css/syntax_error.rb +1 -0
  26. data/lib/nokogiri/css/tokenizer.rb +2 -1
  27. data/lib/nokogiri/css/tokenizer.rex +2 -1
  28. data/lib/nokogiri/css/xpath_visitor.rb +174 -75
  29. data/lib/nokogiri/css.rb +38 -6
  30. data/lib/nokogiri/decorators/slop.rb +8 -7
  31. data/lib/nokogiri/extension.rb +1 -1
  32. data/lib/nokogiri/gumbo.rb +1 -0
  33. data/lib/nokogiri/html.rb +16 -10
  34. data/lib/nokogiri/html4/builder.rb +1 -0
  35. data/lib/nokogiri/html4/document.rb +84 -75
  36. data/lib/nokogiri/html4/document_fragment.rb +11 -7
  37. data/lib/nokogiri/html4/element_description.rb +1 -0
  38. data/lib/nokogiri/html4/element_description_defaults.rb +426 -520
  39. data/lib/nokogiri/html4/entity_lookup.rb +2 -1
  40. data/lib/nokogiri/html4/sax/parser.rb +2 -1
  41. data/lib/nokogiri/html4/sax/parser_context.rb +1 -0
  42. data/lib/nokogiri/html4/sax/push_parser.rb +7 -7
  43. data/lib/nokogiri/html4.rb +11 -5
  44. data/lib/nokogiri/html5/document.rb +24 -10
  45. data/lib/nokogiri/html5/document_fragment.rb +5 -2
  46. data/lib/nokogiri/html5/node.rb +6 -3
  47. data/lib/nokogiri/html5.rb +68 -64
  48. data/lib/nokogiri/jruby/dependencies.rb +10 -9
  49. data/lib/nokogiri/syntax_error.rb +1 -0
  50. data/lib/nokogiri/version/constant.rb +2 -1
  51. data/lib/nokogiri/version/info.rb +19 -13
  52. data/lib/nokogiri/version.rb +1 -0
  53. data/lib/nokogiri/xml/attr.rb +5 -3
  54. data/lib/nokogiri/xml/attribute_decl.rb +2 -1
  55. data/lib/nokogiri/xml/builder.rb +32 -32
  56. data/lib/nokogiri/xml/cdata.rb +2 -1
  57. data/lib/nokogiri/xml/character_data.rb +1 -0
  58. data/lib/nokogiri/xml/document.rb +139 -103
  59. data/lib/nokogiri/xml/document_fragment.rb +41 -38
  60. data/lib/nokogiri/xml/dtd.rb +3 -2
  61. data/lib/nokogiri/xml/element_content.rb +1 -0
  62. data/lib/nokogiri/xml/element_decl.rb +2 -1
  63. data/lib/nokogiri/xml/entity_decl.rb +3 -2
  64. data/lib/nokogiri/xml/entity_reference.rb +1 -0
  65. data/lib/nokogiri/xml/namespace.rb +2 -0
  66. data/lib/nokogiri/xml/node/save_options.rb +6 -3
  67. data/lib/nokogiri/xml/node.rb +512 -348
  68. data/lib/nokogiri/xml/node_set.rb +46 -54
  69. data/lib/nokogiri/xml/notation.rb +12 -0
  70. data/lib/nokogiri/xml/parse_options.rb +11 -7
  71. data/lib/nokogiri/xml/pp/character_data.rb +8 -6
  72. data/lib/nokogiri/xml/pp/node.rb +24 -26
  73. data/lib/nokogiri/xml/pp.rb +1 -0
  74. data/lib/nokogiri/xml/processing_instruction.rb +2 -1
  75. data/lib/nokogiri/xml/reader.rb +17 -19
  76. data/lib/nokogiri/xml/relax_ng.rb +1 -0
  77. data/lib/nokogiri/xml/sax/document.rb +20 -19
  78. data/lib/nokogiri/xml/sax/parser.rb +36 -34
  79. data/lib/nokogiri/xml/sax/parser_context.rb +7 -3
  80. data/lib/nokogiri/xml/sax/push_parser.rb +5 -5
  81. data/lib/nokogiri/xml/sax.rb +1 -0
  82. data/lib/nokogiri/xml/schema.rb +7 -6
  83. data/lib/nokogiri/xml/searchable.rb +42 -22
  84. data/lib/nokogiri/xml/syntax_error.rb +4 -4
  85. data/lib/nokogiri/xml/text.rb +1 -0
  86. data/lib/nokogiri/xml/xpath/syntax_error.rb +2 -1
  87. data/lib/nokogiri/xml/xpath.rb +12 -0
  88. data/lib/nokogiri/xml/xpath_context.rb +2 -3
  89. data/lib/nokogiri/xml.rb +3 -3
  90. data/lib/nokogiri/xslt/stylesheet.rb +1 -0
  91. data/lib/nokogiri/xslt.rb +3 -2
  92. data/lib/nokogiri.rb +19 -16
  93. data/lib/xsd/xmlparser/nokogiri.rb +25 -24
  94. metadata +124 -52
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
- require 'nokogiri'
3
2
 
4
- module XSD # :nodoc:
5
- module XMLParser # :nodoc:
3
+ require "nokogiri"
4
+
5
+ module XSD
6
+ module XMLParser
6
7
  ###
7
8
  # Nokogiri XML parser for soap4r.
8
9
  #
@@ -27,40 +28,40 @@ module XSD # :nodoc:
27
28
  class Nokogiri < XSD::XMLParser::Parser
28
29
  ###
29
30
  # Create a new XSD parser with +host+ and +opt+
30
- def initialize host, opt = {}
31
+ def initialize(host, opt = {})
31
32
  super
32
- @parser = ::Nokogiri::XML::SAX::Parser.new(self, @charset || 'UTF-8')
33
+ @parser = ::Nokogiri::XML::SAX::Parser.new(self, @charset || "UTF-8")
33
34
  end
34
35
 
35
36
  ###
36
37
  # Start parsing +string_or_readable+
37
- def do_parse string_or_readable
38
+ def do_parse(string_or_readable)
38
39
  @parser.parse(string_or_readable)
39
40
  end
40
41
 
41
42
  ###
42
43
  # Handle the start_element event with +name+ and +attrs+
43
- def start_element name, attrs = []
44
+ def start_element(name, attrs = [])
44
45
  super(name, Hash[*attrs.flatten])
45
46
  end
46
47
 
47
48
  ###
48
49
  # Handle the end_element event with +name+
49
- def end_element name
50
+ def end_element(name)
50
51
  super
51
52
  end
52
53
 
53
54
  ###
54
55
  # Handle errors with message +msg+
55
- def error msg
56
- raise ParseError.new(msg)
56
+ def error(msg)
57
+ raise ParseError, msg
57
58
  end
58
- alias :warning :error
59
+ alias_method :warning, :error
59
60
 
60
61
  ###
61
62
  # Handle cdata_blocks containing +string+
62
- def cdata_block string
63
- characters string
63
+ def cdata_block(string)
64
+ characters(string)
64
65
  end
65
66
 
66
67
  ###
@@ -70,16 +71,16 @@ module XSD # :nodoc:
70
71
  # +prefix+ is the namespace prefix for the element
71
72
  # +uri+ is the associated namespace URI
72
73
  # +ns+ is a hash of namespace prefix:urls associated with the element
73
- def start_element_namespace name, attrs = [], prefix = nil, uri = nil, ns = []
74
+ def start_element_namespace(name, attrs = [], prefix = nil, uri = nil, ns = [])
74
75
  ###
75
76
  # Deal with SAX v1 interface
76
- name = [prefix, name].compact.join(':')
77
- attributes = ns.map { |ns_prefix,ns_uri|
78
- [['xmlns', ns_prefix].compact.join(':'), ns_uri]
79
- } + attrs.map { |attr|
80
- [[attr.prefix, attr.localname].compact.join(':'), attr.value]
81
- }.flatten
82
- start_element name, attributes
77
+ name = [prefix, name].compact.join(":")
78
+ attributes = ns.map do |ns_prefix, ns_uri|
79
+ [["xmlns", ns_prefix].compact.join(":"), ns_uri]
80
+ end + attrs.map do |attr|
81
+ [[attr.prefix, attr.localname].compact.join(":"), attr.value]
82
+ end.flatten
83
+ start_element(name, attributes)
83
84
  end
84
85
 
85
86
  ###
@@ -87,13 +88,13 @@ module XSD # :nodoc:
87
88
  # +name+ is the element's name
88
89
  # +prefix+ is the namespace prefix associated with the element
89
90
  # +uri+ is the associated namespace URI
90
- def end_element_namespace name, prefix = nil, uri = nil
91
+ def end_element_namespace(name, prefix = nil, uri = nil)
91
92
  ###
92
93
  # Deal with SAX v1 interface
93
- end_element [prefix, name].compact.join(':')
94
+ end_element([prefix, name].compact.join(":"))
94
95
  end
95
96
 
96
- %w{ xmldecl start_document end_document comment }.each do |name|
97
+ ["xmldecl", "start_document", "end_document", "comment"].each do |name|
97
98
  class_eval %{ def #{name}(*args); end }
98
99
  end
99
100
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.5
4
+ version: 1.13.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Mike Dalessio
@@ -17,10 +17,10 @@ authors:
17
17
  - Sergio Arbeo
18
18
  - Timothy Elliott
19
19
  - Nobuyoshi Nakada
20
- autorequire:
20
+ autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
- date: 2021-09-27 00:00:00.000000000 Z
23
+ date: 2022-01-06 00:00:00.000000000 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: racc
@@ -70,14 +70,14 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '5.8'
73
+ version: '5.15'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '5.8'
80
+ version: '5.15'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: minitest-reporters
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -108,88 +108,158 @@ dependencies:
108
108
  version: '13.0'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: rake-compiler
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - '='
114
+ - !ruby/object:Gem::Version
115
+ version: 1.1.7
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '='
121
+ - !ruby/object:Gem::Version
122
+ version: 1.1.7
123
+ - !ruby/object:Gem::Dependency
124
+ name: rake-compiler-dock
111
125
  requirement: !ruby/object:Gem::Requirement
112
126
  requirements:
113
127
  - - "~>"
114
128
  - !ruby/object:Gem::Version
115
- version: '1.1'
129
+ version: '1.2'
116
130
  type: :development
117
131
  prerelease: false
118
132
  version_requirements: !ruby/object:Gem::Requirement
119
133
  requirements:
120
134
  - - "~>"
121
135
  - !ruby/object:Gem::Version
122
- version: '1.1'
136
+ version: '1.2'
123
137
  - !ruby/object:Gem::Dependency
124
- name: rake-compiler-dock
138
+ name: rdoc
125
139
  requirement: !ruby/object:Gem::Requirement
126
140
  requirements:
127
141
  - - "~>"
128
142
  - !ruby/object:Gem::Version
129
- version: '1.1'
143
+ version: '6.3'
130
144
  type: :development
131
145
  prerelease: false
132
146
  version_requirements: !ruby/object:Gem::Requirement
133
147
  requirements:
134
148
  - - "~>"
135
149
  - !ruby/object:Gem::Version
136
- version: '1.1'
150
+ version: '6.3'
137
151
  - !ruby/object:Gem::Dependency
138
152
  name: rexical
139
153
  requirement: !ruby/object:Gem::Requirement
140
154
  requirements:
141
155
  - - "~>"
142
156
  - !ruby/object:Gem::Version
143
- version: 1.0.5
157
+ version: 1.0.7
144
158
  type: :development
145
159
  prerelease: false
146
160
  version_requirements: !ruby/object:Gem::Requirement
147
161
  requirements:
148
162
  - - "~>"
149
163
  - !ruby/object:Gem::Version
150
- version: 1.0.5
164
+ version: 1.0.7
151
165
  - !ruby/object:Gem::Dependency
152
166
  name: rubocop
153
167
  requirement: !ruby/object:Gem::Requirement
154
168
  requirements:
155
169
  - - "~>"
156
170
  - !ruby/object:Gem::Version
157
- version: '1.7'
171
+ version: '1.23'
158
172
  type: :development
159
173
  prerelease: false
160
174
  version_requirements: !ruby/object:Gem::Requirement
161
175
  requirements:
162
176
  - - "~>"
163
177
  - !ruby/object:Gem::Version
164
- version: '1.7'
178
+ version: '1.23'
165
179
  - !ruby/object:Gem::Dependency
166
- name: simplecov
180
+ name: rubocop-minitest
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - "~>"
184
+ - !ruby/object:Gem::Version
185
+ version: '0.17'
186
+ type: :development
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - "~>"
191
+ - !ruby/object:Gem::Version
192
+ version: '0.17'
193
+ - !ruby/object:Gem::Dependency
194
+ name: rubocop-performance
167
195
  requirement: !ruby/object:Gem::Requirement
168
196
  requirements:
169
197
  - - "~>"
170
198
  - !ruby/object:Gem::Version
171
- version: '0.20'
199
+ version: '1.12'
172
200
  type: :development
173
201
  prerelease: false
174
202
  version_requirements: !ruby/object:Gem::Requirement
175
203
  requirements:
176
204
  - - "~>"
177
205
  - !ruby/object:Gem::Version
178
- version: '0.20'
206
+ version: '1.12'
179
207
  - !ruby/object:Gem::Dependency
180
- name: yard
208
+ name: rubocop-rake
181
209
  requirement: !ruby/object:Gem::Requirement
182
210
  requirements:
183
211
  - - "~>"
184
212
  - !ruby/object:Gem::Version
185
- version: '0.9'
213
+ version: '0.6'
186
214
  type: :development
187
215
  prerelease: false
188
216
  version_requirements: !ruby/object:Gem::Requirement
189
217
  requirements:
190
218
  - - "~>"
191
219
  - !ruby/object:Gem::Version
192
- version: '0.9'
220
+ version: '0.6'
221
+ - !ruby/object:Gem::Dependency
222
+ name: rubocop-shopify
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: '2.3'
228
+ type: :development
229
+ prerelease: false
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - "~>"
233
+ - !ruby/object:Gem::Version
234
+ version: '2.3'
235
+ - !ruby/object:Gem::Dependency
236
+ name: ruby_memcheck
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - "~>"
240
+ - !ruby/object:Gem::Version
241
+ version: '1.0'
242
+ type: :development
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - "~>"
247
+ - !ruby/object:Gem::Version
248
+ version: '1.0'
249
+ - !ruby/object:Gem::Dependency
250
+ name: simplecov
251
+ requirement: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - "~>"
254
+ - !ruby/object:Gem::Version
255
+ version: '0.21'
256
+ type: :development
257
+ prerelease: false
258
+ version_requirements: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - "~>"
261
+ - !ruby/object:Gem::Version
262
+ version: '0.21'
193
263
  description: |
194
264
  Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a
195
265
  sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is
@@ -199,41 +269,41 @@ executables:
199
269
  - nokogiri
200
270
  extensions: []
201
271
  extra_rdoc_files:
202
- - ext/nokogiri/xml_dtd.c
203
- - ext/nokogiri/xml_xpath_context.c
204
- - ext/nokogiri/xml_attr.c
205
- - ext/nokogiri/libxml2_backwards_compat.c
206
- - ext/nokogiri/xml_comment.c
207
- - ext/nokogiri/nokogiri.c
208
- - ext/nokogiri/xml_sax_parser_context.c
209
- - ext/nokogiri/xml_node_set.c
210
- - ext/nokogiri/xml_reader.c
272
+ - ext/nokogiri/gumbo.c
211
273
  - ext/nokogiri/html4_document.c
212
- - ext/nokogiri/xml_cdata.c
274
+ - ext/nokogiri/html4_element_description.c
213
275
  - ext/nokogiri/html4_entity_lookup.c
214
- - ext/nokogiri/xml_element_content.c
215
- - ext/nokogiri/html4_sax_push_parser.c
216
- - ext/nokogiri/xml_namespace.c
217
276
  - ext/nokogiri/html4_sax_parser_context.c
277
+ - ext/nokogiri/html4_sax_push_parser.c
278
+ - ext/nokogiri/libxml2_backwards_compat.c
279
+ - ext/nokogiri/nokogiri.c
280
+ - ext/nokogiri/test_global_handlers.c
281
+ - ext/nokogiri/xml_attr.c
282
+ - ext/nokogiri/xml_attribute_decl.c
283
+ - ext/nokogiri/xml_cdata.c
284
+ - ext/nokogiri/xml_comment.c
218
285
  - ext/nokogiri/xml_document.c
219
- - ext/nokogiri/xml_element_decl.c
220
- - ext/nokogiri/xml_schema.c
221
- - ext/nokogiri/xml_processing_instruction.c
222
- - ext/nokogiri/xml_text.c
223
- - ext/nokogiri/xml_syntax_error.c
224
286
  - ext/nokogiri/xml_document_fragment.c
225
- - ext/nokogiri/xml_sax_push_parser.c
287
+ - ext/nokogiri/xml_dtd.c
288
+ - ext/nokogiri/xml_element_content.c
289
+ - ext/nokogiri/xml_element_decl.c
226
290
  - ext/nokogiri/xml_encoding_handler.c
227
- - ext/nokogiri/xml_relax_ng.c
228
291
  - ext/nokogiri/xml_entity_decl.c
229
- - ext/nokogiri/test_global_handlers.c
230
- - ext/nokogiri/xml_node.c
231
292
  - ext/nokogiri/xml_entity_reference.c
232
- - ext/nokogiri/xslt_stylesheet.c
233
- - ext/nokogiri/html4_element_description.c
293
+ - ext/nokogiri/xml_namespace.c
294
+ - ext/nokogiri/xml_node.c
295
+ - ext/nokogiri/xml_node_set.c
296
+ - ext/nokogiri/xml_processing_instruction.c
297
+ - ext/nokogiri/xml_reader.c
298
+ - ext/nokogiri/xml_relax_ng.c
234
299
  - ext/nokogiri/xml_sax_parser.c
235
- - ext/nokogiri/xml_attribute_decl.c
236
- - ext/nokogiri/gumbo.c
300
+ - ext/nokogiri/xml_sax_parser_context.c
301
+ - ext/nokogiri/xml_sax_push_parser.c
302
+ - ext/nokogiri/xml_schema.c
303
+ - ext/nokogiri/xml_syntax_error.c
304
+ - ext/nokogiri/xml_text.c
305
+ - ext/nokogiri/xml_xpath_context.c
306
+ - ext/nokogiri/xslt_stylesheet.c
237
307
  - README.md
238
308
  files:
239
309
  - Gemfile
@@ -355,10 +425,11 @@ files:
355
425
  - gumbo-parser/Makefile
356
426
  - gumbo-parser/THANKS
357
427
  - lib/nokogiri.rb
358
- - lib/nokogiri/2.5/nokogiri.bundle
359
428
  - lib/nokogiri/2.6/nokogiri.bundle
360
429
  - lib/nokogiri/2.7/nokogiri.bundle
361
430
  - lib/nokogiri/3.0/nokogiri.bundle
431
+ - lib/nokogiri/3.1/nokogiri.bundle
432
+ - lib/nokogiri/class_resolver.rb
362
433
  - lib/nokogiri/css.rb
363
434
  - lib/nokogiri/css/node.rb
364
435
  - lib/nokogiri/css/parser.rb
@@ -440,7 +511,8 @@ metadata:
440
511
  documentation_uri: https://nokogiri.org/rdoc/index.html
441
512
  changelog_uri: https://nokogiri.org/CHANGELOG.html
442
513
  source_code_uri: https://github.com/sparklemotion/nokogiri
443
- post_install_message:
514
+ rubygems_mfa_required: 'true'
515
+ post_install_message:
444
516
  rdoc_options:
445
517
  - "--main"
446
518
  - README.md
@@ -450,18 +522,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
450
522
  requirements:
451
523
  - - ">="
452
524
  - !ruby/object:Gem::Version
453
- version: '2.5'
525
+ version: '2.6'
454
526
  - - "<"
455
527
  - !ruby/object:Gem::Version
456
- version: 3.1.dev
528
+ version: 3.2.dev
457
529
  required_rubygems_version: !ruby/object:Gem::Requirement
458
530
  requirements:
459
531
  - - ">="
460
532
  - !ruby/object:Gem::Version
461
533
  version: '0'
462
534
  requirements: []
463
- rubygems_version: 3.2.3
464
- signing_key:
535
+ rubygems_version: 3.3.4
536
+ signing_key:
465
537
  specification_version: 4
466
538
  summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
467
539
  test_files: []