nokogiri 1.15.5 → 1.18.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.
- checksums.yaml +4 -4
- data/Gemfile +12 -17
- data/LICENSE-DEPENDENCIES.md +6 -6
- data/README.md +11 -5
- data/dependencies.yml +9 -9
- data/ext/nokogiri/extconf.rb +191 -154
- data/ext/nokogiri/gumbo.c +69 -53
- data/ext/nokogiri/html4_document.c +10 -4
- data/ext/nokogiri/html4_element_description.c +18 -18
- data/ext/nokogiri/html4_sax_parser.c +40 -0
- data/ext/nokogiri/html4_sax_parser_context.c +48 -58
- data/ext/nokogiri/html4_sax_push_parser.c +26 -25
- data/ext/nokogiri/libxml2_polyfill.c +114 -0
- data/ext/nokogiri/nokogiri.c +9 -2
- data/ext/nokogiri/nokogiri.h +25 -33
- data/ext/nokogiri/test_global_handlers.c +1 -1
- data/ext/nokogiri/xml_attr.c +1 -1
- data/ext/nokogiri/xml_cdata.c +3 -12
- data/ext/nokogiri/xml_comment.c +3 -8
- data/ext/nokogiri/xml_document.c +167 -156
- data/ext/nokogiri/xml_document_fragment.c +10 -25
- data/ext/nokogiri/xml_dtd.c +1 -1
- data/ext/nokogiri/xml_element_content.c +9 -9
- data/ext/nokogiri/xml_encoding_handler.c +4 -4
- data/ext/nokogiri/xml_namespace.c +6 -10
- data/ext/nokogiri/xml_node.c +142 -108
- data/ext/nokogiri/xml_node_set.c +46 -44
- data/ext/nokogiri/xml_reader.c +74 -100
- data/ext/nokogiri/xml_relax_ng.c +35 -56
- data/ext/nokogiri/xml_sax_parser.c +156 -88
- data/ext/nokogiri/xml_sax_parser_context.c +220 -128
- data/ext/nokogiri/xml_sax_push_parser.c +69 -50
- data/ext/nokogiri/xml_schema.c +51 -87
- data/ext/nokogiri/xml_syntax_error.c +19 -11
- data/ext/nokogiri/xml_text.c +3 -6
- data/ext/nokogiri/xml_xpath_context.c +104 -104
- data/ext/nokogiri/xslt_stylesheet.c +16 -11
- data/gumbo-parser/Makefile +18 -0
- data/gumbo-parser/src/ascii.c +2 -2
- data/gumbo-parser/src/error.c +76 -48
- data/gumbo-parser/src/error.h +5 -1
- data/gumbo-parser/src/nokogiri_gumbo.h +11 -2
- data/gumbo-parser/src/parser.c +66 -25
- data/gumbo-parser/src/tokenizer.c +7 -6
- data/lib/nokogiri/class_resolver.rb +1 -1
- data/lib/nokogiri/css/node.rb +6 -2
- data/lib/nokogiri/css/parser.rb +6 -4
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/parser_extras.rb +6 -66
- data/lib/nokogiri/css/selector_cache.rb +38 -0
- data/lib/nokogiri/css/tokenizer.rb +4 -4
- data/lib/nokogiri/css/tokenizer.rex +9 -8
- data/lib/nokogiri/css/xpath_visitor.rb +44 -27
- data/lib/nokogiri/css.rb +86 -20
- data/lib/nokogiri/decorators/slop.rb +3 -5
- data/lib/nokogiri/encoding_handler.rb +2 -2
- data/lib/nokogiri/html4/document.rb +45 -24
- data/lib/nokogiri/html4/document_fragment.rb +124 -12
- data/lib/nokogiri/html4/encoding_reader.rb +2 -2
- data/lib/nokogiri/html4/sax/parser.rb +23 -38
- data/lib/nokogiri/html4/sax/parser_context.rb +4 -9
- data/lib/nokogiri/html4.rb +9 -14
- data/lib/nokogiri/html5/builder.rb +40 -0
- data/lib/nokogiri/html5/document.rb +61 -30
- data/lib/nokogiri/html5/document_fragment.rb +130 -20
- data/lib/nokogiri/html5/node.rb +4 -4
- data/lib/nokogiri/html5.rb +114 -138
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/version/info.rb +6 -5
- data/lib/nokogiri/xml/attr.rb +2 -2
- data/lib/nokogiri/xml/builder.rb +8 -1
- data/lib/nokogiri/xml/document.rb +73 -29
- data/lib/nokogiri/xml/document_fragment.rb +86 -15
- data/lib/nokogiri/xml/namespace.rb +1 -2
- data/lib/nokogiri/xml/node.rb +113 -35
- data/lib/nokogiri/xml/node_set.rb +12 -10
- data/lib/nokogiri/xml/parse_options.rb +1 -1
- data/lib/nokogiri/xml/pp/node.rb +6 -1
- data/lib/nokogiri/xml/reader.rb +51 -17
- data/lib/nokogiri/xml/relax_ng.rb +57 -20
- data/lib/nokogiri/xml/sax/document.rb +174 -83
- data/lib/nokogiri/xml/sax/parser.rb +115 -41
- data/lib/nokogiri/xml/sax/parser_context.rb +116 -8
- data/lib/nokogiri/xml/sax/push_parser.rb +3 -0
- data/lib/nokogiri/xml/sax.rb +48 -0
- data/lib/nokogiri/xml/schema.rb +112 -45
- data/lib/nokogiri/xml/searchable.rb +39 -43
- data/lib/nokogiri/xml/syntax_error.rb +23 -1
- data/lib/nokogiri/xml/xpath_context.rb +14 -3
- data/lib/nokogiri/xml.rb +14 -25
- data/lib/nokogiri/xslt/stylesheet.rb +29 -7
- data/lib/nokogiri/xslt.rb +4 -10
- data/lib/nokogiri.rb +1 -1
- data/lib/xsd/xmlparser/nokogiri.rb +3 -4
- data/patches/libxml2/0019-xpath-Use-separate-static-hash-table-for-standard-fu.patch +244 -0
- data/ports/archives/libxml2-2.13.7.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.43.tar.xz +0 -0
- metadata +13 -14
- data/ext/nokogiri/libxml2_backwards_compat.c +0 -121
- data/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch +0 -25
- data/ports/archives/libxml2-2.11.6.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.39.tar.xz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8955e1010e2fd456ffa2ffc7d14808ccb539b0e0190d2e5d5389b2d52cf509b
|
4
|
+
data.tar.gz: b7c3fb55244a74192bea9c32ff5a984a6d1952d850c99816db268bbdd3e0a5c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 175a5a434c88bfb3df0e6b2711d1b5afc24e480dbc4699fa35d91b21183937b9eddb347da96d5f52efbd8a96cdc24d6b0605d1ef722aae53331a5321b8231710
|
7
|
+
data.tar.gz: 4b3692c9b7afb27a6a5f5c41bdcabadf460a3deb5d1a7fe53a7f6f21fb73a22c84e592ca230db031c36acca0c5d6c036a06f1d394af7c51a1df0b2fd555ad5a3
|
data/Gemfile
CHANGED
@@ -7,33 +7,28 @@ gemspec
|
|
7
7
|
group :development do
|
8
8
|
# bootstrapping
|
9
9
|
gem "bundler", "~> 2.3"
|
10
|
-
gem "rake", "
|
10
|
+
gem "rake", "13.2.1"
|
11
11
|
|
12
12
|
# building extensions
|
13
|
-
gem "rake-compiler", "
|
14
|
-
gem "rake-compiler-dock", "
|
15
|
-
|
16
|
-
# documentation
|
17
|
-
gem "hoe-markdown", "= 1.4.0"
|
13
|
+
gem "rake-compiler", "1.2.8"
|
14
|
+
gem "rake-compiler-dock", "1.7.0"
|
18
15
|
|
19
16
|
# parser generator
|
20
|
-
gem "rexical", "
|
17
|
+
gem "rexical", "1.0.8"
|
21
18
|
|
22
19
|
# tests
|
23
|
-
gem "minitest", "5.
|
24
|
-
gem "minitest-
|
25
|
-
gem "ruby_memcheck", "
|
20
|
+
gem "minitest", "5.25.4"
|
21
|
+
gem "minitest-parallel_fork", "2.0.0"
|
22
|
+
gem "ruby_memcheck", "3.0.0"
|
26
23
|
gem "rubyzip", "~> 2.3.2"
|
27
24
|
gem "simplecov", "= 0.21.2"
|
28
25
|
|
29
26
|
# rubocop
|
30
|
-
|
31
|
-
gem "
|
32
|
-
gem "rubocop-minitest", "0.
|
27
|
+
unless RUBY_PLATFORM == "java"
|
28
|
+
gem "standard", "1.43.0"
|
29
|
+
gem "rubocop-minitest", "0.36.0"
|
33
30
|
gem "rubocop-packaging", "0.5.2"
|
34
|
-
gem "rubocop-
|
35
|
-
gem "rubocop-rake", "= 0.6.0"
|
36
|
-
gem "rubocop-shopify", "2.13.0"
|
31
|
+
gem "rubocop-rake", "0.6.0"
|
37
32
|
end
|
38
33
|
end
|
39
34
|
|
@@ -41,5 +36,5 @@ end
|
|
41
36
|
# `bundle config set --local without rdoc`
|
42
37
|
# Then re-run `bundle install`.
|
43
38
|
group :rdoc do
|
44
|
-
gem "rdoc", "6.
|
39
|
+
gem "rdoc", "6.10.0" unless RUBY_PLATFORM == "java" || ENV["CI"]
|
45
40
|
end
|
data/LICENSE-DEPENDENCIES.md
CHANGED
@@ -10,9 +10,9 @@ Note that this document is broken into multiple sections, each of which describe
|
|
10
10
|
|
11
11
|
- [Platform Releases](#platform-releases)
|
12
12
|
* [Default platform release ("ruby")](#default-platform-release-ruby)
|
13
|
-
* [Native LinuxⓇ platform releases ("x86_64-linux", "
|
13
|
+
* [Native LinuxⓇ platform releases ("x86_64-linux", "aarch64-linux", and "arm-linux")](#native-linux%E2%93%A1-platform-releases-x86_64-linux-aarch64-linux-and-arm-linux)
|
14
14
|
* [Native Darwin (macOSⓇ) platform releases ("x86_64-darwin" and "arm64-darwin")](#native-darwin-macos%E2%93%A1-platform-releases-x86_64-darwin-and-arm64-darwin)
|
15
|
-
* [Native WindowsⓇ platform releases ("
|
15
|
+
* [Native WindowsⓇ platform releases ("x64-mingw-ucrt")](#native-windows%E2%93%A1-platform-releases-x64-mingw-ucrt)
|
16
16
|
* [JavaⓇ (JRuby) platform release ("java")](#java%E2%93%A1-jruby-platform-release-java)
|
17
17
|
- [Appendix: Dependencies' License Texts](#appendix-dependencies-license-texts)
|
18
18
|
* [libgumbo](#libgumbo)
|
@@ -51,7 +51,7 @@ The default platform release distributes the following dependencies in source fo
|
|
51
51
|
This distribution can be identified by inspecting the included Gem::Specification, which will have the value "ruby" for its "platform" attribute.
|
52
52
|
|
53
53
|
|
54
|
-
### Native LinuxⓇ platform releases ("x86_64-linux", "
|
54
|
+
### Native LinuxⓇ platform releases ("x86_64-linux", "aarch64-linux", and "arm-linux")
|
55
55
|
|
56
56
|
The native LinuxⓇ platform release distributes the following dependencies in source form:
|
57
57
|
|
@@ -60,7 +60,7 @@ The native LinuxⓇ platform release distributes the following dependencies in s
|
|
60
60
|
* [libgumbo](#libgumbo)
|
61
61
|
* [zlib](#zlib)
|
62
62
|
|
63
|
-
This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-linux" or "
|
63
|
+
This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-linux" or "aarch64-linux" for its "platform.cpu" attribute.
|
64
64
|
|
65
65
|
|
66
66
|
### Native Darwin (macOSⓇ) platform releases ("x86_64-darwin" and "arm64-darwin")
|
@@ -76,7 +76,7 @@ The native Darwin platform release distributes the following dependencies in sou
|
|
76
76
|
This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-darwin" or "arm64-darwin" for its "platform.cpu" attribute. Darwin is also known more familiarly as "OSX" or "macOSⓇ" and is the operating system for many AppleⓇ computers.
|
77
77
|
|
78
78
|
|
79
|
-
### Native WindowsⓇ platform releases ("
|
79
|
+
### Native WindowsⓇ platform releases ("x64-mingw-ucrt")
|
80
80
|
|
81
81
|
The native WindowsⓇ platform release distributes the following dependencies in source form:
|
82
82
|
|
@@ -86,7 +86,7 @@ The native WindowsⓇ platform release distributes the following dependencies in
|
|
86
86
|
* [zlib](#zlib)
|
87
87
|
* [libiconv](#libiconv)
|
88
88
|
|
89
|
-
This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x64-
|
89
|
+
This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x64-mingw-ucrt" for its "platform.cpu" attribute.
|
90
90
|
|
91
91
|
|
92
92
|
### JavaⓇ (JRuby) platform release ("java")
|
data/README.md
CHANGED
@@ -55,6 +55,7 @@ There are a few ways to ask exploratory questions:
|
|
55
55
|
|
56
56
|
- The Nokogiri mailing list is active at https://groups.google.com/group/nokogiri-talk
|
57
57
|
- Open an issue using the "Help Request" template at https://github.com/sparklemotion/nokogiri/issues
|
58
|
+
- Open a discussion at https://github.com/sparklemotion/nokogiri/discussions
|
58
59
|
|
59
60
|
Please do not mail the maintainers at their personal addresses.
|
60
61
|
|
@@ -90,6 +91,8 @@ We bump `Major.Minor.Patch` versions following this guidance:
|
|
90
91
|
- Updating packaged libraries for non-security-related reasons.
|
91
92
|
- Dropping support for EOLed Ruby versions. [Some folks find this objectionable](https://github.com/sparklemotion/nokogiri/issues/1568), but [SemVer says this is OK if the public API hasn't changed](https://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api).
|
92
93
|
- Backwards-incompatible changes to internal or private methods and constants. These are detailed in the "Changes" section of each changelog entry.
|
94
|
+
- Removal of deprecated methods or parameters, after a generous transition period; usually when those methods or parameters are rarely-used or dangerous to the user. Essentially, removals that do not justify a major version bump.
|
95
|
+
|
93
96
|
|
94
97
|
`Patch`:
|
95
98
|
|
@@ -111,9 +114,13 @@ You can help sponsor the maintainers of this software through one of these organ
|
|
111
114
|
|
112
115
|
Requirements:
|
113
116
|
|
114
|
-
- Ruby >=
|
117
|
+
- Ruby >= 3.1
|
115
118
|
- JRuby >= 9.4.0.0
|
116
119
|
|
120
|
+
If you are compiling the native extension against a system version of libxml2:
|
121
|
+
|
122
|
+
- libxml2 >= 2.9.2 (recommended >= 2.12.0)
|
123
|
+
|
117
124
|
|
118
125
|
### Native Gems: Faster, more reliable installation
|
119
126
|
|
@@ -124,11 +131,10 @@ Requirements:
|
|
124
131
|
Nokogiri ships pre-compiled, "native" gems for the following platforms:
|
125
132
|
|
126
133
|
- Linux:
|
127
|
-
- `
|
128
|
-
- `aarch64-linux
|
129
|
-
- Note that musl platforms like Alpine **are** supported
|
134
|
+
- `x86_64-linux-gnu`, `aarch64-linux-gnu`, and `arm-linux-gnu` (req: `glibc >= 2.29`)
|
135
|
+
- `x86_64-linux-musl`, `aarch64-linux-musl`, and `arm-linux-musl`
|
130
136
|
- Darwin/MacOS: `x86_64-darwin` and `arm64-darwin`
|
131
|
-
- Windows: `
|
137
|
+
- Windows: `x64-mingw-ucrt`
|
132
138
|
- Java: any platform running JRuby 9.4 or higher
|
133
139
|
|
134
140
|
To determine whether your system supports one of these gems, look at the output of `bundle platform` or `ruby -e 'puts Gem::Platform.local.to_s'`.
|
data/dependencies.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
|
1
|
+
---
|
2
2
|
libxml2:
|
3
|
-
version: "2.
|
4
|
-
sha256: "
|
5
|
-
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.
|
3
|
+
version: "2.13.7"
|
4
|
+
sha256: "14796d24402108e99d8de4e974d539bed62e23af8c4233317274ce073ceff93b"
|
5
|
+
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.7.sha256sum
|
6
6
|
|
7
7
|
libxslt:
|
8
|
-
version: "1.1.
|
9
|
-
sha256: "
|
10
|
-
# sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.
|
8
|
+
version: "1.1.43"
|
9
|
+
sha256: "5a3d6b383ca5afc235b171118e90f5ff6aa27e9fea3303065231a6d403f0183a"
|
10
|
+
# sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.43.sha256sum
|
11
11
|
|
12
12
|
zlib:
|
13
|
-
version: "1.
|
14
|
-
sha256: "
|
13
|
+
version: "1.3.1"
|
14
|
+
sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
|
15
15
|
# SHA-256 hash provided on http://zlib.net/
|
16
16
|
|
17
17
|
libiconv:
|