libxml-ruby 3.1.0-x64-mingw32 → 3.2.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY +8 -0
  3. data/ext/libxml/extconf.h +3 -0
  4. data/ext/libxml/extconf.rb +30 -26
  5. data/ext/libxml/ruby_libxml.h +0 -8
  6. data/ext/libxml/ruby_xml.c +40 -0
  7. data/ext/libxml/ruby_xml_document.c +1 -1
  8. data/ext/libxml/ruby_xml_dtd.c +6 -8
  9. data/ext/libxml/ruby_xml_node.c +1 -1
  10. data/ext/libxml/ruby_xml_parser_context.c +1 -1
  11. data/ext/libxml/ruby_xml_version.h +3 -3
  12. data/lib/2.7/libxml_ruby.so +0 -0
  13. data/lib/libxml-ruby.rb +30 -0
  14. data/lib/libxml.rb +3 -28
  15. data/libxml-ruby.gemspec +2 -2
  16. data/test/test_attr.rb +18 -18
  17. data/test/test_attr_decl.rb +8 -8
  18. data/test/test_attributes.rb +10 -10
  19. data/test/test_canonicalize.rb +16 -24
  20. data/test/test_deprecated_require.rb +3 -3
  21. data/test/test_document.rb +118 -112
  22. data/test/test_document_write.rb +39 -88
  23. data/test/test_dtd.rb +23 -23
  24. data/test/test_encoding.rb +15 -15
  25. data/test/test_encoding_sax.rb +3 -3
  26. data/test/test_error.rb +51 -51
  27. data/test/test_helper.rb +2 -9
  28. data/test/test_html_parser.rb +30 -30
  29. data/test/test_html_parser_context.rb +6 -6
  30. data/test/test_namespace.rb +16 -16
  31. data/test/test_namespaces.rb +25 -25
  32. data/test/test_node.rb +36 -30
  33. data/test/test_node_cdata.rb +10 -10
  34. data/test/test_node_comment.rb +6 -6
  35. data/test/test_node_copy.rb +2 -2
  36. data/test/test_node_edit.rb +16 -16
  37. data/test/test_node_pi.rb +7 -7
  38. data/test/test_node_text.rb +6 -6
  39. data/test/test_node_write.rb +16 -26
  40. data/test/test_node_xlink.rb +6 -6
  41. data/test/test_parser.rb +68 -72
  42. data/test/test_parser_context.rb +28 -28
  43. data/test/test_properties.rb +5 -5
  44. data/test/test_reader.rb +80 -85
  45. data/test/test_relaxng.rb +11 -11
  46. data/test/test_sax_parser.rb +28 -28
  47. data/test/test_schema.rb +24 -24
  48. data/test/test_suite.rb +3 -4
  49. data/test/test_traversal.rb +4 -4
  50. data/test/test_writer.rb +50 -52
  51. data/test/test_xinclude.rb +3 -3
  52. data/test/test_xml.rb +114 -102
  53. data/test/test_xpath.rb +22 -22
  54. data/test/test_xpath_context.rb +5 -5
  55. data/test/test_xpath_expression.rb +6 -6
  56. data/test/test_xpointer.rb +15 -15
  57. metadata +7 -5
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
- require File.expand_path('../test_helper', __FILE__)
3
+ require_relative './test_helper'
4
4
  require "tempfile"
5
5
 
6
6
  class TestXPathContext < Minitest::Test
@@ -11,8 +11,8 @@ class TestXPathContext < Minitest::Test
11
11
  NS0_URI = 'http://services.somewhere.com'
12
12
 
13
13
  def setup
14
- doc = XML::Document.file(File.join(File.dirname(__FILE__), 'model/soap.xml'))
15
- @context = XML::XPath::Context.new(doc)
14
+ doc = LibXML::XML::Document.file(File.join(File.dirname(__FILE__), 'model/soap.xml'))
15
+ @context = LibXML::XML::XPath::Context.new(doc)
16
16
  end
17
17
 
18
18
  def teardown()
@@ -79,9 +79,9 @@ class TestXPathContext < Minitest::Test
79
79
  end
80
80
 
81
81
  def test_require_doc
