nokogiri 1.13.8 → 1.15.7
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.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +40 -0
- data/LICENSE-DEPENDENCIES.md +830 -509
- data/LICENSE.md +1 -1
- data/README.md +18 -11
- data/dependencies.yml +33 -15
- data/ext/nokogiri/extconf.rb +164 -46
- data/ext/nokogiri/gumbo.c +20 -10
- data/ext/nokogiri/html4_document.c +3 -4
- data/ext/nokogiri/html4_element_description.c +20 -15
- data/ext/nokogiri/html4_entity_lookup.c +2 -2
- data/ext/nokogiri/html4_sax_parser_context.c +11 -22
- data/ext/nokogiri/html4_sax_push_parser.c +3 -3
- data/ext/nokogiri/nokogiri.c +84 -75
- data/ext/nokogiri/nokogiri.h +31 -16
- data/ext/nokogiri/test_global_handlers.c +1 -1
- data/ext/nokogiri/xml_attr.c +2 -2
- data/ext/nokogiri/xml_attribute_decl.c +2 -2
- data/ext/nokogiri/xml_cdata.c +32 -18
- data/ext/nokogiri/xml_comment.c +2 -2
- data/ext/nokogiri/xml_document.c +127 -34
- data/ext/nokogiri/xml_document_fragment.c +2 -2
- data/ext/nokogiri/xml_dtd.c +2 -2
- data/ext/nokogiri/xml_element_content.c +34 -31
- data/ext/nokogiri/xml_element_decl.c +7 -7
- data/ext/nokogiri/xml_encoding_handler.c +15 -7
- data/ext/nokogiri/xml_entity_decl.c +1 -1
- data/ext/nokogiri/xml_entity_reference.c +2 -2
- data/ext/nokogiri/xml_namespace.c +79 -14
- data/ext/nokogiri/xml_node.c +300 -34
- data/ext/nokogiri/xml_node_set.c +125 -107
- data/ext/nokogiri/xml_processing_instruction.c +2 -2
- data/ext/nokogiri/xml_reader.c +81 -48
- data/ext/nokogiri/xml_relax_ng.c +66 -81
- data/ext/nokogiri/xml_sax_parser.c +45 -20
- data/ext/nokogiri/xml_sax_parser_context.c +46 -30
- data/ext/nokogiri/xml_sax_push_parser.c +30 -11
- data/ext/nokogiri/xml_schema.c +95 -117
- data/ext/nokogiri/xml_syntax_error.c +1 -1
- data/ext/nokogiri/xml_text.c +28 -14
- data/ext/nokogiri/xml_xpath_context.c +216 -136
- data/ext/nokogiri/xslt_stylesheet.c +118 -64
- data/gumbo-parser/Makefile +10 -0
- data/gumbo-parser/src/attribute.h +1 -1
- data/gumbo-parser/src/error.c +10 -6
- data/gumbo-parser/src/error.h +1 -1
- data/gumbo-parser/src/foreign_attrs.c +15 -16
- data/gumbo-parser/src/foreign_attrs.gperf +1 -1
- data/gumbo-parser/src/{gumbo.h → nokogiri_gumbo.h} +1 -0
- data/gumbo-parser/src/parser.c +21 -5
- data/gumbo-parser/src/replacement.h +1 -1
- data/gumbo-parser/src/string_buffer.h +1 -1
- data/gumbo-parser/src/string_piece.c +1 -1
- data/gumbo-parser/src/svg_attrs.c +2 -2
- data/gumbo-parser/src/svg_tags.c +2 -2
- data/gumbo-parser/src/tag.c +2 -1
- data/gumbo-parser/src/tag_lookup.c +7 -7
- data/gumbo-parser/src/tag_lookup.gperf +1 -0
- data/gumbo-parser/src/tag_lookup.h +1 -1
- data/gumbo-parser/src/token_buffer.h +1 -1
- data/gumbo-parser/src/tokenizer.c +1 -1
- data/gumbo-parser/src/tokenizer.h +1 -1
- data/gumbo-parser/src/utf8.c +1 -1
- data/gumbo-parser/src/utf8.h +1 -1
- data/gumbo-parser/src/util.c +1 -3
- data/gumbo-parser/src/util.h +4 -0
- data/gumbo-parser/src/vector.h +1 -1
- data/lib/nokogiri/css/node.rb +2 -2
- data/lib/nokogiri/css/xpath_visitor.rb +7 -5
- data/lib/nokogiri/css.rb +6 -0
- data/lib/nokogiri/decorators/slop.rb +1 -1
- data/lib/nokogiri/encoding_handler.rb +57 -0
- data/lib/nokogiri/extension.rb +4 -3
- data/lib/nokogiri/html4/document.rb +2 -121
- data/lib/nokogiri/html4/document_fragment.rb +1 -1
- data/lib/nokogiri/html4/element_description_defaults.rb +1827 -365
- data/lib/nokogiri/html4/encoding_reader.rb +121 -0
- data/lib/nokogiri/html4.rb +1 -0
- data/lib/nokogiri/html5/document.rb +113 -36
- data/lib/nokogiri/html5/document_fragment.rb +10 -3
- data/lib/nokogiri/html5/node.rb +8 -5
- data/lib/nokogiri/html5.rb +130 -216
- data/lib/nokogiri/jruby/dependencies.rb +1 -19
- data/lib/nokogiri/jruby/nokogiri_jars.rb +43 -0
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/version/info.rb +11 -10
- data/lib/nokogiri/xml/attr.rb +49 -0
- data/lib/nokogiri/xml/attribute_decl.rb +4 -2
- data/lib/nokogiri/xml/builder.rb +1 -1
- data/lib/nokogiri/xml/document.rb +102 -55
- data/lib/nokogiri/xml/document_fragment.rb +50 -7
- data/lib/nokogiri/xml/element_content.rb +10 -2
- data/lib/nokogiri/xml/element_decl.rb +4 -2
- data/lib/nokogiri/xml/entity_decl.rb +4 -2
- data/lib/nokogiri/xml/namespace.rb +42 -0
- data/lib/nokogiri/xml/node/save_options.rb +14 -4
- data/lib/nokogiri/xml/node.rb +212 -48
- data/lib/nokogiri/xml/node_set.rb +88 -9
- data/lib/nokogiri/xml/parse_options.rb +129 -50
- data/lib/nokogiri/xml/pp/node.rb +28 -15
- data/lib/nokogiri/xml/processing_instruction.rb +2 -1
- data/lib/nokogiri/xml/sax/document.rb +1 -1
- data/lib/nokogiri/xml/sax/parser.rb +2 -3
- data/lib/nokogiri/xml/searchable.rb +18 -10
- data/lib/nokogiri/xslt.rb +74 -4
- data/lib/nokogiri.rb +15 -15
- data/lib/xsd/xmlparser/nokogiri.rb +4 -2
- data/patches/libxml2/0010-update-config.guess-and-config.sub-for-libxml2.patch +224 -0
- data/patches/libxml2/0011-rip-out-libxml2-s-libc_single_threaded-support.patch +30 -0
- data/patches/libxslt/0001-update-config.guess-and-config.sub-for-libxslt.patch +224 -0
- data/ports/archives/libxml2-2.11.7.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.39.tar.xz +0 -0
- metadata +19 -242
- data/patches/libxml2/0004-use-glibc-strlen.patch +0 -53
- data/patches/libxml2/0005-avoid-isnan-isinf.patch +0 -81
- data/patches/libxml2/0006-update-automake-files-for-arm64.patch +0 -3040
- data/patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch +0 -61
- data/patches/libxslt/0001-update-automake-files-for-arm64.patch +0 -3037
- data/ports/archives/libxml2-2.9.14.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.35.tar.xz +0 -0
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.
|
4
|
+
version: 1.15.7
|
5
5
|
platform: ruby
|
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:
|
23
|
+
date: 2024-12-02 00:00:00.000000000 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mini_portile2
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
requirements:
|
29
29
|
- - "~>"
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: 2.8.
|
31
|
+
version: 2.8.2
|
32
32
|
type: :runtime
|
33
33
|
prerelease: false
|
34
34
|
version_requirements: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
36
|
- - "~>"
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 2.8.
|
38
|
+
version: 2.8.2
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: racc
|
41
41
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,234 +50,10 @@ dependencies:
|
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '1.4'
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: bundler
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '2.2'
|
60
|
-
type: :development
|
61
|
-
prerelease: false
|
62
|
-
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - "~>"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '2.2'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: hoe-markdown
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '1.4'
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '1.4'
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: minitest
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '5.15'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '5.15'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: minitest-reporters
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '1.4'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '1.4'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: rake
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '13.0'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '13.0'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: rake-compiler
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - '='
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: 1.1.7
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - '='
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: 1.1.7
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: rake-compiler-dock
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - '='
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: 1.2.2
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - '='
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: 1.2.2
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: rdoc
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - "~>"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '6.3'
|
158
|
-
type: :development
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - "~>"
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: '6.3'
|
165
|
-
- !ruby/object:Gem::Dependency
|
166
|
-
name: rexical
|
167
|
-
requirement: !ruby/object:Gem::Requirement
|
168
|
-
requirements:
|
169
|
-
- - "~>"
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: 1.0.7
|
172
|
-
type: :development
|
173
|
-
prerelease: false
|
174
|
-
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
requirements:
|
176
|
-
- - "~>"
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
version: 1.0.7
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: rubocop
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - "~>"
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: 1.30.1
|
186
|
-
type: :development
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - "~>"
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: 1.30.1
|
193
|
-
- !ruby/object:Gem::Dependency
|
194
|
-
name: rubocop-minitest
|
195
|
-
requirement: !ruby/object:Gem::Requirement
|
196
|
-
requirements:
|
197
|
-
- - "~>"
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: '0.17'
|
200
|
-
type: :development
|
201
|
-
prerelease: false
|
202
|
-
version_requirements: !ruby/object:Gem::Requirement
|
203
|
-
requirements:
|
204
|
-
- - "~>"
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
version: '0.17'
|
207
|
-
- !ruby/object:Gem::Dependency
|
208
|
-
name: rubocop-performance
|
209
|
-
requirement: !ruby/object:Gem::Requirement
|
210
|
-
requirements:
|
211
|
-
- - "~>"
|
212
|
-
- !ruby/object:Gem::Version
|
213
|
-
version: '1.12'
|
214
|
-
type: :development
|
215
|
-
prerelease: false
|
216
|
-
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
requirements:
|
218
|
-
- - "~>"
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
version: '1.12'
|
221
|
-
- !ruby/object:Gem::Dependency
|
222
|
-
name: rubocop-rake
|
223
|
-
requirement: !ruby/object:Gem::Requirement
|
224
|
-
requirements:
|
225
|
-
- - "~>"
|
226
|
-
- !ruby/object:Gem::Version
|
227
|
-
version: '0.6'
|
228
|
-
type: :development
|
229
|
-
prerelease: false
|
230
|
-
version_requirements: !ruby/object:Gem::Requirement
|
231
|
-
requirements:
|
232
|
-
- - "~>"
|
233
|
-
- !ruby/object:Gem::Version
|
234
|
-
version: '0.6'
|
235
|
-
- !ruby/object:Gem::Dependency
|
236
|
-
name: rubocop-shopify
|
237
|
-
requirement: !ruby/object:Gem::Requirement
|
238
|
-
requirements:
|
239
|
-
- - '='
|
240
|
-
- !ruby/object:Gem::Version
|
241
|
-
version: 2.5.0
|
242
|
-
type: :development
|
243
|
-
prerelease: false
|
244
|
-
version_requirements: !ruby/object:Gem::Requirement
|
245
|
-
requirements:
|
246
|
-
- - '='
|
247
|
-
- !ruby/object:Gem::Version
|
248
|
-
version: 2.5.0
|
249
|
-
- !ruby/object:Gem::Dependency
|
250
|
-
name: ruby_memcheck
|
251
|
-
requirement: !ruby/object:Gem::Requirement
|
252
|
-
requirements:
|
253
|
-
- - "~>"
|
254
|
-
- !ruby/object:Gem::Version
|
255
|
-
version: '1.0'
|
256
|
-
type: :development
|
257
|
-
prerelease: false
|
258
|
-
version_requirements: !ruby/object:Gem::Requirement
|
259
|
-
requirements:
|
260
|
-
- - "~>"
|
261
|
-
- !ruby/object:Gem::Version
|
262
|
-
version: '1.0'
|
263
|
-
- !ruby/object:Gem::Dependency
|
264
|
-
name: simplecov
|
265
|
-
requirement: !ruby/object:Gem::Requirement
|
266
|
-
requirements:
|
267
|
-
- - "~>"
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
version: '0.21'
|
270
|
-
type: :development
|
271
|
-
prerelease: false
|
272
|
-
version_requirements: !ruby/object:Gem::Requirement
|
273
|
-
requirements:
|
274
|
-
- - "~>"
|
275
|
-
- !ruby/object:Gem::Version
|
276
|
-
version: '0.21'
|
277
53
|
description: |
|
278
54
|
Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a
|
279
55
|
sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is
|
280
|
-
fast and standards-compliant by relying on native parsers like libxml2
|
56
|
+
fast and standards-compliant by relying on native parsers like libxml2, libgumbo, or xerces.
|
281
57
|
email: nokogiri-talk@googlegroups.com
|
282
58
|
executables:
|
283
59
|
- nokogiri
|
@@ -381,9 +157,9 @@ files:
|
|
381
157
|
- gumbo-parser/src/error.h
|
382
158
|
- gumbo-parser/src/foreign_attrs.c
|
383
159
|
- gumbo-parser/src/foreign_attrs.gperf
|
384
|
-
- gumbo-parser/src/gumbo.h
|
385
160
|
- gumbo-parser/src/insertion_mode.h
|
386
161
|
- gumbo-parser/src/macros.h
|
162
|
+
- gumbo-parser/src/nokogiri_gumbo.h
|
387
163
|
- gumbo-parser/src/parser.c
|
388
164
|
- gumbo-parser/src/parser.h
|
389
165
|
- gumbo-parser/src/replacement.h
|
@@ -422,6 +198,7 @@ files:
|
|
422
198
|
- lib/nokogiri/css/tokenizer.rex
|
423
199
|
- lib/nokogiri/css/xpath_visitor.rb
|
424
200
|
- lib/nokogiri/decorators/slop.rb
|
201
|
+
- lib/nokogiri/encoding_handler.rb
|
425
202
|
- lib/nokogiri/extension.rb
|
426
203
|
- lib/nokogiri/gumbo.rb
|
427
204
|
- lib/nokogiri/html.rb
|
@@ -431,6 +208,7 @@ files:
|
|
431
208
|
- lib/nokogiri/html4/document_fragment.rb
|
432
209
|
- lib/nokogiri/html4/element_description.rb
|
433
210
|
- lib/nokogiri/html4/element_description_defaults.rb
|
211
|
+
- lib/nokogiri/html4/encoding_reader.rb
|
434
212
|
- lib/nokogiri/html4/entity_lookup.rb
|
435
213
|
- lib/nokogiri/html4/sax/parser.rb
|
436
214
|
- lib/nokogiri/html4/sax/parser_context.rb
|
@@ -440,6 +218,7 @@ files:
|
|
440
218
|
- lib/nokogiri/html5/document_fragment.rb
|
441
219
|
- lib/nokogiri/html5/node.rb
|
442
220
|
- lib/nokogiri/jruby/dependencies.rb
|
221
|
+
- lib/nokogiri/jruby/nokogiri_jars.rb
|
443
222
|
- lib/nokogiri/syntax_error.rb
|
444
223
|
- lib/nokogiri/version.rb
|
445
224
|
- lib/nokogiri/version/constant.rb
|
@@ -487,14 +266,12 @@ files:
|
|
487
266
|
- patches/libxml2/0001-Remove-script-macro-support.patch
|
488
267
|
- patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch
|
489
268
|
- patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch
|
490
|
-
- patches/libxml2/0004-use-glibc-strlen.patch
|
491
|
-
- patches/libxml2/0005-avoid-isnan-isinf.patch
|
492
|
-
- patches/libxml2/0006-update-automake-files-for-arm64.patch
|
493
|
-
- patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch
|
494
269
|
- patches/libxml2/0009-allow-wildcard-namespaces.patch
|
495
|
-
- patches/
|
496
|
-
-
|
497
|
-
-
|
270
|
+
- patches/libxml2/0010-update-config.guess-and-config.sub-for-libxml2.patch
|
271
|
+
- patches/libxml2/0011-rip-out-libxml2-s-libc_single_threaded-support.patch
|
272
|
+
- patches/libxslt/0001-update-config.guess-and-config.sub-for-libxslt.patch
|
273
|
+
- ports/archives/libxml2-2.11.7.tar.xz
|
274
|
+
- ports/archives/libxslt-1.1.39.tar.xz
|
498
275
|
homepage: https://nokogiri.org
|
499
276
|
licenses:
|
500
277
|
- MIT
|
@@ -505,7 +282,7 @@ metadata:
|
|
505
282
|
changelog_uri: https://nokogiri.org/CHANGELOG.html
|
506
283
|
source_code_uri: https://github.com/sparklemotion/nokogiri
|
507
284
|
rubygems_mfa_required: 'true'
|
508
|
-
post_install_message:
|
285
|
+
post_install_message:
|
509
286
|
rdoc_options:
|
510
287
|
- "--main"
|
511
288
|
- README.md
|
@@ -515,15 +292,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
515
292
|
requirements:
|
516
293
|
- - ">="
|
517
294
|
- !ruby/object:Gem::Version
|
518
|
-
version: 2.
|
295
|
+
version: 2.7.0
|
519
296
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
520
297
|
requirements:
|
521
298
|
- - ">="
|
522
299
|
- !ruby/object:Gem::Version
|
523
300
|
version: '0'
|
524
301
|
requirements: []
|
525
|
-
rubygems_version: 3.
|
526
|
-
signing_key:
|
302
|
+
rubygems_version: 3.5.22
|
303
|
+
signing_key:
|
527
304
|
specification_version: 4
|
528
305
|
summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
|
529
306
|
test_files: []
|
@@ -1,53 +0,0 @@
|
|
1
|
-
From c94172d2a4451368530db2186190d70be8a1d9e5 Mon Sep 17 00:00:00 2001
|
2
|
-
From: Ilya Zub <ilya@serpapi.com>
|
3
|
-
Date: Wed, 23 Dec 2020 12:45:29 +0200
|
4
|
-
Subject: Use glibc strlen to speed up xmlStrlen
|
5
|
-
MIME-Version: 1.0
|
6
|
-
Content-Type: text/plain; charset=UTF-8
|
7
|
-
Content-Transfer-Encoding: 8bit
|
8
|
-
|
9
|
-
xmlStrlen (entire HTML file): 926171.936981 μs
|
10
|
-
glibc_xmlStrlen (entire HTML file): 36905.903992 μs
|
11
|
-
delta (xmlStrlen ÷ glibc_xmlStrlen): 25.094584 times
|
12
|
-
|
13
|
-
xmlStrlen (average string): 57479.204010 μs
|
14
|
-
glibc_xmlStrlen (average string): 5802.069000 μs
|
15
|
-
delta (xmlStrlen ÷ glibc_xmlStrlen): 9.905937 times
|
16
|
-
|
17
|
-
xmlStrlen (bigger string): 388056.315979 μs
|
18
|
-
glibc_xmlStrlen (bigger string): 12797.856995 μs
|
19
|
-
delta (xmlStrlen ÷ glibc_xmlStrlen): 30.318382 times
|
20
|
-
|
21
|
-
xmlStrlen (smallest string): 15870.046021 μs
|
22
|
-
glibc_xmlStrlen (smallest string): 6282.208984 μs
|
23
|
-
delta (xmlStrlen ÷ glibc_xmlStrlen): 2.527903 times
|
24
|
-
|
25
|
-
See https://gitlab.gnome.org/GNOME/libxml2/-/issues/212 for reference.
|
26
|
-
---
|
27
|
-
xmlstring.c | 9 ++-------
|
28
|
-
1 file changed, 2 insertions(+), 7 deletions(-)
|
29
|
-
|
30
|
-
diff --git a/xmlstring.c b/xmlstring.c
|
31
|
-
index e8a1e45d..df247dff 100644
|
32
|
-
--- a/xmlstring.c
|
33
|
-
+++ b/xmlstring.c
|
34
|
-
@@ -423,12 +423,7 @@ xmlStrsub(const xmlChar *str, int start, int len) {
|
35
|
-
|
36
|
-
int
|
37
|
-
xmlStrlen(const xmlChar *str) {
|
38
|
-
- size_t len = 0;
|
39
|
-
-
|
40
|
-
if (str == NULL) return(0);
|
41
|
-
- while (*str != 0) { /* non input consuming */
|
42
|
-
- str++;
|
43
|
-
- len++;
|
44
|
-
- }
|
45
|
-
- return(len > INT_MAX ? 0 : len);
|
46
|
-
+
|
47
|
-
+ return strlen((const char*)str);
|
48
|
-
}
|
49
|
-
|
50
|
-
/**
|
51
|
-
--
|
52
|
-
2.29.2
|
53
|
-
|
@@ -1,81 +0,0 @@
|
|
1
|
-
This patch is a result of rake-compiler-dock using centos 7 (manylinux2014) to cross-compile.
|
2
|
-
|
3
|
-
Centos, for reasons I have not been able to discern, implements `isnan` and `isinf` as a function
|
4
|
-
and not as a macro. Debian knows how to resolve that function at dynamic-link time (despite using a
|
5
|
-
macro at compile time), but musl-based systems (like alpine) do not. Running `nm` on nokogiri.so
|
6
|
-
created on such a centos system shows:
|
7
|
-
|
8
|
-
```
|
9
|
-
U __isinf@@GLIBC_2.2.5
|
10
|
-
U __isnan@@GLIBC_2.2.5
|
11
|
-
```
|
12
|
-
|
13
|
-
(see https://github.com/sparklemotion/nokogiri/pull/2142 for more info)
|
14
|
-
|
15
|
-
This patch avoids using glibc's `isnan` and `isinf` calls, instead using libxml2's fallback
|
16
|
-
implementation. There's history here, see libxml2 commit 8813f39:
|
17
|
-
|
18
|
-
commit 8813f39
|
19
|
-
Author: Nick Wellnhofer <wellnhofer@aevum.de>
|
20
|
-
Date: 2017-09-21 00:11:26 +0200
|
21
|
-
|
22
|
-
Simplify XPath NaN, inf and -0 handling
|
23
|
-
|
24
|
-
Use C99 macros NAN, INFINITY, isnan, isinf. If they're not available:
|
25
|
-
|
26
|
-
- Assume that (0.0 / 0.0) generates a NaN and !(x == x) tests for NaN.
|
27
|
-
- Use C89's HUGE_VAL for INFINITY.
|
28
|
-
|
29
|
-
Remove manual handling of NaN, infinity and negative zero in functions
|
30
|
-
xmlXPathValueFlipSign and xmlXPathDivValues.
|
31
|
-
|
32
|
-
Remove xmlXPathGetSign. All the tests for negative zero can be replaced
|
33
|
-
with a test for negative or positive zero.
|
34
|
-
|
35
|
-
Simplify xmlXPathRoundFunction.
|
36
|
-
|
37
|
-
Remove Trio dependency.
|
38
|
-
|
39
|
-
This should work on IEEE 754 compliant implementations even if the C99
|
40
|
-
macros aren't available, but will likely break some ancient platforms.
|
41
|
-
If problems arise, my plan is to port the relevant trionan.c solution
|
42
|
-
to xpath.c. Note that non-compliant implementations are impossible
|
43
|
-
to fully support, anyway, since XPath requires IEEE 754.
|
44
|
-
|
45
|
-
This patch would be unnecessary if any of the following was true:
|
46
|
-
|
47
|
-
* centos implements these as macros, and doesn't generate an unresolved symbol for either in the shared library
|
48
|
-
* we had a way to ensure `__isinf` and `__isnan` resolve on musl (e.g., we implement them locally)
|
49
|
-
|
50
|
-
diff --git a/xpath.c b/xpath.c
|
51
|
-
index 9f64ab9..5b6d999 100644
|
52
|
-
--- a/xpath.c
|
53
|
-
+++ b/xpath.c
|
54
|
-
@@ -515,11 +515,7 @@ xmlXPathInit(void) {
|
55
|
-
*/
|
56
|
-
int
|
57
|
-
xmlXPathIsNaN(double val) {
|
58
|
-
-#ifdef isnan
|
59
|
-
- return isnan(val);
|
60
|
-
-#else
|
61
|
-
return !(val == val);
|
62
|
-
-#endif
|
63
|
-
}
|
64
|
-
|
65
|
-
/**
|
66
|
-
@@ -530,15 +530,11 @@ xmlXPathIsNaN(double val) {
|
67
|
-
*/
|
68
|
-
int
|
69
|
-
xmlXPathIsInf(double val) {
|
70
|
-
-#ifdef isinf
|
71
|
-
- return isinf(val) ? (val > 0 ? 1 : -1) : 0;
|
72
|
-
-#else
|
73
|
-
if (val >= xmlXPathPINF)
|
74
|
-
return 1;
|
75
|
-
if (val <= -xmlXPathPINF)
|
76
|
-
return -1;
|
77
|
-
return 0;
|
78
|
-
-#endif
|
79
|
-
}
|
80
|
-
|
81
|
-
#endif /* SCHEMAS or XPATH */
|