nokogiri 1.5.5.rc1-x86-mswin32-60 → 1.5.5.rc2-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 +8 -0
- data/CHANGELOG.rdoc +10 -2
- data/Rakefile +9 -5
- data/lib/nokogiri/1.8/nokogiri.so +0 -0
- data/lib/nokogiri/1.9/nokogiri.so +0 -0
- data/lib/nokogiri/css/parser.rb +74 -78
- data/lib/nokogiri/html/document.rb +1 -1
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/node.rb +1 -1
- data/test/html/test_document.rb +6 -0
- data/test/xml/test_xpath.rb +27 -0
- metadata +22 -22
data/CHANGELOG.ja.rdoc
CHANGED
@@ -6,6 +6,14 @@
|
|
6
6
|
|
7
7
|
* JRuby Nokogiri の add_previous_sibling が以前は動いていたのに今は動かない(1.5.0 -> 1.5.1)。 #691 (ありがとう, John Shahid!)
|
8
8
|
* JRuby バーションは URL が引数にあたえられると HTML ドキュメントを作れない。 #674 (ありがとう, John Shahid!)
|
9
|
+
* JRuby バージョンは HTMLとして nil か "" が与えられると NullPointerException を投げる。 #699
|
10
|
+
* JRuby 1.9 モードでエラー, uncaught throw 'encoding_found', が発生する。 #673
|
11
|
+
* JRuby で US-ASCII にエンコードされた文字列が正しくないエンコードを返してくる。 #583
|
12
|
+
* 512 文字以上が与えられたときに XmlSaxPushParser が IndexOutOfBoundsException を投げる。#567, #615
|
13
|
+
* Xpath を評価した結果、空の NodeSet が帰ってくる場合に、NodeSet が持っている Document の decorate に失敗して例外が投げられる。#514
|
14
|
+
* JRuby で xpath を namespace 付きで指定した場合に、エラーが発生する。pull request #681 (ありがとう, Piotr Szmielew)
|
15
|
+
* JRuby で Nokogiri::XML::Node を継承したクラスを定義すると、namespace が表示されない。 #695
|
16
|
+
* JRuby で RDF::RDFXML::Writer をインスタンス化しようとすると NAMESPACE_ERR (org.w3c.dom.DOMException) が発生する. #683
|
9
17
|
|
10
18
|
|
11
19
|
== 1.5.4 / 2012年6月12日
|
data/CHANGELOG.rdoc
CHANGED
@@ -4,8 +4,16 @@
|
|
4
4
|
|
5
5
|
* Bugfixes
|
6
6
|
|
7
|
-
* Regression in JRuby Nokogiri add_previous_sibling (1.5.0 -> 1.5.1) #691 (Thanks, Shahid!)
|
8
|
-
* JRuby unable to create HTML doc if URL arg provided #674 (Thanks, Shahid!)
|
7
|
+
* Regression in JRuby Nokogiri add_previous_sibling (1.5.0 -> 1.5.1) #691 (Thanks, John Shahid!)
|
8
|
+
* JRuby unable to create HTML doc if URL arg provided #674 (Thanks, John Shahid!)
|
9
|
+
* JRuby raises NullPointerException when given HTML document is nil or empty string. #699
|
10
|
+
* JRuby 1.9 error, uncaught throw 'encoding_found', has been fixed. #673
|
11
|
+
* Invalid encoding returned in JRuby with US-ASCII. #583
|
12
|
+
* XmlSaxPushParser raises IndexOutOfBoundsException when over 512 characters are given. #567, #615
|
13
|
+
* When xpath evaluation returns empty NodeSet, decorating NodeSet's base document raises exception. #514
|
14
|
+
* JRuby raises exception when xpath with namespace is specified. pull request #681 (Thanks, Piotr Szmielew)
|
15
|
+
* JRuby renders nodes without their namespace when subclassing Node. #695
|
16
|
+
* JRuby raises NAMESPACE_ERR (org.w3c.dom.DOMException) while instantiating RDF::RDFXML::Writer. #683
|
9
17
|
|
10
18
|
|
11
19
|
== 1.5.4 / 2012-06-12
|
data/Rakefile
CHANGED
@@ -34,8 +34,8 @@ HOE = Hoe.spec 'nokogiri' do
|
|
34
34
|
'nokogiri.gemspec',
|
35
35
|
'lib/nokogiri/nokogiri.{bundle,jar,rb,so}',
|
36
36
|
'lib/nokogiri/1.{8,9}',
|
37
|
-
GENERATED_PARSER,
|
38
|
-
GENERATED_TOKENIZER
|
37
|
+
# GENERATED_PARSER,
|
38
|
+
# GENERATED_TOKENIZER
|
39
39
|
]
|
40
40
|
|
41
41
|
self.extra_dev_deps += [
|
@@ -45,11 +45,15 @@ HOE = Hoe.spec 'nokogiri' do
|
|
45
45
|
["hoe-git", ">= 1.4"],
|
46
46
|
["mini_portile", ">= 0.2.2"],
|
47
47
|
["minitest", "~> 2.2.2"],
|
48
|
-
["racc", ">= 1.4.6"],
|
49
48
|
["rake", ">= 0.9"],
|
50
|
-
["rake-compiler", "= 0.8.0"]
|
51
|
-
["rexical", ">= 1.0.5"],
|
49
|
+
["rake-compiler", "= 0.8.0"]
|
52
50
|
]
|
51
|
+
if ! java?
|
52
|
+
self.extra_dev_deps += [
|
53
|
+
["racc", ">= 1.4.6"],
|
54
|
+
["rexical", ">= 1.0.5"]
|
55
|
+
]
|
56
|
+
end
|
53
57
|
|
54
58
|
if java?
|
55
59
|
self.spec_extras = { :platform => 'java' }
|
Binary file
|
Binary file
|
data/lib/nokogiri/css/parser.rb
CHANGED
@@ -14,100 +14,96 @@ module Nokogiri
|
|
14
14
|
##### State transition tables begin ###
|
15
15
|
|
16
16
|
racc_action_table = [
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
20,
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
76,
|
32
|
-
|
33
|
-
|
17
|
+
21, 4, 5, 7, 29, 4, 5, 7, 30, 19,
|
18
|
+
-26, 6, 21, 9, 8, 6, 29, 9, 8, 22,
|
19
|
+
31, 19, 20, 21, 23, 15, 17, 29, 24, 83,
|
20
|
+
31, 22, 19, 84, 20, 21, 23, 15, 17, 29,
|
21
|
+
24, 92, 22, 85, 19, 20, 21, 23, 15, 17,
|
22
|
+
20, 24, 82, 90, 22, 59, 24, 20, 89, 23,
|
23
|
+
15, 17, 21, 24, 88, 22, 29, 4, 5, 7,
|
24
|
+
23, 19, 71, 29, 91, 29, 86, 6, 19, 9,
|
25
|
+
8, 22, 29, 29, 20, 89, 23, 15, 17, 35,
|
26
|
+
24, 20, 29, 20, 15, 17, 15, 24, 35, 24,
|
27
|
+
20, 20, 29, 15, 15, 93, 24, 24, 21, 64,
|
28
|
+
20, 95, 29, 15, 97, 96, 24, 43, -26, 46,
|
29
|
+
20, 52, 53, 15, 51, 98, 24, 22, 79, 80,
|
30
|
+
20, 99, 23, 15, 48, 42, 24, 79, 80, 75,
|
31
|
+
76, 77, 101, 78, 87, 86, 41, 74, 75, 76,
|
32
|
+
77, 35, 78, 104, 52, 56, 74, 55, 52, 56,
|
33
|
+
105, 55, 52, 56, nil, 55, 52, 56, nil, 55 ]
|
34
34
|
|
35
35
|
racc_action_check = [
|
36
|
-
0,
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
36
|
+
0, 14, 14, 14, 0, 0, 0, 0, 1, 0,
|
37
|
+
43, 14, 40, 14, 14, 0, 40, 0, 0, 0,
|
38
|
+
1, 40, 0, 31, 0, 0, 0, 31, 0, 47,
|
39
|
+
57, 40, 31, 49, 40, 13, 40, 40, 40, 13,
|
40
|
+
40, 57, 31, 50, 13, 31, 24, 31, 31, 31,
|
41
|
+
11, 31, 46, 53, 13, 24, 11, 13, 53, 13,
|
42
|
+
13, 13, 23, 13, 52, 24, 23, 23, 23, 23,
|
43
|
+
24, 23, 42, 35, 54, 28, 55, 23, 35, 23,
|
44
|
+
23, 23, 27, 10, 23, 56, 23, 23, 23, 33,
|
45
|
+
23, 35, 26, 28, 35, 35, 28, 35, 10, 28,
|
46
|
+
27, 10, 25, 27, 10, 67, 27, 10, 20, 30,
|
47
|
+
26, 72, 68, 26, 73, 73, 26, 20, 19, 20,
|
48
|
+
25, 21, 21, 25, 21, 81, 25, 20, 45, 45,
|
49
|
+
68, 83, 20, 68, 21, 18, 68, 44, 44, 45,
|
50
|
+
45, 45, 87, 45, 51, 51, 15, 45, 44, 44,
|
51
|
+
44, 12, 44, 90, 89, 89, 44, 89, 86, 86,
|
52
|
+
101, 86, 88, 88, nil, 88, 22, 22, nil, 22 ]
|
53
53
|
|
54
54
|
racc_action_pointer = [
|
55
|
-
-2,
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
nil,
|
64
|
-
|
65
|
-
nil,
|
55
|
+
-2, 8, nil, nil, nil, nil, nil, nil, nil, nil,
|
56
|
+
77, 26, 130, 33, -6, 135, nil, nil, 106, 89,
|
57
|
+
106, 111, 156, 60, 44, 96, 86, 76, 69, nil,
|
58
|
+
109, 21, nil, 68, nil, 67, nil, nil, nil, nil,
|
59
|
+
10, nil, 61, -19, 134, 125, 27, 0, nil, 10,
|
60
|
+
20, 133, 52, 46, 51, 64, 73, 18, nil, nil,
|
61
|
+
nil, nil, nil, nil, nil, nil, nil, 82, 106, nil,
|
62
|
+
nil, nil, 86, 104, nil, nil, nil, nil, nil, nil,
|
63
|
+
nil, 100, nil, 120, nil, nil, 148, 135, 152, 144,
|
64
|
+
140, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
65
|
+
nil, 147, nil, nil, nil, nil ]
|
66
66
|
|
67
67
|
racc_action_default = [
|
68
|
-
-27, -
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
-
|
76
|
-
-
|
77
|
-
-36,
|
78
|
-
-
|
68
|
+
-27, -74, -2, -3, -4, -5, -6, -7, -8, -9,
|
69
|
+
-50, -13, -17, -27, -20, -74, -22, -23, -74, -25,
|
70
|
+
-27, -74, -74, -27, -74, -55, -56, -57, -58, -59,
|
71
|
+
-74, -27, -10, -49, -12, -27, -14, -15, -16, -18,
|
72
|
+
-27, -21, -74, -32, -62, -62, -74, -74, -33, -74,
|
73
|
+
-74, -41, -42, -43, -74, -41, -43, -74, -47, -48,
|
74
|
+
-51, -52, -53, -54, 106, -1, -11, -74, -71, -73,
|
75
|
+
-19, -24, -74, -74, -63, -64, -65, -66, -67, -68,
|
76
|
+
-69, -74, -30, -74, -34, -35, -74, -46, -74, -74,
|
77
|
+
-74, -36, -37, -70, -72, -28, -60, -61, -29, -31,
|
78
|
+
-38, -74, -39, -40, -45, -44 ]
|
79
79
|
|
80
80
|
racc_goto_table = [
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
nil, nil, nil, nil, nil, nil,
|
85
|
-
nil, nil, nil, nil, nil, nil, nil, nil, 88, nil,
|
86
|
-
nil, nil, nil, nil, nil, 92, nil, nil, nil, nil,
|
87
|
-
93, nil, nil, 96, nil, nil, 97, nil, nil, nil,
|
81
|
+
49, 54, 33, 39, 36, 1, 34, 45, 38, 72,
|
82
|
+
81, 58, 32, 37, 47, 44, 68, 60, 61, 62,
|
83
|
+
63, 65, 40, 50, 67, nil, nil, 69, 57, 66,
|
84
|
+
70, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
88
85
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
89
|
-
nil, nil, nil, nil, nil, nil,
|
86
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
87
|
+
94, nil, nil, nil, nil, 100, nil, 102, 103 ]
|
90
88
|
|
91
89
|
racc_goto_check = [
|
92
|
-
8, 2,
|
93
|
-
7,
|
94
|
-
19, 22, nil,
|
95
|
-
nil, nil, nil, nil, nil, nil,
|
96
|
-
nil, nil, nil, nil, nil, nil, nil, nil,
|
97
|
-
nil, nil, nil, nil, nil, 2, nil, nil, nil, nil,
|
98
|
-
18, nil, nil, 18, nil, nil, 18, nil, nil, nil,
|
90
|
+
18, 18, 8, 2, 11, 1, 9, 10, 9, 17,
|
91
|
+
17, 10, 7, 12, 15, 16, 6, 8, 8, 8,
|
92
|
+
8, 2, 4, 19, 22, nil, nil, 8, 1, 9,
|
93
|
+
2, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
94
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
99
95
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
100
|
-
|
96
|
+
8, nil, nil, nil, nil, 18, nil, 18, 18 ]
|
101
97
|
|
102
98
|
racc_goto_pointer = [
|
103
|
-
nil,
|
104
|
-
|
105
|
-
nil, nil, -
|
99
|
+
nil, 5, -10, nil, 8, nil, -19, 2, -8, -4,
|
100
|
+
-13, -7, 2, nil, nil, -6, -5, -35, -21, 2,
|
101
|
+
nil, nil, -11 ]
|
106
102
|
|
107
103
|
racc_goto_default = [
|
108
|
-
nil, nil, 3,
|
109
|
-
|
110
|
-
|
104
|
+
nil, nil, 3, 2, 13, 14, 10, nil, 12, nil,
|
105
|
+
11, 28, 27, 26, 16, 18, nil, nil, nil, nil,
|
106
|
+
25, 73, nil ]
|
111
107
|
|
112
108
|
racc_reduce_table = [
|
113
109
|
0, 0, :racc_error,
|
@@ -180,7 +180,7 @@ module Nokogiri
|
|
180
180
|
m = chunk.match(/(<meta\s)(.*)(charset\s*=\s*([\w-]+))(.*)/i) and
|
181
181
|
return m[4]
|
182
182
|
catch(:encoding_found) {
|
183
|
-
Nokogiri::HTML::SAX::Parser.new(JumpSAXHandler.new(:encoding_found
|
183
|
+
Nokogiri::HTML::SAX::Parser.new(JumpSAXHandler.new(:encoding_found)).parse(chunk)
|
184
184
|
nil
|
185
185
|
}
|
186
186
|
else
|
data/lib/nokogiri/version.rb
CHANGED
data/lib/nokogiri/xml/node.rb
CHANGED
@@ -150,7 +150,7 @@ module Nokogiri
|
|
150
150
|
sets = paths.map { |path|
|
151
151
|
ctx = XPathContext.new(self)
|
152
152
|
ctx.register_namespaces(ns)
|
153
|
-
path = path.gsub(
|
153
|
+
path = path.gsub(/xmlns:/, ' :') unless Nokogiri.uses_libxml?
|
154
154
|
|
155
155
|
binds.each do |key,value|
|
156
156
|
ctx.register_variable key.to_s, value
|
data/test/html/test_document.rb
CHANGED
@@ -517,6 +517,12 @@ eohtml
|
|
517
517
|
assert @html.serialize
|
518
518
|
assert @html.to_html
|
519
519
|
end
|
520
|
+
|
521
|
+
def test_empty_document
|
522
|
+
# empty document should return "" #699
|
523
|
+
assert_equal "", Nokogiri::HTML.parse(nil).text
|
524
|
+
assert_equal "", Nokogiri::HTML.parse("").text
|
525
|
+
end
|
520
526
|
end
|
521
527
|
end
|
522
528
|
end
|
data/test/xml/test_xpath.rb
CHANGED
@@ -263,6 +263,33 @@ module Nokogiri
|
|
263
263
|
}.new)
|
264
264
|
assert_equal foo, doc.xpath("//foo")
|
265
265
|
end
|
266
|
+
|
267
|
+
def test_node_set_should_be_decorated
|
268
|
+
# "called decorate on nill" exception in JRuby issue#514
|
269
|
+
process_output= <<END
|
270
|
+
<test>
|
271
|
+
<track type="Image">
|
272
|
+
<Format>LZ77</Format>
|
273
|
+
</test>
|
274
|
+
END
|
275
|
+
doc = Nokogiri::XML.parse(process_output)
|
276
|
+
node = doc.xpath(%{//track[@type='Video']})
|
277
|
+
assert_equal "[]", node.xpath("Format").inspect
|
278
|
+
end
|
279
|
+
|
280
|
+
def test_very_specific_xml_xpath_making_problems_in_jruby
|
281
|
+
# manually merges pull request #681
|
282
|
+
xml_string = %q{<?xml version="1.0" encoding="UTF-8"?>
|
283
|
+
<ONIXMessage xmlns:elibri="http://elibri.com.pl/ns/extensions" release="3.0" xmlns="http://www.editeur.org/onix/3.0/reference">
|
284
|
+
<Product>
|
285
|
+
<RecordReference>a</RecordReference>
|
286
|
+
</Product>
|
287
|
+
</ONIXMessage>}
|
288
|
+
|
289
|
+
xml_doc = Nokogiri::XML(xml_string)
|
290
|
+
onix = xml_doc.children.first
|
291
|
+
assert_equal 'a', onix.at_xpath('xmlns:Product').at_xpath('xmlns:RecordReference').text
|
292
|
+
end
|
266
293
|
end
|
267
294
|
end
|
268
295
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -942039246
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
9
|
- 5
|
10
10
|
- rc
|
11
|
-
-
|
12
|
-
version: 1.5.5.
|
11
|
+
- 2
|
12
|
+
version: 1.5.5.rc2
|
13
13
|
platform: x86-mswin32-60
|
14
14
|
authors:
|
15
15
|
- Aaron Patterson
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2012-06-
|
23
|
+
date: 2012-06-14 00:00:00 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hoe-bundler
|
@@ -116,50 +116,50 @@ dependencies:
|
|
116
116
|
type: :development
|
117
117
|
version_requirements: *id006
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
|
-
name:
|
119
|
+
name: rake
|
120
120
|
prerelease: false
|
121
121
|
requirement: &id007 !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
124
124
|
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
hash:
|
126
|
+
hash: 25
|
127
127
|
segments:
|
128
|
-
-
|
129
|
-
-
|
130
|
-
|
131
|
-
version: 1.4.6
|
128
|
+
- 0
|
129
|
+
- 9
|
130
|
+
version: "0.9"
|
132
131
|
type: :development
|
133
132
|
version_requirements: *id007
|
134
133
|
- !ruby/object:Gem::Dependency
|
135
|
-
name: rake
|
134
|
+
name: rake-compiler
|
136
135
|
prerelease: false
|
137
136
|
requirement: &id008 !ruby/object:Gem::Requirement
|
138
137
|
none: false
|
139
138
|
requirements:
|
140
|
-
- - "
|
139
|
+
- - "="
|
141
140
|
- !ruby/object:Gem::Version
|
142
|
-
hash:
|
141
|
+
hash: 63
|
143
142
|
segments:
|
144
143
|
- 0
|
145
|
-
-
|
146
|
-
|
144
|
+
- 8
|
145
|
+
- 0
|
146
|
+
version: 0.8.0
|
147
147
|
type: :development
|
148
148
|
version_requirements: *id008
|
149
149
|
- !ruby/object:Gem::Dependency
|
150
|
-
name:
|
150
|
+
name: racc
|
151
151
|
prerelease: false
|
152
152
|
requirement: &id009 !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
155
|
-
- - "
|
155
|
+
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
hash:
|
157
|
+
hash: 11
|
158
158
|
segments:
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
162
|
-
version:
|
159
|
+
- 1
|
160
|
+
- 4
|
161
|
+
- 6
|
162
|
+
version: 1.4.6
|
163
163
|
type: :development
|
164
164
|
version_requirements: *id009
|
165
165
|
- !ruby/object:Gem::Dependency
|