82
- doc = XML::Document.file(File.join(File.dirname(__FILE__), 'model/soap.xml'))
82
+ doc = LibXML::XML::Document.file(File.join(File.dirname(__FILE__), 'model/soap.xml'))
83
83
  error = assert_raises(TypeError) do
84
- @context = XML::XPath::Context.new(doc.root)
84
+ @context = LibXML::XML::XPath::Context.new(doc.root)
85
85
  end
86
86
  assert_equal("Supplied argument must be a document or node.", error.to_s)
87
87
  end
@@ -1,11 +1,11 @@
1
1
  # encoding: UTF-8
2
2
 
3
- require File.expand_path('../test_helper', __FILE__)
3
+ require_relative './test_helper'
4
4
 
5
5
 
6
6
  class TestXPathExpression < Minitest::Test
7
7
  def setup
8
- xp = XML::Parser.string('<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>')
8
+ xp = LibXML::XML::Parser.string('<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>')
9
9
  @doc = xp.parse
10
10
  end
11
11
 
@@ -14,16 +14,16 @@ class TestXPathExpression < Minitest::Test
14
14
  end
15
15
 
16
16
  def test_nodes
17
- expr = XML::XPath::Expression.compile('/ruby_array/fixnum')
17
+ expr = LibXML::XML::XPath::Expression.compile('/ruby_array/fixnum')
18
18
  set = @doc.find(expr)
19
- assert_instance_of(XML::XPath::Object, set)
19
+ assert_instance_of(LibXML::XML::XPath::Object, set)
20
20
  assert_equal(2, set.size)
21
21
  end
22
22
 
23
23
  def test_find_class
24
- expr = XML::XPath::Expression.new('/ruby_array/fixnum')
24
+ expr = LibXML::XML::XPath::Expression.new('/ruby_array/fixnum')
25
25
  set = @doc.find(expr)
26
- assert_instance_of(XML::XPath::Object, set)
26
+ assert_instance_of(LibXML::XML::XPath::Object, set)
27
27
  assert_equal(2, set.size)
28
28
  end
29
29
 
@@ -1,13 +1,13 @@
1
1
  # encoding: UTF-8
2
- require File.expand_path('../test_helper', __FILE__)
2
+ require_relative './test_helper'
3
3
 
4
4
  class TC_XML_XPointer < Minitest::Test
5
5
  def setup()
6
- xp = XML::Parser.string('<!DOCTYPE ra [<!ELEMENT ra (foo+)><!ATTLIST ra id ID #IMPLIED><!ELEMENT foo (#PCDATA)><!ATTLIST foo id ID #IMPLIED>]><ra id="start"><foo id="one">one</foo><foo id="two">two</foo><foo id="three">three</foo></ra>')
6
+ xp = LibXML::XML::Parser.string('<!DOCTYPE ra [<!ELEMENT ra (foo+)><!ATTLIST ra id ID #IMPLIED><!ELEMENT foo (#PCDATA)><!ATTLIST foo id ID #IMPLIED>]><ra id="start"><foo id="one">one</foo><foo id="two">two</foo><foo id="three">three</foo></ra>')
7
7
  @doc = xp.parse
8
- assert_instance_of(XML::Document, @doc)
8
+ assert_instance_of(LibXML::XML::Document, @doc)
9
9
  @root = @doc.root
10
- assert_instance_of(XML::Node, @root)
10
+ assert_instance_of(LibXML::XML::Node, @root)
11
11
  end
12
12
 
13
13
  def teardown()
@@ -18,20 +18,20 @@ class TC_XML_XPointer < Minitest::Test
18
18
 
19
19
  def test_libxml_xpointer_id
20
20
  xptr = @root.pointer('xpointer(id("two"))')
21
- assert_instance_of(XML::XPath::Object, xptr)
21
+ assert_instance_of(LibXML::XML::XPath::Object, xptr)
22
22
  xptr.each do |node|
23
23
  # It seems from the spec that the pointer should
24
24
  # be the whole node, rather than just the ID attr.
25
25
  assert_equal('two', node.content)
26
- assert_instance_of(XML::Node, node)
26
+ assert_instance_of(LibXML::XML::Node, node)
27
27
  assert_equal('two', node['id'])
