nokogiri 1.5.6.rc3-x86-mswin32-60 → 1.5.6-x86-mswin32-60
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.
- data/CHANGELOG.ja.rdoc +10 -2
- data/CHANGELOG.rdoc +10 -2
- data/lib/nokogiri/1.8/nokogiri.so +0 -0
- data/lib/nokogiri/1.9/nokogiri.so +0 -0
- data/lib/nokogiri/version.rb +4 -1
- data/test/html/test_document_fragment.rb +1 -1
- data/test/xml/test_builder.rb +23 -0
- data/test/xml/test_document.rb +22 -0
- data/test_all +1 -1
- metadata +8 -12
data/CHANGELOG.ja.rdoc
CHANGED
@@ -9,15 +9,17 @@
|
|
9
9
|
* XML::Node#[]= メソッド内で受け取った引数を文字列に変換するようにした。#729 (ありがとう、Ben Langfeld.)
|
10
10
|
* bin/nokogiri コマンドが $stdin からドキュメントを読んで処理できるようにした。
|
11
11
|
* bin/nokogiri -e を指定することでコマンドラインプログラムを実行できるようにした。
|
12
|
+
* bin/nokogiri --version will print the Xerces and NekoHTML versions when ran with JRuby.
|
12
13
|
|
13
14
|
|
14
15
|
* Bugfixes
|
16
|
+
* Nokogiri はこのバージョンからXSLT変換のエラーを検出するようになった。#731 (ありがとう、Justin Fitzsimmons!)
|
17
|
+
* Don't throw an Error when trying to replace top-level text node in DocumentFragment. #775
|
18
|
+
* SAXパーザに不正なエンコーディングに渡された場合はArgumentErrorを投げるようにした。#756 (ありがとう、Bradley Schaefer!)
|
15
19
|
* [JRuby] XML宣言の前にスペースがあると、ドキュメントのパーズに失敗する。(#748の修正でこれもなおっている) #790
|
16
20
|
* [JRuby] Nokogiri::XML::Node#content のJRubyの振る舞いがCRubyと同じではない。#794, #797
|
17
21
|
* [JRuby] で '#' で始まる文字列を名前とする EntityReference を作ろうとすると INVALID_CHARACTER_ERR という例外がはっせいする。 #719
|
18
22
|
* [JRuby] では Nodeのサブクラスのnamespaceを正しく文字列に変換しない。 #715
|
19
|
-
* Nokogiri はこのバージョンからXSLT変換のエラーを検出するようになった。#731 (ありがとう、Justin Fitzsimmons!)
|
20
|
-
* SAXパーザに不正なエンコーディングに渡された場合はArgumentErrorを投げるようにした。#756 (ありがとう、Bradley Schaefer!)
|
21
23
|
* [JRuby] Node#contentがこのバージョンから改行コードを正しく表示するようになった。#737 (ありがとう、Piotr Szmielew!)
|
22
24
|
* [JRuby] recover optionが指定されている場合は宣言の無いネームスペースを無視するようにした。#748
|
23
25
|
* [JRuby] ネームスペースを検出するXPathが続けて実行されても例外を投げてはいけない。#764
|
@@ -26,6 +28,12 @@
|
|
26
28
|
* [JRuby] Nokogiri::XML::Document#wrapを使って生成したドキュメントに << でノードを追加しようとすると
|
27
29
|
undefined method `length' for nil:NilClassのエラーが発生する #781
|
28
30
|
* [JRuby] 開いているファイルのデスクリプタを閉じようとすると、"bad file descriptor" が発生する。#495
|
31
|
+
* [JRuby] JRuby/CRuby incompatibility for attribute decorators. #785
|
32
|
+
* [JRuby] Issues parsing valid XML with no internal subset in the DTD. #547, #811
|
33
|
+
* [JRuby] Issues parsing valid node content when it contains colons. #728
|
34
|
+
* [JRuby] Correctly parse the doc type of html documents. #733
|
35
|
+
* [JRuby] Include dtd in the xml output when a builder is used with create_internal_subset. #751
|
36
|
+
* [JRuby] builder requires textwrappers for valid utf8 in jruby, not in mri. #784
|
29
37
|
|
30
38
|
|
31
39
|
== 1.5.5 / 2012年6月24日
|
data/CHANGELOG.rdoc
CHANGED
@@ -9,15 +9,17 @@
|
|
9
9
|
* XML::Node#[]= stringifies values. #729 (Thanks, Ben Langfeld.)
|
10
10
|
* bin/nokogiri will process a document from $stdin
|
11
11
|
* bin/nokogiri -e will execute a program from the command line
|
12
|
+
* bin/nokogiri --version will print the Xerces and NekoHTML versions when ran with JRuby.
|
12
13
|
|
13
14
|
|
14
15
|
* Bugfixes
|
16
|
+
* Nokogiri now detects XSLT transform errors. #731 (Thanks, Justin Fitzsimmons!)
|
17
|
+
* Don't throw an Error when trying to replace top-level text node in DocumentFragment. #775
|
18
|
+
* Raise an ArgumentError if an invalid encoding is passed to the SAX parser. #756 (Thanks, Bradley Schaefer!)
|
15
19
|
* [JRuby] space prior to xml preamble causes nokogiri to fail parsing. (fixed along with #748) #790
|
16
20
|
* [JRuby] Fixed the bug Nokogiri::XML::Node#content inconsistency between Java and C. #794, #797
|
17
21
|
* [JRuby] raises INVALID_CHARACTER_ERR exception when EntityReference name starts with '#'. #719
|
18
22
|
* [JRuby] doesn't coerce namespaces out of strings on a direct subclass of Node. #715
|
19
|
-
* Nokogiri now detects XSLT transform errors. #731 (Thanks, Justin Fitzsimmons!)
|
20
|
-
* Raise an ArgumentError if an invalid encoding is passed to the SAX parser. #756 (Thanks, Bradley Schaefer!)
|
21
23
|
* [JRuby] Node#content now renders newlines properly. #737 (Thanks, Piotr Szmielew!)
|
22
24
|
* [JRuby] Unknown namespace are ignore when the recover option is used. #748
|
23
25
|
* [JRuby] XPath queries for namespaces should not throw exceptions when called twice in a row. #764
|
@@ -25,6 +27,12 @@
|
|
25
27
|
* [JRuby] namespaced attributes broken when appending raw xml to builder. #770
|
26
28
|
* [JRuby] Nokogiri::XML::Document#wrap raises undefined method `length' for nil:NilClass when trying to << to a node. #781
|
27
29
|
* [JRuby] Fixed "bad file descriptor" bug when closing open file descriptors. #495
|
30
|
+
* [JRuby] JRuby/CRuby incompatibility for attribute decorators. #785
|
31
|
+
* [JRuby] Issues parsing valid XML with no internal subset in the DTD. #547, #811
|
32
|
+
* [JRuby] Issues parsing valid node content when it contains colons. #728
|
33
|
+
* [JRuby] Correctly parse the doc type of html documents. #733
|
34
|
+
* [JRuby] Include dtd in the xml output when a builder is used with create_internal_subset. #751
|
35
|
+
* [JRuby] builder requires textwrappers for valid utf8 in jruby, not in mri. #784
|
28
36
|
|
29
37
|
|
30
38
|
== 1.5.5 / 2012-06-24
|
Binary file
|
Binary file
|
data/lib/nokogiri/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Nokogiri
|
2
2
|
# The version of Nokogiri you are using
|
3
|
-
VERSION = '1.5.6
|
3
|
+
VERSION = '1.5.6'
|
4
4
|
|
5
5
|
class VersionInfo # :nodoc:
|
6
6
|
def jruby?
|
@@ -52,6 +52,9 @@ module Nokogiri
|
|
52
52
|
hash_info['libxml']['compiled'] = compiled_parser_version
|
53
53
|
hash_info['libxml']['loaded'] = loaded_parser_version
|
54
54
|
hash_info['warnings'] = warnings
|
55
|
+
elsif jruby?
|
56
|
+
hash_info['xerces'] = Nokogiri::XERCES_VERSION
|
57
|
+
hash_info['nekohtml'] = Nokogiri::NEKO_VERSION
|
55
58
|
end
|
56
59
|
|
57
60
|
hash_info
|
data/test/xml/test_builder.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
1
3
|
require "helper"
|
2
4
|
|
3
5
|
module Nokogiri
|
@@ -11,6 +13,12 @@ module Nokogiri
|
|
11
13
|
assert_equal 'world', doc.root['abcDef']
|
12
14
|
end
|
13
15
|
|
16
|
+
def test_builder_with_utf8_text
|
17
|
+
text = "test ﺵ "
|
18
|
+
doc = Nokogiri::XML::Builder.new(:encoding => "UTF-8") { |xml| xml.test text }.doc
|
19
|
+
assert_equal text, doc.content
|
20
|
+
end
|
21
|
+
|
14
22
|
def test_builder_escape
|
15
23
|
xml = Nokogiri::XML::Builder.new { |x|
|
16
24
|
x.condition "value < 1", :attr => "value < 1"
|
@@ -103,6 +111,21 @@ module Nokogiri
|
|
103
111
|
assert_equal 'bar', doc.at('foo|baz', 'foo' => 'bar').namespace.href
|
104
112
|
end
|
105
113
|
|
114
|
+
def test_dtd_in_builder_output
|
115
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
116
|
+
xml.doc.create_internal_subset(
|
117
|
+
'html',
|
118
|
+
"-//W3C//DTD HTML 4.01 Transitional//EN",
|
119
|
+
"http://www.w3.org/TR/html4/loose.dtd"
|
120
|
+
)
|
121
|
+
xml.root do
|
122
|
+
xml.foo
|
123
|
+
end
|
124
|
+
end
|
125
|
+
assert_match(/<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN" "http:\/\/www.w3.org\/TR\/html4\/loose.dtd">/,
|
126
|
+
builder.to_xml)
|
127
|
+
end
|
128
|
+
|
106
129
|
def test_specify_namespace_nested
|
107
130
|
b = Nokogiri::XML::Builder.new { |xml|
|
108
131
|
xml.root('xmlns:foo' => 'bar') do
|
data/test/xml/test_document.rb
CHANGED
@@ -16,6 +16,16 @@ module Nokogiri
|
|
16
16
|
@xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE)
|
17
17
|
end
|
18
18
|
|
19
|
+
def test_dtd_with_empty_internal_subset
|
20
|
+
doc = Nokogiri::XML <<-eoxml
|
21
|
+
<?xml version="1.0"?>
|
22
|
+
<!DOCTYPE people >
|
23
|
+
<people>
|
24
|
+
</people>
|
25
|
+
eoxml
|
26
|
+
assert doc.root
|
27
|
+
end
|
28
|
+
|
19
29
|
def test_document_with_initial_space
|
20
30
|
doc = Nokogiri::XML(" <?xml version='1.0' encoding='utf-8' ?><first \>")
|
21
31
|
assert_equal 2, doc.children.size
|
@@ -699,6 +709,18 @@ module Nokogiri
|
|
699
709
|
assert_match %r{foo attr}, doc.to_xml
|
700
710
|
end
|
701
711
|
|
712
|
+
# issue #785
|
713
|
+
def test_attribute_decoration
|
714
|
+
decorator = Module.new do
|
715
|
+
def test_method
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
util_decorate(@xml, decorator)
|
720
|
+
|
721
|
+
assert @xml.search('//@street').first.respond_to?(:test_method)
|
722
|
+
end
|
723
|
+
|
702
724
|
def test_subset_is_decorated
|
703
725
|
x = Module.new do
|
704
726
|
def awesome!
|
data/test_all
CHANGED
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 15
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
9
|
- 6
|
10
|
-
|
11
|
-
- 3
|
12
|
-
version: 1.5.6.rc3
|
10
|
+
version: 1.5.6
|
13
11
|
platform: x86-mswin32-60
|
14
12
|
authors:
|
15
13
|
- Aaron Patterson
|
@@ -20,7 +18,7 @@ autorequire:
|
|
20
18
|
bindir: bin
|
21
19
|
cert_chain: []
|
22
20
|
|
23
|
-
date: 2012-
|
21
|
+
date: 2012-12-19 00:00:00 Z
|
24
22
|
dependencies:
|
25
23
|
- !ruby/object:Gem::Dependency
|
26
24
|
prerelease: false
|
@@ -528,14 +526,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
528
526
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
529
527
|
none: false
|
530
528
|
requirements:
|
531
|
-
- - "
|
529
|
+
- - ">="
|
532
530
|
- !ruby/object:Gem::Version
|
533
|
-
hash:
|
531
|
+
hash: 3
|
534
532
|
segments:
|
535
|
-
-
|
536
|
-
|
537
|
-
- 1
|
538
|
-
version: 1.3.1
|
533
|
+
- 0
|
534
|
+
version: "0"
|
539
535
|
requirements: []
|
540
536
|
|
541
537
|
rubyforge_project: nokogiri
|