nokogiri 1.17.0 → 1.19.2
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 -10
- data/LICENSE-DEPENDENCIES.md +193 -6
- data/README.md +21 -7
- data/dependencies.yml +15 -26
- data/ext/nokogiri/extconf.rb +8 -24
- data/ext/nokogiri/xml_document.c +9 -5
- data/ext/nokogiri/xml_node.c +5 -0
- data/ext/nokogiri/xml_sax_parser_context.c +8 -2
- data/ext/nokogiri/xml_xpath_context.c +102 -99
- data/gumbo-parser/src/ascii.c +2 -2
- data/gumbo-parser/src/parser.c +2 -2
- data/lib/nokogiri/class_resolver.rb +0 -2
- data/lib/nokogiri/css/xpath_visitor.rb +2 -1
- data/lib/nokogiri/jruby/nokogiri_jars.rb +16 -11
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/xml/searchable.rb +32 -34
- data/lib/nokogiri/xml/xpath_context.rb +14 -3
- data/patches/libxml2/0019-xpath-Use-separate-static-hash-table-for-standard-fu.patch +244 -0
- data/ports/archives/libxml2-2.13.9.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.43.tar.xz +0 -0
- metadata +8 -10
- data/ports/archives/libxml2-2.13.5.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.42.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: 586e0f05930a3d701ef1ed6513bc946d53b49b6c65566848543aafe8790ee387
|
|
4
|
+
data.tar.gz: 8a6286b2e6e0ad7167a522a7103a764ccc000fa6d0b04ddcf9eb14da090032f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c609226242cea3c824efdbdb448c6ced7d7076a01139e109e9b4d3bd004693d51a24935b753650ead3602a2a8dd322d9196099ca05e4084383b6e044ed3b564
|
|
7
|
+
data.tar.gz: 12e02e4eae83216fdf7d7f3b73f5117130e013e69f10795cf6198832170e09c7a59c3163a9ffa55c103ec7c22e3cf3d6fea85a3e5d61d526057d4ee8393315f9
|
data/Gemfile
CHANGED
|
@@ -6,33 +6,35 @@ gemspec
|
|
|
6
6
|
|
|
7
7
|
group :development do
|
|
8
8
|
# bootstrapping
|
|
9
|
-
gem "bundler", "~> 2.3"
|
|
10
9
|
gem "rake", "13.2.1"
|
|
11
10
|
|
|
12
11
|
# building extensions
|
|
13
|
-
gem "rake-compiler", "1.
|
|
14
|
-
gem "rake-compiler-dock", "1.
|
|
12
|
+
gem "rake-compiler", "1.3.1"
|
|
13
|
+
gem "rake-compiler-dock", "1.11.1"
|
|
15
14
|
|
|
16
15
|
# parser generator
|
|
17
16
|
gem "rexical", "1.0.8"
|
|
18
17
|
|
|
19
18
|
# tests
|
|
20
|
-
gem "minitest", "
|
|
21
|
-
gem "minitest-
|
|
19
|
+
gem "minitest", "6.0.1"
|
|
20
|
+
gem "minitest-mock", "5.27.0"
|
|
21
|
+
gem "minitest-parallel_fork", "2.1.1"
|
|
22
22
|
gem "ruby_memcheck", "3.0.0"
|
|
23
23
|
gem "rubyzip", "~> 2.3.2"
|
|
24
24
|
gem "simplecov", "= 0.21.2"
|
|
25
25
|
|
|
26
26
|
# rubocop
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
unless RUBY_PLATFORM == "java"
|
|
28
|
+
gem "standard", "1.43.0"
|
|
29
|
+
gem "rubocop-minitest", "0.36.0"
|
|
30
|
+
gem "rubocop-packaging", "0.5.2"
|
|
31
|
+
gem "rubocop-rake", "0.6.0"
|
|
32
|
+
end
|
|
31
33
|
end
|
|
32
34
|
|
|
33
35
|
# If Psych doesn't build, you can disable this group locally by running
|
|
34
36
|
# `bundle config set --local without rdoc`
|
|
35
37
|
# Then re-run `bundle install`.
|
|
36
38
|
group :rdoc do
|
|
37
|
-
gem "rdoc", "
|
|
39
|
+
gem "rdoc", "7.0.3" unless RUBY_PLATFORM == "java" || ENV["CI"]
|
|
38
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)
|
|
@@ -25,6 +25,7 @@ Note that this document is broken into multiple sections, each of which describe
|
|
|
25
25
|
* [net.sourceforge.htmlunit:neko-htmlunit](#netsourceforgehtmlunitneko-htmlunit)
|
|
26
26
|
* [nu.validator:jing](#nuvalidatorjing)
|
|
27
27
|
* [org.nokogiri:nekodtd](#orgnokogirinekodtd)
|
|
28
|
+
* [org.xmlresolver:xmlresolver](#orgxmlresolverxmlresolver)
|
|
28
29
|
* [xalan:serializer and xalan:xalan](#xalanserializer-and-xalanxalan)
|
|
29
30
|
* [xerces:xercesImpl](#xercesxercesimpl)
|
|
30
31
|
* [xml-apis:xml-apis](#xml-apisxml-apis)
|
|
@@ -51,7 +52,7 @@ The default platform release distributes the following dependencies in source fo
|
|
|
51
52
|
This distribution can be identified by inspecting the included Gem::Specification, which will have the value "ruby" for its "platform" attribute.
|
|
52
53
|
|
|
53
54
|
|
|
54
|
-
### Native LinuxⓇ platform releases ("x86_64-linux", "
|
|
55
|
+
### Native LinuxⓇ platform releases ("x86_64-linux", "aarch64-linux", and "arm-linux")
|
|
55
56
|
|
|
56
57
|
The native LinuxⓇ platform release distributes the following dependencies in source form:
|
|
57
58
|
|
|
@@ -60,7 +61,7 @@ The native LinuxⓇ platform release distributes the following dependencies in s
|
|
|
60
61
|
* [libgumbo](#libgumbo)
|
|
61
62
|
* [zlib](#zlib)
|
|
62
63
|
|
|
63
|
-
This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-linux" or "
|
|
64
|
+
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
65
|
|
|
65
66
|
|
|
66
67
|
### Native Darwin (macOSⓇ) platform releases ("x86_64-darwin" and "arm64-darwin")
|
|
@@ -76,7 +77,7 @@ The native Darwin platform release distributes the following dependencies in sou
|
|
|
76
77
|
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
78
|
|
|
78
79
|
|
|
79
|
-
### Native WindowsⓇ platform releases ("
|
|
80
|
+
### Native WindowsⓇ platform releases ("x64-mingw-ucrt")
|
|
80
81
|
|
|
81
82
|
The native WindowsⓇ platform release distributes the following dependencies in source form:
|
|
82
83
|
|
|
@@ -86,7 +87,7 @@ The native WindowsⓇ platform release distributes the following dependencies in
|
|
|
86
87
|
* [zlib](#zlib)
|
|
87
88
|
* [libiconv](#libiconv)
|
|
88
89
|
|
|
89
|
-
This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x64-
|
|
90
|
+
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
91
|
|
|
91
92
|
|
|
92
93
|
### JavaⓇ (JRuby) platform release ("java")
|
|
@@ -98,6 +99,7 @@ The Java platform release distributes the following dependencies as compiled jar
|
|
|
98
99
|
* [net.sourceforge.htmlunit:neko-htmlunit](#netsourceforgehtmlunitneko-htmlunit)
|
|
99
100
|
* [nu.validator:jing](#nuvalidatorjing)
|
|
100
101
|
* [org.nokogiri:nekodtd](#orgnokogirinekodtd)
|
|
102
|
+
* [org.xmlresolver:xmlresolver](#orgxmlresolverxmlresolver)
|
|
101
103
|
* [xalan:serializer and xalan:xalan](#xalanserializer-and-xalanxalan)
|
|
102
104
|
* [xerces:xercesImpl](#xercesxercesimpl)
|
|
103
105
|
* [xml-apis:xml-apis](#xml-apisxml-apis)
|
|
@@ -1661,6 +1663,191 @@ https://github.com/sparklemotion/nekodtd
|
|
|
1661
1663
|
END OF TERMS AND CONDITIONS
|
|
1662
1664
|
|
|
1663
1665
|
|
|
1666
|
+
### org.xmlresolver:xmlresolver
|
|
1667
|
+
|
|
1668
|
+
Apache 2.0
|
|
1669
|
+
|
|
1670
|
+
https://xmlresolver.org/
|
|
1671
|
+
|
|
1672
|
+
Apache License
|
|
1673
|
+
Version 2.0, January 2004
|
|
1674
|
+
http://www.apache.org/licenses/
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
1678
|
+
|
|
1679
|
+
1. Definitions.
|
|
1680
|
+
|
|
1681
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
1682
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
1683
|
+
|
|
1684
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
1685
|
+
the copyright owner that is granting the License.
|
|
1686
|
+
|
|
1687
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
1688
|
+
other entities that control, are controlled by, or are under common
|
|
1689
|
+
control with that entity. For the purposes of this definition,
|
|
1690
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
1691
|
+
direction or management of such entity, whether by contract or
|
|
1692
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
1693
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
1694
|
+
|
|
1695
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
1696
|
+
exercising permissions granted by this License.
|
|
1697
|
+
|
|
1698
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
1699
|
+
including but not limited to software source code, documentation
|
|
1700
|
+
source, and configuration files.
|
|
1701
|
+
|
|
1702
|
+
"Object" form shall mean any form resulting from mechanical
|
|
1703
|
+
transformation or translation of a Source form, including but
|
|
1704
|
+
not limited to compiled object code, generated documentation,
|
|
1705
|
+
and conversions to other media types.
|
|
1706
|
+
|
|
1707
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
1708
|
+
Object form, made available under the License, as indicated by a
|
|
1709
|
+
copyright notice that is included in or attached to the work
|
|
1710
|
+
(an example is provided in the Appendix below).
|
|
1711
|
+
|
|
1712
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
1713
|
+
form, that is based on (or derived from) the Work and for which the
|
|
1714
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
1715
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
1716
|
+
of this License, Derivative Works shall not include works that remain
|
|
1717
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
1718
|
+
the Work and Derivative Works thereof.
|
|
1719
|
+
|
|
1720
|
+
"Contribution" shall mean any work of authorship, including
|
|
1721
|
+
the original version of the Work and any modifications or additions
|
|
1722
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
1723
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
1724
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
1725
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
1726
|
+
means any form of electronic, verbal, or written communication sent
|
|
1727
|
+
to the Licensor or its representatives, including but not limited to
|
|
1728
|
+
communication on electronic mailing lists, source code control systems,
|
|
1729
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
1730
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
1731
|
+
excluding communication that is conspicuously marked or otherwise
|
|
1732
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
1733
|
+
|
|
1734
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
1735
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
1736
|
+
subsequently incorporated within the Work.
|
|
1737
|
+
|
|
1738
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
1739
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
1740
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
1741
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
1742
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
1743
|
+
Work and such Derivative Works in Source or Object form.
|
|
1744
|
+
|
|
1745
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
1746
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
1747
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
1748
|
+
(except as stated in this section) patent license to make, have made,
|
|
1749
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
1750
|
+
where such license applies only to those patent claims licensable
|
|
1751
|
+
by such Contributor that are necessarily infringed by their
|
|
1752
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
1753
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
1754
|
+
institute patent litigation against any entity (including a
|
|
1755
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
1756
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
1757
|
+
or contributory patent infringement, then any patent licenses
|
|
1758
|
+
granted to You under this License for that Work shall terminate
|
|
1759
|
+
as of the date such litigation is filed.
|
|
1760
|
+
|
|
1761
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
1762
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
1763
|
+
modifications, and in Source or Object form, provided that You
|
|
1764
|
+
meet the following conditions:
|
|
1765
|
+
|
|
1766
|
+
(a) You must give any other recipients of the Work or
|
|
1767
|
+
Derivative Works a copy of this License; and
|
|
1768
|
+
|
|
1769
|
+
(b) You must cause any modified files to carry prominent notices
|
|
1770
|
+
stating that You changed the files; and
|
|
1771
|
+
|
|
1772
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
1773
|
+
that You distribute, all copyright, patent, trademark, and
|
|
1774
|
+
attribution notices from the Source form of the Work,
|
|
1775
|
+
excluding those notices that do not pertain to any part of
|
|
1776
|
+
the Derivative Works; and
|
|
1777
|
+
|
|
1778
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
1779
|
+
distribution, then any Derivative Works that You distribute must
|
|
1780
|
+
include a readable copy of the attribution notices contained
|
|
1781
|
+
within such NOTICE file, excluding those notices that do not
|
|
1782
|
+
pertain to any part of the Derivative Works, in at least one
|
|
1783
|
+
of the following places: within a NOTICE text file distributed
|
|
1784
|
+
as part of the Derivative Works; within the Source form or
|
|
1785
|
+
documentation, if provided along with the Derivative Works; or,
|
|
1786
|
+
within a display generated by the Derivative Works, if and
|
|
1787
|
+
wherever such third-party notices normally appear. The contents
|
|
1788
|
+
of the NOTICE file are for informational purposes only and
|
|
1789
|
+
do not modify the License. You may add Your own attribution
|
|
1790
|
+
notices within Derivative Works that You distribute, alongside
|
|
1791
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
1792
|
+
that such additional attribution notices cannot be construed
|
|
1793
|
+
as modifying the License.
|
|
1794
|
+
|
|
1795
|
+
You may add Your own copyright statement to Your modifications and
|
|
1796
|
+
may provide additional or different license terms and conditions
|
|
1797
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
1798
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
1799
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
1800
|
+
the conditions stated in this License.
|
|
1801
|
+
|
|
1802
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
1803
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
1804
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
1805
|
+
this License, without any additional terms or conditions.
|
|
1806
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
1807
|
+
the terms of any separate license agreement you may have executed
|
|
1808
|
+
with Licensor regarding such Contributions.
|
|
1809
|
+
|
|
1810
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
1811
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
1812
|
+
except as required for reasonable and customary use in describing the
|
|
1813
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
1814
|
+
|
|
1815
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
1816
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
1817
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
1818
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
1819
|
+
implied, including, without limitation, any warranties or conditions
|
|
1820
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
1821
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
1822
|
+
appropriateness of using or redistributing the Work and assume any
|
|
1823
|
+
risks associated with Your exercise of permissions under this License.
|
|
1824
|
+
|
|
1825
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
1826
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
1827
|
+
unless required by applicable law (such as deliberate and grossly
|
|
1828
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
1829
|
+
liable to You for damages, including any direct, indirect, special,
|
|
1830
|
+
incidental, or consequential damages of any character arising as a
|
|
1831
|
+
result of this License or out of the use or inability to use the
|
|
1832
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
1833
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
1834
|
+
other commercial damages or losses), even if such Contributor
|
|
1835
|
+
has been advised of the possibility of such damages.
|
|
1836
|
+
|
|
1837
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
1838
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
1839
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
1840
|
+
or other liability obligations and/or rights consistent with this
|
|
1841
|
+
License. However, in accepting such obligations, You may act only
|
|
1842
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
1843
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
1844
|
+
defend, and hold each Contributor harmless for any liability
|
|
1845
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
1846
|
+
of your accepting any such warranty or additional liability.
|
|
1847
|
+
|
|
1848
|
+
END OF TERMS AND CONDITIONS
|
|
1849
|
+
|
|
1850
|
+
|
|
1664
1851
|
### xalan:serializer and xalan:xalan
|
|
1665
1852
|
|
|
1666
1853
|
Apache 2.0
|
data/README.md
CHANGED
|
@@ -114,8 +114,8 @@ You can help sponsor the maintainers of this software through one of these organ
|
|
|
114
114
|
|
|
115
115
|
Requirements:
|
|
116
116
|
|
|
117
|
-
- Ruby >= 3.
|
|
118
|
-
- JRuby >=
|
|
117
|
+
- Ruby >= 3.2
|
|
118
|
+
- JRuby >= 10.0
|
|
119
119
|
|
|
120
120
|
If you are compiling the native extension against a system version of libxml2:
|
|
121
121
|
|
|
@@ -131,12 +131,11 @@ If you are compiling the native extension against a system version of libxml2:
|
|
|
131
131
|
Nokogiri ships pre-compiled, "native" gems for the following platforms:
|
|
132
132
|
|
|
133
133
|
- Linux:
|
|
134
|
-
- `
|
|
135
|
-
- `aarch64-linux
|
|
136
|
-
- 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`
|
|
137
136
|
- Darwin/MacOS: `x86_64-darwin` and `arm64-darwin`
|
|
138
|
-
- Windows: `
|
|
139
|
-
- Java: any platform running JRuby
|
|
137
|
+
- Windows: `x64-mingw-ucrt`
|
|
138
|
+
- Java: any platform running JRuby 10.0 or higher
|
|
140
139
|
|
|
141
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'`.
|
|
142
141
|
|
|
@@ -292,3 +291,18 @@ Some additional libraries may be distributed with your version of Nokogiri. Plea
|
|
|
292
291
|
- Sergio Arbeo
|
|
293
292
|
- Timothy Elliott
|
|
294
293
|
- Nobuyoshi Nakada
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
## Sponsors
|
|
297
|
+
|
|
298
|
+
These folks have generously sponsored Nokogiri's development. Thank you for your support!
|
|
299
|
+
|
|
300
|
+
<p class="sponsors">
|
|
301
|
+
<span style="white-space: nowrap;"><a href="https://sentry.io"><img src="https://nokogiri.org/images/sponsors/sentry-icon.png" alt="Sentry" height="44" style="vertical-align: middle;"></a> <b>Sentry</b></span>
|
|
302
|
+
|
|
303
|
+
<span style="white-space: nowrap;"><a href="https://codecov.io"><img src="https://nokogiri.org/images/sponsors/codecov-icon.png" alt="Codecov" height="44" style="vertical-align: middle;"></a> <b>Codecov</b></span>
|
|
304
|
+
|
|
305
|
+
<span style="white-space: nowrap;"><a href="https://gusto.com"><img src="https://nokogiri.org/images/sponsors/gusto-icon.png" alt="Gusto" height="44" style="vertical-align: middle;"></a> <b>Gusto</b></span>
|
|
306
|
+
|
|
307
|
+
<span style="white-space: nowrap;"><a href="https://hasdata.com"><img src="https://nokogiri.org/images/sponsors/hasdata-icon.png" alt="HasData" height="44" style="vertical-align: middle;"></a> <b>HasData</b></span>
|
|
308
|
+
</p>
|
data/dependencies.yml
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
libxml2:
|
|
3
|
-
version: "2.13.
|
|
4
|
-
sha256: "
|
|
5
|
-
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.
|
|
3
|
+
version: "2.13.9"
|
|
4
|
+
sha256: "a2c9ae7b770da34860050c309f903221c67830c86e4a7e760692b803df95143a"
|
|
5
|
+
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.9.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
13
|
version: "1.3.1"
|
|
@@ -15,28 +15,17 @@ zlib:
|
|
|
15
15
|
# SHA-256 hash provided on http://zlib.net/
|
|
16
16
|
|
|
17
17
|
libiconv:
|
|
18
|
-
|
|
19
|
-
sha256: "8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313"
|
|
20
|
-
# signature verified by following this path:
|
|
21
|
-
# - release announced at https://savannah.gnu.org/forum/forum.php?forum_id=10175
|
|
22
|
-
# - which links to https://savannah.gnu.org/users/haible as the releaser
|
|
23
|
-
# - which links to https://savannah.gnu.org/people/viewgpg.php?user_id=1871 as the gpg key
|
|
24
|
-
#
|
|
25
|
-
# So:
|
|
26
|
-
# - wget -q -O - https://savannah.gnu.org/people/viewgpg.php?user_id=1871 | gpg --import
|
|
27
|
-
# gpg: key F5BE8B267C6A406D: 1 signature not checked due to a missing key
|
|
18
|
+
# $ gpg --keyserver keyserver.ubuntu.com --recv 9001B85AF9E1B83DF1BDA942F5BE8B267C6A406D
|
|
28
19
|
# gpg: key F5BE8B267C6A406D: public key "Bruno Haible (Open Source Development) <bruno@clisp.org>" imported
|
|
29
20
|
# gpg: Total number processed: 1
|
|
30
21
|
# gpg: imported: 1
|
|
31
|
-
#
|
|
32
|
-
# gpg:
|
|
33
|
-
# gpg: next trustdb check due at 2024-05-09
|
|
34
|
-
# - gpg --verify libiconv-1.17.tar.gz.sig ports/archives/libiconv-1.17.tar.gz
|
|
35
|
-
# gpg: Signature made Sun 15 May 2022 11:26:42 AM EDT
|
|
22
|
+
# $ gpg --verify libiconv-1.18.tar.gz.sig ports/archives/libiconv-1.18.tar.gz
|
|
23
|
+
# gpg: Signature made Sun 15 Dec 2024 07:26:18 AM EST
|
|
36
24
|
# gpg: using RSA key 9001B85AF9E1B83DF1BDA942F5BE8B267C6A406D
|
|
37
|
-
# gpg: Good signature from "Bruno Haible (Open Source Development) <bruno@clisp.org>" [
|
|
38
|
-
# gpg:
|
|
39
|
-
# gpg: There is no indication that the signature belongs to the owner.
|
|
25
|
+
# gpg: Good signature from "Bruno Haible (Open Source Development) <bruno@clisp.org>" [expired]
|
|
26
|
+
# gpg: Note: This key has expired!
|
|
40
27
|
# Primary key fingerprint: 9001 B85A F9E1 B83D F1BD A942 F5BE 8B26 7C6A 406D
|
|
41
|
-
#
|
|
42
|
-
#
|
|
28
|
+
# $ sha256sum ports/archives/libiconv-1.18.tar.gz
|
|
29
|
+
# 3b08f5f4f9b4eb82f151a7040bfd6fe6c6fb922efe4b1659c66ea933276965e8 ports/archives/libiconv-1.18.tar.gz
|
|
30
|
+
version: "1.18"
|
|
31
|
+
sha256: "3b08f5f4f9b4eb82f151a7040bfd6fe6c6fb922efe4b1659c66ea933276965e8"
|
data/ext/nokogiri/extconf.rb
CHANGED
|
@@ -240,15 +240,7 @@ def zlib_source(version_string)
|
|
|
240
240
|
end
|
|
241
241
|
|
|
242
242
|
def gnome_source
|
|
243
|
-
|
|
244
|
-
# but whatever host is resolved on the github actions workers see an expired cert.
|
|
245
|
-
#
|
|
246
|
-
# See https://github.com/sparklemotion/nokogiri/runs/5266206403?check_suite_focus=true
|
|
247
|
-
if ENV["NOKOGIRI_USE_CANONICAL_GNOME_SOURCE"]
|
|
248
|
-
"https://download.gnome.org"
|
|
249
|
-
else
|
|
250
|
-
"https://muug.ca/mirror/gnome" # old reliable
|
|
251
|
-
end
|
|
243
|
+
"https://download.gnome.org"
|
|
252
244
|
end
|
|
253
245
|
|
|
254
246
|
LOCAL_PACKAGE_RESPONSE = Object.new
|
|
@@ -627,7 +619,7 @@ end
|
|
|
627
619
|
def needs_darwin_linker_hack
|
|
628
620
|
config_cross_build? &&
|
|
629
621
|
darwin? &&
|
|
630
|
-
Gem::Requirement.new("
|
|
622
|
+
Gem::Requirement.new(">= 3.2").satisfied_by?(Gem::Version.new(RbConfig::CONFIG["ruby_version"].split("+").first))
|
|
631
623
|
end
|
|
632
624
|
|
|
633
625
|
#
|
|
@@ -840,14 +832,14 @@ else
|
|
|
840
832
|
cross_build_p,
|
|
841
833
|
) do |recipe|
|
|
842
834
|
recipe.files = [{
|
|
843
|
-
url: "https://
|
|
835
|
+
url: "https://ftpmirror.gnu.org/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz",
|
|
844
836
|
sha256: dependencies["libiconv"]["sha256"],
|
|
845
837
|
}]
|
|
846
838
|
|
|
847
839
|
# The libiconv configure script doesn't accept "arm64" host string but "aarch64"
|
|
848
840
|
recipe.host = recipe.host.gsub("arm64-apple-darwin", "aarch64-apple-darwin")
|
|
849
841
|
|
|
850
|
-
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-
|
|
842
|
+
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-g")
|
|
851
843
|
|
|
852
844
|
recipe.configure_options += [
|
|
853
845
|
"--disable-dependency-tracking",
|
|
@@ -911,7 +903,7 @@ else
|
|
|
911
903
|
end
|
|
912
904
|
|
|
913
905
|
cppflags = concat_flags(ENV["CPPFLAGS"])
|
|
914
|
-
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-
|
|
906
|
+
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-g")
|
|
915
907
|
|
|
916
908
|
if cross_build_p
|
|
917
909
|
cppflags = concat_flags(cppflags, "-DNOKOGIRI_PRECOMPILED_LIBRARIES")
|
|
@@ -952,7 +944,6 @@ else
|
|
|
952
944
|
"--with-c14n",
|
|
953
945
|
"--with-debug",
|
|
954
946
|
"--with-threads",
|
|
955
|
-
"--without-tls", # see https://github.com/sparklemotion/nokogiri/issues/3031
|
|
956
947
|
"CPPFLAGS=#{cppflags}",
|
|
957
948
|
"CFLAGS=#{cflags}",
|
|
958
949
|
]
|
|
@@ -971,7 +962,7 @@ else
|
|
|
971
962
|
recipe.patch_files = Dir[File.join(PACKAGE_ROOT_DIR, "patches", "libxslt", "*.patch")].sort
|
|
972
963
|
end
|
|
973
964
|
|
|
974
|
-
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-
|
|
965
|
+
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-g")
|
|
975
966
|
|
|
976
967
|
if darwin? && !cross_build_p
|
|
977
968
|
recipe.configure_options << "RANLIB=/usr/bin/ranlib" unless ENV.key?("RANLIB")
|
|
@@ -1117,14 +1108,7 @@ else
|
|
|
1117
1108
|
end
|
|
1118
1109
|
env["RANLIB"] = "#{host}-ranlib"
|
|
1119
1110
|
if windows?
|
|
1120
|
-
|
|
1121
|
-
# msvcrt (ruby <= 3.0) or ucrt (ruby > 3.0), so even though this gets evaluated only once
|
|
1122
|
-
# per gem (and not per-version-of-ruby), it's OK.
|
|
1123
|
-
env["CFLAGS"] = if RbConfig::CONFIG["RUBY_SO_NAME"].include?("msvcrt")
|
|
1124
|
-
concat_flags(env["CFLAGS"], "-D_RUBY_MSVCRT")
|
|
1125
|
-
else
|
|
1126
|
-
concat_flags(env["CFLAGS"], "-D_RUBY_UCRT")
|
|
1127
|
-
end
|
|
1111
|
+
concat_flags(env["CFLAGS"], "-D_RUBY_UCRT")
|
|
1128
1112
|
end
|
|
1129
1113
|
end
|
|
1130
1114
|
|
|
@@ -1141,7 +1125,7 @@ end
|
|
|
1141
1125
|
have_func("xmlCtxtSetOptions") # introduced in libxml2 2.13.0
|
|
1142
1126
|
have_func("xmlCtxtGetOptions") # introduced in libxml2 2.14.0
|
|
1143
1127
|
have_func("xmlSwitchEncodingName") # introduced in libxml2 2.13.0
|
|
1144
|
-
have_func("rb_category_warning") # introduced in Ruby 3.0
|
|
1128
|
+
have_func("rb_category_warning") # introduced in Ruby 3.0 but had trouble resolving this symbol in truffleruby
|
|
1145
1129
|
|
|
1146
1130
|
other_library_versions_string = OTHER_LIBRARY_VERSIONS.map { |k, v| [k, v].join(":") }.join(",")
|
|
1147
1131
|
append_cppflags(%[-DNOKOGIRI_OTHER_LIBRARY_VERSIONS="\\"#{other_library_versions_string}\\""])
|
data/ext/nokogiri/xml_document.c
CHANGED
|
@@ -652,15 +652,19 @@ rb_xml_document_canonicalize(int argc, VALUE *argv, VALUE self)
|
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
-
xmlC14NExecute(c_doc, c_callback_wrapper, rb_callback,
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
655
|
+
int ret = xmlC14NExecute(c_doc, c_callback_wrapper, rb_callback,
|
|
656
|
+
c_mode,
|
|
657
|
+
c_namespaces,
|
|
658
|
+
(int)RTEST(rb_comments_p),
|
|
659
|
+
c_obuf);
|
|
660
660
|
|
|
661
661
|
ruby_xfree(c_namespaces);
|
|
662
662
|
xmlOutputBufferClose(c_obuf);
|
|
663
663
|
|
|
664
|
+
if (ret < 0) {
|
|
665
|
+
rb_raise(rb_eRuntimeError, "canonicalization failed");
|
|
666
|
+
}
|
|
667
|
+
|
|
664
668
|
return rb_funcall(rb_io, rb_intern("string"), 0);
|
|
665
669
|
}
|
|
666
670
|
|
data/ext/nokogiri/xml_node.c
CHANGED
|
@@ -969,6 +969,7 @@ rb_xml_node_initialize_copy_with_args(VALUE rb_self, VALUE rb_other, VALUE rb_le
|
|
|
969
969
|
xmlNodePtr c_self, c_other;
|
|
970
970
|
int c_level;
|
|
971
971
|
xmlDocPtr c_new_parent_doc;
|
|
972
|
+
VALUE rb_node_cache;
|
|
972
973
|
|
|
973
974
|
Noko_Node_Get_Struct(rb_other, xmlNode, c_other);
|
|
974
975
|
c_level = (int)NUM2INT(rb_level);
|
|
@@ -980,6 +981,10 @@ rb_xml_node_initialize_copy_with_args(VALUE rb_self, VALUE rb_other, VALUE rb_le
|
|
|
980
981
|
_xml_node_data_ptr_set(rb_self, c_self);
|
|
981
982
|
noko_xml_document_pin_node(c_self);
|
|
982
983
|
|
|
984
|
+
rb_node_cache = DOC_NODE_CACHE(c_new_parent_doc);
|
|
985
|
+
rb_ary_push(rb_node_cache, rb_self);
|
|
986
|
+
rb_funcall(rb_new_parent_doc, id_decorate, 1, rb_self);
|
|
987
|
+
|
|
983
988
|
return rb_self;
|
|
984
989
|
}
|
|
985
990
|
|
|
@@ -102,7 +102,10 @@ noko_xml_sax_parser_context_s_native_io(VALUE rb_class, VALUE rb_io, VALUE rb_en
|
|
|
102
102
|
c_context->sax = NULL;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
VALUE rb_context = noko_xml_sax_parser_context_wrap(rb_class, c_context);
|
|
106
|
+
rb_iv_set(rb_context, "@input", rb_io);
|
|
107
|
+
|
|
108
|
+
return rb_context;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
/* :nodoc: */
|
|
@@ -154,7 +157,10 @@ noko_xml_sax_parser_context_s_native_memory(VALUE rb_class, VALUE rb_input, VALU
|
|
|
154
157
|
c_context->sax = NULL;
|
|
155
158
|
}
|
|
156
159
|
|
|
157
|
-
|
|
160
|
+
VALUE rb_context = noko_xml_sax_parser_context_wrap(rb_class, c_context);
|
|
161
|
+
rb_iv_set(rb_context, "@input", rb_input);
|
|
162
|
+
|
|
163
|
+
return rb_context;
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
/*
|