28
28
  end
29
29
 
30
30
  # FIXME: Not sure at all about this kind of range
31
31
  if ENV['NOTWORKING']
32
32
  @xptr = @root.pointer('xpointer(id("two")) xpointer(id("three"))')
33
- assert_instance_of(XML::XPath, @xptr)
34
- assert_instance_of(XML::Node::Set, @xptr.set)
33
+ assert_instance_of(LibXML::XML::XPath, @xptr)
34
+ assert_instance_of(LibXML::XML::Node::Set, @xptr.set)
35
35
  assert_equal(2, @xptr.set.length)
36
36
  for n in @xptr.set
37
37
  assert_match(/two|three/, n.to_s)
@@ -45,13 +45,13 @@ class TC_XML_XPointer < Minitest::Test
45
45
  nstart = nend = nil
46
46
  @xptr = @root.pointer('xpointer(id("one"))').set
47
47
  @xptr.each{|n| nstart = n}
48
- assert_instance_of(XML::Node, nstart)
48
+ assert_instance_of(LibXML::XML::Node, nstart)
49
49
  @xptr = @root.pointer('xpointer(id("three"))').set
50
50
  @xptr.each{|n| nend = n}
51
- assert_instance_of(XML::Node, nend)
52
- range = XML::XPointer.range(nstart, nend)
53
- assert_instance_of(XML::XPath, range)
54
- assert_instance_of(XML::Node::Set, range.set)
51
+ assert_instance_of(LibXML::XML::Node, nend)
52
+ range = LibXML::XML::XPointer.range(nstart, nend)
53
+ assert_instance_of(LibXML::XML::XPath, range)
54
+ assert_instance_of(LibXML::XML::Node::Set, range.set)
55
55
 
56
56
  for n in range.set
57
57
  assert_match(/one|two|three/, n.to_s)
@@ -62,9 +62,9 @@ class TC_XML_XPointer < Minitest::Test
62
62
 
63
63
  # def test_libxml_xpointer_start_point()
64
64
  # @xptr = @root.pointer('xpointer(start-point("one"))')
65
- # assert_instance_of(XML::XPath, @xptr)
65
+ # assert_instance_of(LibXML::XML::XPath, @xptr)
66
66
  # set = @xptr.set
67
- # assert_instance_of(XML::Node::Set, set)
67
+ # assert_instance_of(LibXML::XML::Node::Set, set)
68
68
  # for n in set
69
69
  # assert_match(/one|two|three/, n.to_s)
70
70
  # end
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.1.0
4
+ version: 3.2.0
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Ross Bamform
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2018-02-03 00:00:00.000000000 Z
17
+ date: 2020-05-19 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rake-compiler
@@ -60,6 +60,7 @@ files:
60
60
  - MANIFEST
61
61
  - README.rdoc
62
62
  - Rakefile
63
+ - ext/libxml/extconf.h
63
64
  - ext/libxml/extconf.rb
64
65
  - ext/libxml/libxml.c
65
66
  - ext/libxml/libxml_ruby.def
@@ -137,6 +138,8 @@ files:
137
138
  - ext/libxml/ruby_xml_xpointer.c
138
139
  - ext/libxml/ruby_xml_xpointer.h
139
140
  - ext/vc/libxml_ruby.sln
141
+ - lib/2.7/libxml_ruby.so
142
+ - lib/libxml-ruby.rb
140
143
  - lib/libxml.rb
141
144
  - lib/libxml/attr.rb
142
145
  - lib/libxml/attr_decl.rb
@@ -268,15 +271,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
268
271
  requirements:
269
272
  - - ">="
270
273
  - !ruby/object:Gem::Version
271
- version: 1.8.6
274
+ version: '2.5'
272
275
  required_rubygems_version: !ruby/object:Gem::Requirement
273
276
  requirements:
274
277
  - - ">="
275
278
  - !ruby/object:Gem::Version
276
279
  version: '0'
277
280
  requirements: []
278
- rubyforge_project:
279
- rubygems_version: 2.7.3
281
+ rubygems_version: 3.1.2
280
282
  signing_key:
281
283
  specification_version: 4
282
284
  summary: Ruby Bindings for LibXML2