nokogiri 1.6.0.rc1 → 1.6.0

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.

@@ -69,6 +69,11 @@ module Nokogiri
69
69
  assert_equal 'div', ElementDescription['body'].default_sub_element
70
70
  end
71
71
 
72
+ def test_null_default_sub_element
73
+ doc = Nokogiri::HTML('foo')
74
+ doc.root.description.default_sub_element
75
+ end
76
+
72
77
  def test_optional_attributes
73
78
  attrs = ElementDescription['table'].optional_attributes
74
79
  assert attrs
@@ -47,7 +47,7 @@ module Nokogiri
47
47
  root << txt
48
48
  root << ent
49
49
  d << root
50
- assert_match d.to_html, /&#8217;/
50
+ assert_match /&#8217;/, d.to_html
51
51
  end
52
52
 
53
53
  def test_document_with_initial_space
@@ -580,6 +580,11 @@ module Nokogiri
580
580
  assert set.length > 0
581
581
  end
582
582
 
583
+ def test_parsing_empty_io
584
+ doc = Nokogiri::XML.parse(StringIO.new(''))
585
+ refute_nil doc
586
+ end
587
+
583
588
  def test_search_on_empty_documents
584
589
  doc = Nokogiri::XML::Document.new
585
590
  ns = doc.search('//foo')
@@ -26,7 +26,7 @@ EOF
26
26
  doc = Nokogiri::XML xml
27
27
  lf_node = Nokogiri::XML::EntityReference.new(doc, "#xa")
28
28
  doc.xpath('/item').first.add_child(lf_node)
29
- assert_match doc.to_xml, /&#xa;/
29
+ assert_match /&#xa;/, doc.to_xml
30
30
  end
31
31
  end
32
32
 
@@ -830,7 +830,7 @@ b"></div>
830
830
  ne = d1.root.xpath('//a').first.dup(1)
831
831
  ne.content += "& < & > \" &"
832
832
  d2.root << ne
833
- assert_match d2.to_s, /<a>&amp;&amp; &lt; &amp; &gt; " &amp;<\/a>/
833
+ assert_match /<a>&amp;&amp; &lt; &amp; &gt; " &amp;<\/a>/, d2.to_s
834
834
  end
835
835
 
836
836
  def test_content_after_appending_text
@@ -89,6 +89,15 @@ module Nokogiri
89
89
  assert(@xsd.valid?(valid_doc))
90
90
  assert(!@xsd.valid?(invalid_doc))
91
91
  end
92
+
93
+ def test_xsd_with_dtd
94
+ Dir.chdir(File.join(ASSETS_DIR, 'saml')) do
95
+ # works
96
+ Nokogiri::XML::Schema(IO.read('xmldsig_schema.xsd'))
97
+ # was not working
98
+ Nokogiri::XML::Schema(IO.read('saml20protocol_schema.xsd'))
99
+ end
100
+ end
92
101
  end
93
102
  end
94
103
  end
@@ -63,6 +63,10 @@ EOXSL
63
63
  skip("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml?
64
64
  foo = Class.new do
65
65
  include MiniTest::Assertions
66
+ # Minitest 5 uses `self.assertions` in `assert()` which is not
67
+ # defined in the Minitest::Assertions module :-(
68
+ attr_writer :assertions
69
+ def assertions; @assertions ||= 0; end
66
70
 
67
71
  def multiarg *args
68
72
  assert_equal ["abc", "xyz"], args
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.rc1
5
- prerelease: 6
4
+ version: 1.6.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Aaron Patterson
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-04-23 00:00:00.000000000 Z
15
+ date: 2013-06-08 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: mini_portile
@@ -267,9 +267,11 @@ extra_rdoc_files:
267
267
  files:
268
268
  - .autotest
269
269
  - .gemtest
270
+ - .travis.yml
270
271
  - CHANGELOG.ja.rdoc
271
272
  - CHANGELOG.rdoc
272
273
  - C_CODING_STYLE.rdoc
274
+ - Gemfile
273
275
  - Manifest.txt
274
276
  - README.ja.rdoc
275
277
  - README.rdoc
@@ -279,6 +281,7 @@ files:
279
281
  - Y_U_NO_GEMSPEC.md
280
282
  - bin/nokogiri
281
283
  - build_all
284
+ - dependencies.yml
282
285
  - ext/nokogiri/depend
283
286
  - ext/nokogiri/extconf.rb
284
287
  - ext/nokogiri/html_document.c
@@ -422,6 +425,7 @@ files:
422
425
  - test/files/address_book.rlx
423
426
  - test/files/address_book.xml
424
427
  - test/files/bar/bar.xsd
428
+ - test/files/bogus.xml
425
429
  - test/files/dont_hurt_em_why.xml
426
430
  - test/files/encoding.html
427
431
  - test/files/encoding.xhtml
@@ -432,6 +436,10 @@ files:
432
436
  - test/files/noencoding.html
433
437
  - test/files/po.xml
434
438
  - test/files/po.xsd
439
+ - test/files/saml/saml20assertion_schema.xsd
440
+ - test/files/saml/saml20protocol_schema.xsd
441
+ - test/files/saml/xenc_schema.xsd
442
+ - test/files/saml/xmldsig_schema.xsd
435
443
  - test/files/shift_jis.html
436
444
  - test/files/shift_jis.xml
437
445
  - test/files/snuggles.xml
@@ -456,6 +464,10 @@ files:
456
464
  - test/html/test_named_characters.rb
457
465
  - test/html/test_node.rb
458
466
  - test/html/test_node_encoding.rb
467
+ - test/namespaces/test_additional_namespaces_in_builder_doc.rb
468
+ - test/namespaces/test_namespaces_in_builder_doc.rb
469
+ - test/namespaces/test_namespaces_in_created_doc.rb
470
+ - test/namespaces/test_namespaces_in_parsed_doc.rb
459
471
  - test/test_convert_xpath.rb
460
472
  - test/test_css_cache.rb
461
473
  - test/test_encoding_handler.rb
@@ -504,11 +516,6 @@ files:
504
516
  - test/xslt/test_custom_functions.rb
505
517
  - test/xslt/test_exception_handling.rb
506
518
  - test_all
507
- - test/namespaces/test_namespaces_in_parsed_doc.rb
508
- - test/namespaces/test_namespaces_in_created_doc.rb
509
- - test/namespaces/test_additional_namespaces_in_builder_doc.rb
510
- - test/namespaces/test_namespaces_in_builder_doc.rb
511
- - dependencies.yml
512
519
  - ports/archives/libxml2-2.8.0.tar.gz
513
520
  - ports/archives/libxslt-1.1.26.tar.gz
514
521
  homepage: http://nokogiri.org
@@ -528,9 +535,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
528
535
  required_rubygems_version: !ruby/object:Gem::Requirement
529
536
  none: false
530
537
  requirements:
531
- - - ! '>'
538
+ - - ! '>='
532
539
  - !ruby/object:Gem::Version
533
- version: 1.3.1
540
+ version: '0'
534
541
  requirements: []
535
542
  rubyforge_project: nokogiri
536
543
  rubygems_version: 1.8.25