libxml-ruby 3.2.1-x64-mingw32 → 3.2.2-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY +6 -0
- data/Rakefile +24 -16
- data/ext/libxml/ruby_xml_version.h +2 -2
- data/lib/3.0/libxml_ruby.so +0 -0
- data/libxml-ruby.gemspec +1 -1
- data/test/test_document.rb +2 -1
- data/test/test_dtd.rb +2 -1
- data/test/test_helper.rb +2 -0
- data/test/test_parser.rb +1 -1
- data/test/test_parser_context.rb +1 -7
- data/test/test_reader.rb +2 -1
- data/test/test_sax_parser.rb +13 -6
- data/test/test_xml.rb +2 -1
- metadata +10 -12
- data/ext/libxml/extconf.h +0 -3
- data/lib/2.7/libxml_ruby.so +0 -0
- data/test/test.xml +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96fdb761fe5ba6333b9d6cedf5cfb395d6a177bc02ad5aed1bf2f269d027cd04
|
4
|
+
data.tar.gz: c4761509dee6f67a3736718349f33c516d2c617429d559a732c73c855a725506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b0cdc74c5c3ebe00a65c811e15eb60d47937b2a6050a004d5c08e6d3e275918da7929ce874b7353daed587432b7e83c8d754a240a5e295c4c7abdb2086523d3
|
7
|
+
data.tar.gz: 3851c2f2155f3dbe9674821208b128eb0480a51795e05ec6593aded6ec61628c98f765baa64f8d81313b2e6a24e2478aaf6dfc575c6903cab272da7e9073f6d9
|
data/HISTORY
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
= Release History
|
2
2
|
|
3
|
+
== 3.2.2 / 2022-01-15
|
4
|
+
* Switch to Github actions for CI/CD (Greg)
|
5
|
+
* Test fixes (Greg, Sergio Durigan Junior)
|
6
|
+
* Fix typo on test/test_sax_parser.rb (Sergio Durigan Junior)
|
7
|
+
* Update homepage in gemspec (Pirate Praveen Arimbrathodiyil)
|
8
|
+
|
3
9
|
== 3.2.1 / 2020-11-05
|
4
10
|
|
5
11
|
* Fix incorrect handling of encodings when using XMLWriter.io (Charlie Savage)
|
data/Rakefile
CHANGED
@@ -16,21 +16,29 @@ spec = Gem::Specification.load("#{GEM_NAME}.gemspec")
|
|
16
16
|
task :default => [:test]
|
17
17
|
|
18
18
|
# Setup compile tasks
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
ext.config_options <<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
19
|
+
Rake::ExtensionTask.new do |ext|
|
20
|
+
ext.gem_spec = spec
|
21
|
+
ext.name = SO_NAME
|
22
|
+
ext.ext_dir = "ext/libxml"
|
23
|
+
ext.lib_dir = "lib/#{RUBY_VERSION.sub(/\.\d$/, '')}"
|
24
|
+
if RUBY_PLATFORM.match(/mswin|mingw/)
|
25
|
+
ext.config_options <<
|
26
|
+
if (dir = ENV['WINDOWS_XML2_INCLUDE'])
|
27
|
+
"--with-xml2-include=#{dir}"
|
28
|
+
else
|
29
|
+
case RUBY_PLATFORM
|
30
|
+
when 'i386-mingw32'
|
31
|
+
'--with-xml2-include=C:/msys64/mingw32/include/libxml2'
|
32
|
+
when 'x64-mingw32'
|
33
|
+
'--with-xml2-include=C:/msys64/mingw64/include/libxml2'
|
34
|
+
when 'x64-mingw-ucrt'
|
35
|
+
'--with-xml2-include=C:/msys64/ucrt64/include/libxml2'
|
36
|
+
else
|
37
|
+
raise "Unknown Windows Ruby, please set ENV['WINDOWS_XML2_INCLUDE']"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
else
|
41
|
+
ext.config_options << '--with-xml2-include=/usr/include/libxml2'
|
34
42
|
end
|
35
43
|
end
|
36
44
|
|
@@ -41,7 +49,7 @@ Gem::PackageTask.new(spec) do |pkg|
|
|
41
49
|
end
|
42
50
|
|
43
51
|
# Setup Windows Gem
|
44
|
-
if RUBY_PLATFORM.match(/
|
52
|
+
if RUBY_PLATFORM.match(/mswin|mingw/)
|
45
53
|
binaries = (FileList['lib/**/*.so',
|
46
54
|
'lib/**/*dll'])
|
47
55
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/* Don't nuke this block! It is used for automatically updating the
|
2
2
|
* versions below. VERSION = string formatting, VERNUM = numbered
|
3
3
|
* version for inline testing: increment both or none at all.*/
|
4
|
-
#define RUBY_LIBXML_VERSION "3.2.
|
4
|
+
#define RUBY_LIBXML_VERSION "3.2.2"
|
5
5
|
#define RUBY_LIBXML_VERNUM 321
|
6
6
|
#define RUBY_LIBXML_VER_MAJ 3
|
7
7
|
#define RUBY_LIBXML_VER_MIN 2
|
8
|
-
#define RUBY_LIBXML_VER_MIC
|
8
|
+
#define RUBY_LIBXML_VER_MIC 2
|
9
9
|
#define RUBY_LIBXML_VER_PATCH 0
|
Binary file
|
data/libxml-ruby.gemspec
CHANGED
@@ -7,7 +7,7 @@ version = File.read('ext/libxml/ruby_xml_version.h').match(/\s*RUBY_LIBXML_VERSI
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'libxml-ruby'
|
9
9
|
spec.version = version
|
10
|
-
spec.homepage = '
|
10
|
+
spec.homepage = 'https://xml4r.github.io/libxml-ruby/'
|
11
11
|
spec.summary = 'Ruby Bindings for LibXML2'
|
12
12
|
spec.description = <<-EOS
|
13
13
|
The Libxml-Ruby project provides Ruby language bindings for the GNOME
|
data/test/test_document.rb
CHANGED
@@ -126,6 +126,7 @@ class TestDocument < Minitest::Test
|
|
126
126
|
def test_nonet
|
127
127
|
xml_string = '<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>'
|
128
128
|
xml = LibXML::XML::Document.string(xml_string, options: LibXML::XML::Parser::Options::NONET)
|
129
|
-
|
129
|
+
file = File.join(File.dirname(__FILE__), 'model/atom.xml')
|
130
|
+
schema_document = LibXML::XML::Document.file(file, options: LibXML::XML::Parser::Options::NONET)
|
130
131
|
end
|
131
132
|
end
|
data/test/test_dtd.rb
CHANGED
@@ -84,7 +84,8 @@ class TestDtd < Minitest::Test
|
|
84
84
|
assert_nil(error.file)
|
85
85
|
assert_nil(error.line)
|
86
86
|
assert_equal('invalid', error.str1)
|
87
|
-
|
87
|
+
# Different answers across operating systems
|
88
|
+
# assert_nil(error.str2)
|
88
89
|
assert_nil(error.str3)
|
89
90
|
assert_equal(0, error.int1)
|
90
91
|
assert_equal(0, error.int2)
|
data/test/test_helper.rb
CHANGED
data/test/test_parser.rb
CHANGED
data/test/test_parser_context.rb
CHANGED
@@ -127,12 +127,6 @@ class TestParserContext < Minitest::Test
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
-
if ENV['NOTWORKING']
|
131
|
-
def test_num_chars
|
132
|
-
assert_equal(17, context.num_chars)
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
130
|
def test_replace_entities
|
137
131
|
context = LibXML::XML::Parser::Context.new
|
138
132
|
assert(!context.replace_entities?)
|
@@ -185,7 +179,7 @@ class TestParserContext < Minitest::Test
|
|
185
179
|
assert_nil(context.name_node)
|
186
180
|
assert_equal(0, context.name_depth)
|
187
181
|
assert_equal(10, context.name_depth_max)
|
188
|
-
|
182
|
+
assert([0, 17].include?(context.num_chars))
|
189
183
|
assert_equal(false, context.replace_entities?)
|
190
184
|
assert_equal(1, context.space_depth)
|
191
185
|
assert_equal(10, context.space_depth_max)
|
data/test/test_reader.rb
CHANGED
@@ -249,9 +249,10 @@ class TestReader < Minitest::Test
|
|
249
249
|
end
|
250
250
|
|
251
251
|
def test_bytes_consumed
|
252
|
+
ending_are_rn = File.binread(XML_FILE).include? "\r\n"
|
252
253
|
reader = LibXML::XML::Reader.file(XML_FILE)
|
253
254
|
reader.read
|
254
|
-
assert_equal(428, reader.byte_consumed)
|
255
|
+
assert_equal(ending_are_rn ? 428 : 416, reader.byte_consumed)
|
255
256
|
end
|
256
257
|
|
257
258
|
def test_node
|
data/test/test_sax_parser.rb
CHANGED
@@ -181,7 +181,7 @@ class TestSaxParser < Minitest::Test
|
|
181
181
|
xml = File.read(saxtest_file)
|
182
182
|
io = StringIO.new(xml)
|
183
183
|
parser = LibXML::XML::SaxParser.io(io)
|
184
|
-
|
184
|
+
|
185
185
|
parser.callbacks = TestCaseCallbacks.new
|
186
186
|
parser.parse
|
187
187
|
verify(parser)
|
@@ -250,25 +250,32 @@ EOS
|
|
250
250
|
result = parser.callbacks.result
|
251
251
|
|
252
252
|
i = -1
|
253
|
+
|
254
|
+
base_err_msg = "Fatal error: (Premature end of data in tag Results line 1|EndTag: '<\\/' not found) at :2\\."
|
255
|
+
re_err_msg1 = /\A(error: )#{base_err_msg}\z/
|
256
|
+
re_err_msg2 = /\A#{base_err_msg}\z/
|
257
|
+
|
253
258
|
assert_equal("startdoc", result[i+=1])
|
254
259
|
assert_equal("start_element: Results, attr: {}", result[i+=1])
|
255
260
|
assert_equal("start_element_ns: Results, attr: {}, prefix: , uri: , ns: {}", result[i+=1])
|
256
261
|
assert_equal("characters: \n", result[i+=1])
|
257
|
-
|
262
|
+
assert_match(re_err_msg1, result[i+=1])
|
258
263
|
assert_equal("end_document", result[i+=1])
|
259
264
|
|
260
265
|
refute_nil(error)
|
261
266
|
assert_kind_of(LibXML::XML::Error, error)
|
262
|
-
|
267
|
+
assert_match(re_err_msg2, error.message)
|
263
268
|
assert_equal(LibXML::XML::Error::PARSER, error.domain)
|
264
|
-
|
269
|
+
|
270
|
+
assert([LibXML::XML::Error::TAG_NOT_FINISHED, LibXML::XML::Error::LTSLASH_REQUIRED].include?(error.code))
|
265
271
|
assert_equal(LibXML::XML::Error::FATAL, error.level)
|
266
272
|
assert_nil(error.file)
|
267
273
|
assert_equal(2, error.line)
|
268
|
-
|
274
|
+
# Sometimes this is nil and sometimes its not depending on OS and libxlm version
|
275
|
+
# assert_nil(error.str1)
|
269
276
|
assert_nil(error.str2)
|
270
277
|
assert_nil(error.str3)
|
271
|
-
|
278
|
+
assert([0, 1].include?(error.int1))
|
272
279
|
assert_equal(1, error.int2)
|
273
280
|
assert_nil(error.node)
|
274
281
|
end
|
data/test/test_xml.rb
CHANGED
@@ -183,7 +183,8 @@ class TestXml < Minitest::Test
|
|
183
183
|
end
|
184
184
|
|
185
185
|
def test_enabled_iconv
|
186
|
-
|
186
|
+
iconv_enabled = RUBY_PLATFORM !~ /darwin/
|
187
|
+
assert_equal(iconv_enabled, LibXML::XML.enabled_iconv?)
|
187
188
|
end
|
188
189
|
|
189
190
|
def test_enabled_memory_debug
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libxml-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Ross Bamform
|
@@ -11,10 +11,10 @@ authors:
|
|
11
11
|
- Anurag Priyam
|
12
12
|
- Charlie Savage
|
13
13
|
- Ryan Johnson
|
14
|
-
autorequire:
|
14
|
+
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2022-01-16 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rake-compiler
|
@@ -50,7 +50,7 @@ description: |2
|
|
50
50
|
Libxml-ruby's primary advantage over REXML is performance - if speed
|
51
51
|
is your need, these are good libraries to consider, as demonstrated
|
52
52
|
by the informal benchmark below.
|
53
|
-
email:
|
53
|
+
email:
|
54
54
|
executables: []
|
55
55
|
extensions: []
|
56
56
|
extra_rdoc_files: []
|
@@ -60,7 +60,6 @@ files:
|
|
60
60
|
- MANIFEST
|
61
61
|
- README.rdoc
|
62
62
|
- Rakefile
|
63
|
-
- ext/libxml/extconf.h
|
64
63
|
- ext/libxml/extconf.rb
|
65
64
|
- ext/libxml/libxml.c
|
66
65
|
- ext/libxml/libxml_ruby.def
|
@@ -138,7 +137,7 @@ files:
|
|
138
137
|
- ext/libxml/ruby_xml_xpointer.c
|
139
138
|
- ext/libxml/ruby_xml_xpointer.h
|
140
139
|
- ext/vc/libxml_ruby.sln
|
141
|
-
- lib/
|
140
|
+
- lib/3.0/libxml_ruby.so
|
142
141
|
- lib/libxml-ruby.rb
|
143
142
|
- lib/libxml.rb
|
144
143
|
- lib/libxml/attr.rb
|
@@ -218,7 +217,6 @@ files:
|
|
218
217
|
- test/model/shiporder.xsd
|
219
218
|
- test/model/soap.xml
|
220
219
|
- test/model/xinclude.xml
|
221
|
-
- test/test.xml
|
222
220
|
- test/test_attr.rb
|
223
221
|
- test/test_attr_decl.rb
|
224
222
|
- test/test_attributes.rb
|
@@ -260,11 +258,11 @@ files:
|
|
260
258
|
- test/test_xpath_context.rb
|
261
259
|
- test/test_xpath_expression.rb
|
262
260
|
- test/test_xpointer.rb
|
263
|
-
homepage:
|
261
|
+
homepage: https://xml4r.github.io/libxml-ruby/
|
264
262
|
licenses:
|
265
263
|
- MIT
|
266
264
|
metadata: {}
|
267
|
-
post_install_message:
|
265
|
+
post_install_message:
|
268
266
|
rdoc_options: []
|
269
267
|
require_paths:
|
270
268
|
- lib
|
@@ -279,14 +277,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
277
|
- !ruby/object:Gem::Version
|
280
278
|
version: '0'
|
281
279
|
requirements: []
|
282
|
-
rubygems_version: 3.
|
283
|
-
signing_key:
|
280
|
+
rubygems_version: 3.3.4
|
281
|
+
signing_key:
|
284
282
|
specification_version: 4
|
285
283
|
summary: Ruby Bindings for LibXML2
|
286
284
|
test_files:
|
287
285
|
- test/test_attr.rb
|
288
|
-
- test/test_attributes.rb
|
289
286
|
- test/test_attr_decl.rb
|
287
|
+
- test/test_attributes.rb
|
290
288
|
- test/test_canonicalize.rb
|
291
289
|
- test/test_deprecated_require.rb
|
292
290
|
- test/test_document.rb
|
data/ext/libxml/extconf.h
DELETED
data/lib/2.7/libxml_ruby.so
DELETED
Binary file
|
data/test/test.xml
DELETED