nokogiri 1.13.8-java → 1.13.10-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.
- checksums.yaml +4 -4
- data/dependencies.yml +8 -8
- data/ext/nokogiri/extconf.rb +16 -3
- data/ext/nokogiri/xml_document.c +5 -1
- data/ext/nokogiri/xml_namespace.c +41 -5
- data/ext/nokogiri/xml_node.c +1 -1
- data/ext/nokogiri/xml_reader.c +4 -0
- data/ext/nokogiri/xml_xpath_context.c +3 -0
- data/lib/nokogiri/nokogiri.jar +0 -0
- data/lib/nokogiri/version/constant.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d914c82f737a2a2f4bd31081920f50c5f4ae3f66abf67cdb823833328552074
|
4
|
+
data.tar.gz: 0ed7dc9ba120c20c9722cfbc81f4768cf964f0bb5d0eea7bd5bb506bf1cefa1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d0646f82b243b6147e05b834a0f6dcb35a21eb6d6856de1057cecc7c5d8c3ad05e82dc092091d00935237f12ff0042073dc3c0e8897edf412cbdc0fcedb118
|
7
|
+
data.tar.gz: affd615796c9b2b21e20ee4c30252a07bac9cceded51451acefa5c9665c8ca8927c74d27ddf801999ab48351300a0c2760a9792c10faca24ff0235ef5958363b
|
data/dependencies.yml
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
libxml2:
|
2
|
-
version: "2.
|
3
|
-
sha256: "
|
4
|
-
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.
|
2
|
+
version: "2.10.3"
|
3
|
+
sha256: "5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c"
|
4
|
+
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.3.sha256sum
|
5
5
|
|
6
6
|
libxslt:
|
7
|
-
version: "1.1.
|
8
|
-
sha256: "
|
9
|
-
# sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.
|
7
|
+
version: "1.1.37"
|
8
|
+
sha256: "3a4b27dc8027ccd6146725950336f1ec520928f320f144eb5fa7990ae6123ab4"
|
9
|
+
# sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.37.sha256sum
|
10
10
|
|
11
11
|
zlib:
|
12
|
-
version: "1.2.
|
13
|
-
sha256: "
|
12
|
+
version: "1.2.13"
|
13
|
+
sha256: "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30"
|
14
14
|
# SHA-256 hash provided on http://zlib.net/
|
15
15
|
|
16
16
|
libiconv:
|
data/ext/nokogiri/extconf.rb
CHANGED
@@ -712,9 +712,17 @@ else
|
|
712
712
|
else
|
713
713
|
class << recipe
|
714
714
|
def configure
|
715
|
-
|
716
|
-
|
717
|
-
|
715
|
+
env = {}
|
716
|
+
env["CFLAGS"] = concat_flags(ENV["CFLAGS"], "-fPIC", "-g")
|
717
|
+
env["CHOST"] = host
|
718
|
+
execute("configure", ["./configure", "--static", configure_prefix], { env: env })
|
719
|
+
if darwin?
|
720
|
+
# needed as of zlib 1.2.13
|
721
|
+
Dir.chdir(work_path) do
|
722
|
+
makefile = File.read("Makefile").gsub(/^AR=.*$/, "AR=#{host}-libtool")
|
723
|
+
File.open("Makefile", "w") { |m| m.write(makefile) }
|
724
|
+
end
|
725
|
+
end
|
718
726
|
end
|
719
727
|
end
|
720
728
|
end
|
@@ -839,6 +847,11 @@ else
|
|
839
847
|
recipe.configure_options += ["RANLIB=/usr/bin/ranlib", "AR=/usr/bin/ar"]
|
840
848
|
end
|
841
849
|
|
850
|
+
if windows?
|
851
|
+
cflags = concat_flags(cflags, "-ULIBXSLT_STATIC", "-DIN_LIBXSLT")
|
852
|
+
cflags = concat_flags(cflags, "-ULIBEXSLT_STATIC", "-DIN_LIBEXSLT")
|
853
|
+
end
|
854
|
+
|
842
855
|
recipe.configure_options << if source_dir
|
843
856
|
"--config-cache"
|
844
857
|
else
|
data/ext/nokogiri/xml_document.c
CHANGED
@@ -104,7 +104,11 @@ recursively_remove_namespaces_from_node(xmlNodePtr node)
|
|
104
104
|
(node->type == XML_XINCLUDE_START) ||
|
105
105
|
(node->type == XML_XINCLUDE_END)) &&
|
106
106
|
node->nsDef) {
|
107
|
-
|
107
|
+
xmlNsPtr curr = node->nsDef;
|
108
|
+
while (curr) {
|
109
|
+
noko_xml_document_pin_namespace(curr, node->doc);
|
110
|
+
curr = curr->next;
|
111
|
+
}
|
108
112
|
node->nsDef = NULL;
|
109
113
|
}
|
110
114
|
|
@@ -25,13 +25,15 @@
|
|
25
25
|
VALUE cNokogiriXmlNamespace ;
|
26
26
|
|
27
27
|
static void
|
28
|
-
|
28
|
+
_xml_namespace_dealloc(void *ptr)
|
29
29
|
{
|
30
30
|
/*
|
31
31
|
* this deallocator is only used for namespace nodes that are part of an xpath
|
32
32
|
* node set. see noko_xml_namespace_wrap().
|
33
33
|
*/
|
34
|
+
xmlNsPtr ns = ptr;
|
34
35
|
NOKOGIRI_DEBUG_START(ns) ;
|
36
|
+
|
35
37
|
if (ns->href) {
|
36
38
|
xmlFree(DISCARD_CONST_QUAL_XMLCHAR(ns->href));
|
37
39
|
}
|
@@ -42,6 +44,36 @@ dealloc_namespace(xmlNsPtr ns)
|
|
42
44
|
NOKOGIRI_DEBUG_END(ns) ;
|
43
45
|
}
|
44
46
|
|
47
|
+
#ifdef HAVE_RB_GC_LOCATION
|
48
|
+
static void
|
49
|
+
_xml_namespace_update_references(void *ptr)
|
50
|
+
{
|
51
|
+
xmlNsPtr ns = ptr;
|
52
|
+
if (ns->_private) {
|
53
|
+
ns->_private = (void *)rb_gc_location((VALUE)ns->_private);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
#else
|
57
|
+
# define _xml_namespace_update_references 0
|
58
|
+
#endif
|
59
|
+
|
60
|
+
static const rb_data_type_t nokogiri_xml_namespace_type_with_dealloc = {
|
61
|
+
"Nokogiri/XMLNamespace/WithDealloc",
|
62
|
+
{0, _xml_namespace_dealloc, 0, _xml_namespace_update_references},
|
63
|
+
0, 0,
|
64
|
+
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
65
|
+
RUBY_TYPED_FREE_IMMEDIATELY,
|
66
|
+
#endif
|
67
|
+
};
|
68
|
+
|
69
|
+
static const rb_data_type_t nokogiri_xml_namespace_type_without_dealloc = {
|
70
|
+
"Nokogiri/XMLNamespace/WithoutDealloc",
|
71
|
+
{0, 0, 0, _xml_namespace_update_references},
|
72
|
+
0, 0,
|
73
|
+
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
74
|
+
RUBY_TYPED_FREE_IMMEDIATELY,
|
75
|
+
#endif
|
76
|
+
};
|
45
77
|
|
46
78
|
/*
|
47
79
|
* call-seq:
|
@@ -54,7 +86,7 @@ prefix(VALUE self)
|
|
54
86
|
{
|
55
87
|
xmlNsPtr ns;
|
56
88
|
|
57
|
-
|
89
|
+
Noko_Namespace_Get_Struct(self, xmlNs, ns);
|
58
90
|
if (!ns->prefix) { return Qnil; }
|
59
91
|
|
60
92
|
return NOKOGIRI_STR_NEW2(ns->prefix);
|
@@ -71,7 +103,7 @@ href(VALUE self)
|
|
71
103
|
{
|
72
104
|
xmlNsPtr ns;
|
73
105
|
|
74
|
-
|
106
|
+
Noko_Namespace_Get_Struct(self, xmlNs, ns);
|
75
107
|
if (!ns->href) { return Qnil; }
|
76
108
|
|
77
109
|
return NOKOGIRI_STR_NEW2(ns->href);
|
@@ -87,14 +119,18 @@ noko_xml_namespace_wrap(xmlNsPtr c_namespace, xmlDocPtr c_document)
|
|
87
119
|
}
|
88
120
|
|
89
121
|
if (c_document) {
|
90
|
-
rb_namespace =
|
122
|
+
rb_namespace = TypedData_Wrap_Struct(cNokogiriXmlNamespace,
|
123
|
+
&nokogiri_xml_namespace_type_without_dealloc,
|
124
|
+
c_namespace);
|
91
125
|
|
92
126
|
if (DOC_RUBY_OBJECT_TEST(c_document)) {
|
93
127
|
rb_iv_set(rb_namespace, "@document", DOC_RUBY_OBJECT(c_document));
|
94
128
|
rb_ary_push(DOC_NODE_CACHE(c_document), rb_namespace);
|
95
129
|
}
|
96
130
|
} else {
|
97
|
-
rb_namespace =
|
131
|
+
rb_namespace = TypedData_Wrap_Struct(cNokogiriXmlNamespace,
|
132
|
+
&nokogiri_xml_namespace_type_with_dealloc,
|
133
|
+
c_namespace);
|
98
134
|
}
|
99
135
|
|
100
136
|
c_namespace->_private = (void *)rb_namespace;
|
data/ext/nokogiri/xml_node.c
CHANGED
@@ -1353,7 +1353,7 @@ set_namespace(VALUE self, VALUE namespace)
|
|
1353
1353
|
Noko_Node_Get_Struct(self, xmlNode, node);
|
1354
1354
|
|
1355
1355
|
if (!NIL_P(namespace)) {
|
1356
|
-
|
1356
|
+
Noko_Namespace_Get_Struct(namespace, xmlNs, ns);
|
1357
1357
|
}
|
1358
1358
|
|
1359
1359
|
xmlSetNs(node, ns);
|
data/ext/nokogiri/xml_reader.c
CHANGED
@@ -212,6 +212,10 @@ rb_xml_reader_attribute_hash(VALUE rb_reader)
|
|
212
212
|
}
|
213
213
|
|
214
214
|
c_node = xmlTextReaderExpand(c_reader);
|
215
|
+
if (c_node == NULL) {
|
216
|
+
return Qnil;
|
217
|
+
}
|
218
|
+
|
215
219
|
c_property = c_node->properties;
|
216
220
|
while (c_property != NULL) {
|
217
221
|
VALUE rb_name = NOKOGIRI_STR_NEW2(c_property->name);
|
@@ -373,7 +373,10 @@ new (VALUE klass, VALUE nodeobj)
|
|
373
373
|
|
374
374
|
Noko_Node_Get_Struct(nodeobj, xmlNode, node);
|
375
375
|
|
376
|
+
#if LIBXML_VERSION < 21000
|
377
|
+
/* deprecated in 40483d0 */
|
376
378
|
xmlXPathInit();
|
379
|
+
#endif
|
377
380
|
|
378
381
|
ctx = xmlXPathNewContext(node->doc);
|
379
382
|
ctx->node = node;
|
data/lib/nokogiri/nokogiri.jar
CHANGED
Binary file
|
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.13.
|
4
|
+
version: 1.13.10
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
@@ -20,7 +20,7 @@ authors:
|
|
20
20
|
autorequire:
|
21
21
|
bindir: bin
|
22
22
|
cert_chain: []
|
23
|
-
date: 2022-07
|
23
|
+
date: 2022-12-07 00:00:00.000000000 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,6 +92,20 @@ dependencies:
|
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '1.4'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - "~>"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '4.0'
|
101
|
+
name: psych
|
102
|
+
prerelease: false
|
103
|
+
type: :development
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '4.0'
|
95
109
|
- !ruby/object:Gem::Dependency
|
96
110
|
requirement: !ruby/object:Gem::Requirement
|
97
111
|
requirements:
|