nokogiri 1.4.4 → 1.4.5
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/.gemtest +0 -0
- data/CHANGELOG.ja.rdoc +16 -0
- data/CHANGELOG.rdoc +23 -1
- data/Manifest.txt +4 -3
- data/Rakefile +41 -37
- data/ext/nokogiri/xml_document.c +9 -0
- data/ext/nokogiri/xml_io.c +32 -7
- data/ext/nokogiri/xml_node.c +14 -13
- data/ext/nokogiri/xml_sax_parser.c +4 -2
- data/ext/nokogiri/xslt_stylesheet.c +9 -3
- data/lib/nokogiri/css.rb +6 -3
- data/lib/nokogiri/css/parser.rb +665 -70
- data/lib/nokogiri/css/parser.y +3 -1
- data/lib/nokogiri/css/parser_extras.rb +91 -0
- data/lib/nokogiri/css/tokenizer.rb +148 -3
- data/lib/nokogiri/css/tokenizer.rex +1 -1
- data/lib/nokogiri/ffi/structs/xml_attr.rb +2 -1
- data/lib/nokogiri/ffi/structs/xml_node_set.rb +1 -1
- data/lib/nokogiri/ffi/weak_bucket.rb +10 -10
- data/lib/nokogiri/ffi/xml/document.rb +8 -0
- data/lib/nokogiri/ffi/xml/node_set.rb +1 -0
- data/lib/nokogiri/ffi/xml/sax/parser.rb +9 -1
- data/lib/nokogiri/ffi/xslt/stylesheet.rb +4 -0
- data/lib/nokogiri/html/document.rb +134 -15
- data/lib/nokogiri/html/sax/parser.rb +6 -2
- data/lib/nokogiri/version.rb +6 -1
- data/lib/nokogiri/xml/node.rb +8 -23
- data/lib/nokogiri/xml/node/save_options.rb +10 -0
- data/lib/nokogiri/xml/node_set.rb +1 -1
- data/lib/nokogiri/xml/parse_options.rb +8 -0
- data/lib/nokogiri/xml/reader.rb +6 -6
- data/lib/nokogiri/xml/sax/document.rb +2 -2
- data/lib/nokogiri/xml/schema.rb +7 -1
- data/tasks/cross_compile.rb +8 -15
- data/test/css/test_tokenizer.rb +8 -0
- data/test/files/encoding.html +82 -0
- data/test/files/encoding.xhtml +84 -0
- data/test/helper.rb +2 -0
- data/test/html/sax/test_parser.rb +45 -0
- data/test/html/test_document.rb +55 -0
- data/test/html/test_document_encoding.rb +46 -0
- data/test/html/test_element_description.rb +1 -1
- data/test/test_memory_leak.rb +20 -0
- data/test/test_reader.rb +13 -0
- data/test/test_xslt_transforms.rb +6 -2
- data/test/xml/sax/test_parser.rb +16 -0
- data/test/xml/test_document.rb +3 -1
- data/test/xml/test_node.rb +13 -1
- data/test/xml/test_node_set.rb +10 -0
- data/test/xml/test_schema.rb +5 -0
- metadata +94 -109
- data/deps.rip +0 -5
- data/lib/nokogiri/css/generated_parser.rb +0 -676
- data/lib/nokogiri/css/generated_tokenizer.rb +0 -145
data/test/helper.rb
CHANGED
@@ -20,6 +20,8 @@ module Nokogiri
|
|
20
20
|
NICH_FILE = File.join(ASSETS_DIR, '2ch.html')
|
21
21
|
SHIFT_JIS_XML = File.join(ASSETS_DIR, 'shift_jis.xml')
|
22
22
|
SHIFT_JIS_HTML = File.join(ASSETS_DIR, 'shift_jis.html')
|
23
|
+
ENCODING_XHTML_FILE = File.join(ASSETS_DIR, 'encoding.xhtml')
|
24
|
+
ENCODING_HTML_FILE = File.join(ASSETS_DIR, 'encoding.html')
|
23
25
|
PO_XML_FILE = File.join(ASSETS_DIR, 'po.xml')
|
24
26
|
PO_SCHEMA_FILE = File.join(ASSETS_DIR, 'po.xsd')
|
25
27
|
ADDRESS_SCHEMA_FILE = File.join(ASSETS_DIR, 'address_book.rlx')
|
@@ -68,6 +68,51 @@ module Nokogiri
|
|
68
68
|
assert_equal([["html", []], ["body", []], ["p", []], ["p", []]],
|
69
69
|
@parser.document.start_elements)
|
70
70
|
end
|
71
|
+
|
72
|
+
def test_parser_attributes
|
73
|
+
html = <<-eohtml
|
74
|
+
<html>
|
75
|
+
<head>
|
76
|
+
<title>hello</title>
|
77
|
+
</head>
|
78
|
+
<body>
|
79
|
+
<img src="face.jpg" title="daddy & me">
|
80
|
+
<hr noshade size="2">
|
81
|
+
</body>
|
82
|
+
</html>
|
83
|
+
eohtml
|
84
|
+
|
85
|
+
block_called = false
|
86
|
+
@parser.parse(html) { |ctx|
|
87
|
+
block_called = true
|
88
|
+
ctx.replace_entities = true
|
89
|
+
}
|
90
|
+
|
91
|
+
assert block_called
|
92
|
+
|
93
|
+
noshade_value = if Nokogiri.uses_libxml? && Nokogiri::VERSION_INFO['libxml']['loaded'] < '2.7.7'
|
94
|
+
['noshade', 'noshade']
|
95
|
+
elsif Nokogiri.jruby?
|
96
|
+
['noshade', '']
|
97
|
+
else
|
98
|
+
['noshade', nil]
|
99
|
+
end
|
100
|
+
|
101
|
+
assert_equal [
|
102
|
+
['html', []],
|
103
|
+
['head', []],
|
104
|
+
['title', []],
|
105
|
+
['body', []],
|
106
|
+
['img', [
|
107
|
+
['src', 'face.jpg'],
|
108
|
+
['title', 'daddy & me']
|
109
|
+
]],
|
110
|
+
['hr', [
|
111
|
+
noshade_value,
|
112
|
+
['size', '2']
|
113
|
+
]]
|
114
|
+
], @parser.document.start_elements
|
115
|
+
end
|
71
116
|
end
|
72
117
|
end
|
73
118
|
end
|
data/test/html/test_document.rb
CHANGED
@@ -119,6 +119,18 @@ module Nokogiri
|
|
119
119
|
|
120
120
|
def test_meta_encoding
|
121
121
|
assert_equal 'UTF-8', @html.meta_encoding
|
122
|
+
|
123
|
+
html = Nokogiri::HTML(<<-eohtml)
|
124
|
+
<html>
|
125
|
+
<head>
|
126
|
+
<meta http-equiv="X-Content-Type" content="text/html; charset=Shift_JIS">
|
127
|
+
</head>
|
128
|
+
<body>
|
129
|
+
foo
|
130
|
+
</body>
|
131
|
+
</html>
|
132
|
+
eohtml
|
133
|
+
assert_nil html.meta_encoding
|
122
134
|
end
|
123
135
|
|
124
136
|
def test_meta_encoding=
|
@@ -126,6 +138,49 @@ module Nokogiri
|
|
126
138
|
assert_equal 'EUC-JP', @html.meta_encoding
|
127
139
|
end
|
128
140
|
|
141
|
+
def test_title
|
142
|
+
assert_equal 'Tender Lovemaking ', @html.title
|
143
|
+
doc = Nokogiri::HTML('<html><body>foo</body></html>')
|
144
|
+
assert_nil doc.title
|
145
|
+
end
|
146
|
+
|
147
|
+
def test_title=()
|
148
|
+
doc = Nokogiri::HTML(<<eohtml)
|
149
|
+
<html>
|
150
|
+
<head>
|
151
|
+
<title>old</title>
|
152
|
+
</head>
|
153
|
+
<body>
|
154
|
+
foo
|
155
|
+
</body>
|
156
|
+
</html>
|
157
|
+
eohtml
|
158
|
+
doc.title = 'new'
|
159
|
+
assert_equal 'new', doc.title
|
160
|
+
|
161
|
+
doc = Nokogiri::HTML(<<eohtml)
|
162
|
+
<html>
|
163
|
+
<head>
|
164
|
+
</head>
|
165
|
+
<body>
|
166
|
+
foo
|
167
|
+
</body>
|
168
|
+
</html>
|
169
|
+
eohtml
|
170
|
+
doc.title = 'new'
|
171
|
+
assert_equal 'new', doc.title
|
172
|
+
|
173
|
+
doc = Nokogiri::HTML(<<eohtml)
|
174
|
+
<html>
|
175
|
+
<body>
|
176
|
+
foo
|
177
|
+
</body>
|
178
|
+
</html>
|
179
|
+
eohtml
|
180
|
+
doc.title = 'new'
|
181
|
+
assert_nil doc.title
|
182
|
+
end
|
183
|
+
|
129
184
|
def test_meta_encoding_without_head
|
130
185
|
html = Nokogiri::HTML('<html><body>foo</body></html>')
|
131
186
|
assert_nil html.meta_encoding
|
@@ -73,5 +73,51 @@ module Nokogiri
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
76
|
+
|
77
|
+
class TestDocumentEncodingDetection < Nokogiri::TestCase
|
78
|
+
if IO.respond_to?(:binread)
|
79
|
+
def binread(file)
|
80
|
+
IO.binread(file)
|
81
|
+
end
|
82
|
+
else
|
83
|
+
def binread(file)
|
84
|
+
IO.read(file)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def binopen(file)
|
89
|
+
File.open(file, 'rb')
|
90
|
+
end
|
91
|
+
|
92
|
+
def test_document_xhtml_enc
|
93
|
+
[ENCODING_XHTML_FILE, ENCODING_HTML_FILE].each { |file|
|
94
|
+
doc_from_string_enc = Nokogiri::HTML(binread(file), nil, 'Shift_JIS')
|
95
|
+
ary_from_string_enc = doc_from_string_enc.xpath('//p/text()').map { |text| text.text }
|
96
|
+
|
97
|
+
doc_from_string = Nokogiri::HTML(binread(file))
|
98
|
+
ary_from_string = doc_from_string.xpath('//p/text()').map { |text| text.text }
|
99
|
+
|
100
|
+
doc_from_file_enc = Nokogiri::HTML(binopen(file), nil, 'Shift_JIS')
|
101
|
+
ary_from_file_enc = doc_from_file_enc.xpath('//p/text()').map { |text| text.text }
|
102
|
+
|
103
|
+
doc_from_file = Nokogiri::HTML(binopen(file))
|
104
|
+
ary_from_file = doc_from_file.xpath('//p/text()').map { |text| text.text }
|
105
|
+
|
106
|
+
title = 'たこ焼き仮面'
|
107
|
+
|
108
|
+
assert_equal(title, doc_from_string_enc.at('//title/text()').text)
|
109
|
+
assert_equal(title, doc_from_string.at('//title/text()').text)
|
110
|
+
assert_equal(title, doc_from_file_enc.at('//title/text()').text)
|
111
|
+
assert_equal(title, doc_from_file.at('//title/text()').text)
|
112
|
+
|
113
|
+
evil = (0..72).map { |i| '超' * i + '悪い事を構想中。' }
|
114
|
+
|
115
|
+
assert_equal(evil, ary_from_string_enc)
|
116
|
+
assert_equal(evil, ary_from_string)
|
117
|
+
assert_equal(evil, ary_from_file_enc)
|
118
|
+
assert_equal(evil, ary_from_file)
|
119
|
+
}
|
120
|
+
end
|
121
|
+
end
|
76
122
|
end
|
77
123
|
end
|
@@ -56,7 +56,7 @@ module Nokogiri
|
|
56
56
|
|
57
57
|
def test_subelements
|
58
58
|
sub_elements = ElementDescription['body'].sub_elements
|
59
|
-
if Nokogiri::LIBXML_VERSION
|
59
|
+
if Nokogiri::LIBXML_VERSION >= '2.7.7'
|
60
60
|
assert_equal 65, sub_elements.length
|
61
61
|
else
|
62
62
|
assert_equal 61, sub_elements.length
|
data/test/test_memory_leak.rb
CHANGED
@@ -13,6 +13,26 @@ class TestMemoryLeak < Nokogiri::TestCase
|
|
13
13
|
GC.start
|
14
14
|
end
|
15
15
|
end
|
16
|
+
|
17
|
+
class BadIO
|
18
|
+
def read(*args)
|
19
|
+
raise 'hell'
|
20
|
+
end
|
21
|
+
|
22
|
+
def write(*args)
|
23
|
+
raise 'chickens'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_for_mem_leak_on_io_callbacks
|
28
|
+
io = File.open SNUGGLES_FILE
|
29
|
+
reader = Nokogiri::XML.parse(io)
|
30
|
+
|
31
|
+
(10**10).times do
|
32
|
+
Nokogiri::XML.parse(BadIO.new) rescue nil
|
33
|
+
doc.write BadIO.new rescue nil
|
34
|
+
end
|
35
|
+
end
|
16
36
|
|
17
37
|
def test_for_memory_leak
|
18
38
|
begin
|
data/test/test_reader.rb
CHANGED
@@ -81,6 +81,19 @@ class TestReader < Nokogiri::TestCase
|
|
81
81
|
assert_equal [false, false, false, false, false, false, false],
|
82
82
|
reader.map { |x| x.default? }
|
83
83
|
end
|
84
|
+
|
85
|
+
class ReallyBadIO
|
86
|
+
def read(size)
|
87
|
+
'a' * size ** 10
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
unless Nokogiri.ffi?
|
92
|
+
def test_io_that_reads_too_much
|
93
|
+
io = ReallyBadIO.new
|
94
|
+
Nokogiri::XML::Reader(io)
|
95
|
+
end
|
96
|
+
end
|
84
97
|
|
85
98
|
def test_in_memory
|
86
99
|
assert Nokogiri::XML::Reader(<<-eoxml)
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require "helper"
|
2
2
|
|
3
3
|
class TestXsltTransforms < Nokogiri::TestCase
|
4
|
-
|
5
4
|
def setup
|
6
5
|
@doc = Nokogiri::XML(File.open(XML_FILE))
|
7
6
|
end
|
@@ -179,11 +178,16 @@ encoding="iso-8859-1" indent="yes"/>
|
|
179
178
|
assert_raises(RuntimeError) { Nokogiri::XSLT.parse(xslt_str) }
|
180
179
|
end
|
181
180
|
|
181
|
+
def test_passing_a_non_document_to_transform
|
182
|
+
xsl = Nokogiri::XSLT('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"></xsl:stylesheet>')
|
183
|
+
assert_raises(ArgumentError) { xsl.transform("<div></div>") }
|
184
|
+
assert_raises(ArgumentError) { xsl.transform(Nokogiri::HTML("").css("body")) }
|
185
|
+
end
|
186
|
+
|
182
187
|
def check_params result_doc, params
|
183
188
|
result_doc.xpath('/root/params/*').each do |p|
|
184
189
|
assert_equal p.content, params[p.name.intern]
|
185
190
|
end
|
186
191
|
end
|
187
|
-
|
188
192
|
end
|
189
193
|
end
|
data/test/xml/sax/test_parser.rb
CHANGED
@@ -309,6 +309,22 @@ module Nokogiri
|
|
309
309
|
<p>Paragraph 2</p>
|
310
310
|
eoxml
|
311
311
|
end
|
312
|
+
|
313
|
+
def test_parser_attributes
|
314
|
+
xml = <<-eoxml
|
315
|
+
<?xml version="1.0" ?><root><foo a="&b" c=">d" /></root>
|
316
|
+
eoxml
|
317
|
+
|
318
|
+
block_called = false
|
319
|
+
@parser.parse(xml) { |ctx|
|
320
|
+
block_called = true
|
321
|
+
ctx.replace_entities = true
|
322
|
+
}
|
323
|
+
|
324
|
+
assert block_called
|
325
|
+
|
326
|
+
assert_equal [['root', []], ['foo', [['a', '&b'], ['c', '>d']]]], @parser.document.start_elements
|
327
|
+
end
|
312
328
|
end
|
313
329
|
end
|
314
330
|
end
|
data/test/xml/test_document.rb
CHANGED
@@ -606,7 +606,7 @@ module Nokogiri
|
|
606
606
|
<a:foo>hello from a</a:foo>
|
607
607
|
<b:foo>hello from b</b:foo>
|
608
608
|
<container xmlns:c="http://c.flavorjon.es/">
|
609
|
-
<c:foo>hello from c</c:foo>
|
609
|
+
<c:foo c:attr='attr-value'>hello from c</c:foo>
|
610
610
|
</container>
|
611
611
|
</root>
|
612
612
|
EOX
|
@@ -620,6 +620,7 @@ module Nokogiri
|
|
620
620
|
assert_equal 1, doc.xpath("//a:foo").length
|
621
621
|
assert_equal 1, doc.xpath("//a:foo").length
|
622
622
|
assert_equal 1, doc.xpath("//x:foo", "x" => "http://c.flavorjon.es/").length
|
623
|
+
assert_match %r{foo c:attr}, doc.to_xml
|
623
624
|
|
624
625
|
doc.remove_namespaces!
|
625
626
|
|
@@ -629,6 +630,7 @@ module Nokogiri
|
|
629
630
|
assert_equal 0, doc.xpath("//a:foo", namespaces).length
|
630
631
|
assert_equal 0, doc.xpath("//a:foo", namespaces).length
|
631
632
|
assert_equal 0, doc.xpath("//x:foo", "x" => "http://c.flavorjon.es/").length
|
633
|
+
assert_match %r{foo attr}, doc.to_xml
|
632
634
|
end
|
633
635
|
|
634
636
|
def test_subset_is_decorated
|
data/test/xml/test_node.rb
CHANGED
@@ -497,7 +497,9 @@ module Nokogiri
|
|
497
497
|
end
|
498
498
|
io.rewind
|
499
499
|
assert called
|
500
|
-
|
500
|
+
string = io.read
|
501
|
+
assert_equal @xml.serialize(nil, conf.options), string
|
502
|
+
assert_equal @xml.serialize(nil, conf), string
|
501
503
|
end
|
502
504
|
|
503
505
|
%w{ xml html xhtml }.each do |type|
|
@@ -519,6 +521,7 @@ module Nokogiri
|
|
519
521
|
end
|
520
522
|
assert called
|
521
523
|
assert_equal @xml.serialize(nil, conf.options), string
|
524
|
+
assert_equal @xml.serialize(nil, conf), string
|
522
525
|
end
|
523
526
|
|
524
527
|
def test_hold_refence_to_subnode
|
@@ -696,6 +699,15 @@ module Nokogiri
|
|
696
699
|
assert_equal('/staff/employee[1]', node.path)
|
697
700
|
end
|
698
701
|
|
702
|
+
def test_parent_xpath
|
703
|
+
assert set = @xml.search('//employee')
|
704
|
+
assert node = set.first
|
705
|
+
assert parent_set = node.search('..')
|
706
|
+
assert parent_node = parent_set.first
|
707
|
+
assert_equal '/staff', parent_node.path
|
708
|
+
assert_equal node.parent, parent_node
|
709
|
+
end
|
710
|
+
|
699
711
|
def test_search_by_symbol
|
700
712
|
assert set = @xml.search(:employee)
|
701
713
|
assert 5, set.length
|
data/test/xml/test_node_set.rb
CHANGED
@@ -158,6 +158,16 @@ module Nokogiri
|
|
158
158
|
set = html.xpath("/html/body/div")
|
159
159
|
assert_equal set.first, set.search(".a").first
|
160
160
|
end
|
161
|
+
|
162
|
+
def test_css_search_with_namespace
|
163
|
+
fragment = Nokogiri::XML.fragment(<<-eoxml)
|
164
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
165
|
+
<head></head>
|
166
|
+
<body></body>
|
167
|
+
</html>
|
168
|
+
eoxml
|
169
|
+
assert_nothing_raised{ fragment.children.search( 'body', { 'xmlns' => 'http://www.w3.org/1999/xhtml' }) }
|
170
|
+
end
|
161
171
|
|
162
172
|
def test_double_equal
|
163
173
|
assert node_set_one = @xml.xpath('//employee')
|
data/test/xml/test_schema.rb
CHANGED
@@ -74,6 +74,11 @@ module Nokogiri
|
|
74
74
|
assert_equal 2, errors.length
|
75
75
|
end
|
76
76
|
|
77
|
+
def test_validate_non_document
|
78
|
+
string = File.read(PO_XML_FILE)
|
79
|
+
assert_raise(ArgumentError) {@xsd.validate(string)}
|
80
|
+
end
|
81
|
+
|
77
82
|
def test_valid?
|
78
83
|
valid_doc = Nokogiri::XML(File.read(PO_XML_FILE))
|
79
84
|
|
metadata
CHANGED
@@ -1,13 +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: 13
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 5
|
10
|
+
version: 1.4.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Aaron Patterson
|
@@ -16,27 +16,25 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2011-06-16 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
|
-
name:
|
23
|
+
name: racc
|
24
24
|
prerelease: false
|
25
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 3
|
31
31
|
segments:
|
32
|
-
- 2
|
33
32
|
- 0
|
34
|
-
|
35
|
-
version: 2.0.4
|
33
|
+
version: "0"
|
36
34
|
type: :development
|
37
35
|
version_requirements: *id001
|
38
36
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
37
|
+
name: rexical
|
40
38
|
prerelease: false
|
41
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
40
|
none: false
|
@@ -50,7 +48,7 @@ dependencies:
|
|
50
48
|
type: :development
|
51
49
|
version_requirements: *id002
|
52
50
|
- !ruby/object:Gem::Dependency
|
53
|
-
name:
|
51
|
+
name: rake-compiler
|
54
52
|
prerelease: false
|
55
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
54
|
none: false
|
@@ -63,24 +61,10 @@ dependencies:
|
|
63
61
|
version: "0"
|
64
62
|
type: :development
|
65
63
|
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: rake-compiler
|
68
|
-
prerelease: false
|
69
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
hash: 3
|
75
|
-
segments:
|
76
|
-
- 0
|
77
|
-
version: "0"
|
78
|
-
type: :development
|
79
|
-
version_requirements: *id004
|
80
64
|
- !ruby/object:Gem::Dependency
|
81
65
|
name: minitest
|
82
66
|
prerelease: false
|
83
|
-
requirement: &
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
84
68
|
none: false
|
85
69
|
requirements:
|
86
70
|
- - ">="
|
@@ -92,23 +76,23 @@ dependencies:
|
|
92
76
|
- 0
|
93
77
|
version: 1.6.0
|
94
78
|
type: :development
|
95
|
-
version_requirements: *
|
79
|
+
version_requirements: *id004
|
96
80
|
- !ruby/object:Gem::Dependency
|
97
81
|
name: hoe
|
98
82
|
prerelease: false
|
99
|
-
requirement: &
|
83
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
100
84
|
none: false
|
101
85
|
requirements:
|
102
86
|
- - ">="
|
103
87
|
- !ruby/object:Gem::Version
|
104
|
-
hash:
|
88
|
+
hash: 35
|
105
89
|
segments:
|
106
90
|
- 2
|
107
|
-
-
|
108
|
-
-
|
109
|
-
version: 2.
|
91
|
+
- 9
|
92
|
+
- 4
|
93
|
+
version: 2.9.4
|
110
94
|
type: :development
|
111
|
-
version_requirements: *
|
95
|
+
version_requirements: *id005
|
112
96
|
description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
|
113
97
|
many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
|
114
98
|
XML is like violence - if it doesn\xE2\x80\x99t solve your problems, you are not using\n\
|
@@ -122,45 +106,46 @@ extensions:
|
|
122
106
|
- ext/nokogiri/extconf.rb
|
123
107
|
extra_rdoc_files:
|
124
108
|
- Manifest.txt
|
109
|
+
- README.ja.rdoc
|
125
110
|
- CHANGELOG.rdoc
|
126
111
|
- CHANGELOG.ja.rdoc
|
127
112
|
- README.rdoc
|
128
|
-
- README.ja.rdoc
|
129
|
-
- ext/nokogiri/xml_io.c
|
130
|
-
- ext/nokogiri/xml_sax_parser.c
|
131
|
-
- ext/nokogiri/xml_xpath_context.c
|
132
|
-
- ext/nokogiri/html_element_description.c
|
133
|
-
- ext/nokogiri/xml_libxml2_hacks.c
|
134
|
-
- ext/nokogiri/xml_sax_parser_context.c
|
135
113
|
- ext/nokogiri/xml_sax_push_parser.c
|
136
|
-
- ext/nokogiri/
|
114
|
+
- ext/nokogiri/xml_relax_ng.c
|
115
|
+
- ext/nokogiri/html_sax_parser_context.c
|
116
|
+
- ext/nokogiri/html_entity_lookup.c
|
117
|
+
- ext/nokogiri/xml_text.c
|
137
118
|
- ext/nokogiri/nokogiri.c
|
138
119
|
- ext/nokogiri/xml_element_decl.c
|
139
|
-
- ext/nokogiri/
|
140
|
-
- ext/nokogiri/
|
141
|
-
- ext/nokogiri/xml_dtd.c
|
120
|
+
- ext/nokogiri/xml_encoding_handler.c
|
121
|
+
- ext/nokogiri/html_document.c
|
142
122
|
- ext/nokogiri/xslt_stylesheet.c
|
143
|
-
- ext/nokogiri/
|
123
|
+
- ext/nokogiri/xml_attribute_decl.c
|
124
|
+
- ext/nokogiri/xml_io.c
|
144
125
|
- ext/nokogiri/xml_document_fragment.c
|
145
|
-
- ext/nokogiri/xml_text.c
|
146
|
-
- ext/nokogiri/xml_entity_reference.c
|
147
|
-
- ext/nokogiri/html_sax_parser_context.c
|
148
|
-
- ext/nokogiri/xml_comment.c
|
149
126
|
- ext/nokogiri/xml_namespace.c
|
150
|
-
- ext/nokogiri/
|
151
|
-
- ext/nokogiri/
|
152
|
-
- ext/nokogiri/
|
127
|
+
- ext/nokogiri/xml_libxml2_hacks.c
|
128
|
+
- ext/nokogiri/xml_sax_parser_context.c
|
129
|
+
- ext/nokogiri/xml_comment.c
|
130
|
+
- ext/nokogiri/xml_sax_parser.c
|
131
|
+
- ext/nokogiri/html_element_description.c
|
132
|
+
- ext/nokogiri/xml_xpath_context.c
|
153
133
|
- ext/nokogiri/xml_syntax_error.c
|
154
134
|
- ext/nokogiri/xml_document.c
|
155
|
-
- ext/nokogiri/
|
135
|
+
- ext/nokogiri/xml_entity_decl.c
|
136
|
+
- ext/nokogiri/xml_node.c
|
137
|
+
- ext/nokogiri/xml_node_set.c
|
156
138
|
- ext/nokogiri/xml_reader.c
|
157
|
-
- ext/nokogiri/xml_attr.c
|
158
139
|
- ext/nokogiri/xml_processing_instruction.c
|
140
|
+
- ext/nokogiri/xml_element_content.c
|
141
|
+
- ext/nokogiri/xml_dtd.c
|
142
|
+
- ext/nokogiri/xml_attr.c
|
159
143
|
- ext/nokogiri/xml_schema.c
|
160
|
-
- ext/nokogiri/
|
161
|
-
- ext/nokogiri/
|
144
|
+
- ext/nokogiri/xml_cdata.c
|
145
|
+
- ext/nokogiri/xml_entity_reference.c
|
162
146
|
files:
|
163
147
|
- .autotest
|
148
|
+
- .gemtest
|
164
149
|
- CHANGELOG.ja.rdoc
|
165
150
|
- CHANGELOG.rdoc
|
166
151
|
- Manifest.txt
|
@@ -168,7 +153,6 @@ files:
|
|
168
153
|
- README.rdoc
|
169
154
|
- Rakefile
|
170
155
|
- bin/nokogiri
|
171
|
-
- deps.rip
|
172
156
|
- ext/nokogiri/depend
|
173
157
|
- ext/nokogiri/extconf.rb
|
174
158
|
- ext/nokogiri/html_document.c
|
@@ -239,11 +223,10 @@ files:
|
|
239
223
|
- ext/nokogiri/xslt_stylesheet.h
|
240
224
|
- lib/nokogiri.rb
|
241
225
|
- lib/nokogiri/css.rb
|
242
|
-
- lib/nokogiri/css/generated_parser.rb
|
243
|
-
- lib/nokogiri/css/generated_tokenizer.rb
|
244
226
|
- lib/nokogiri/css/node.rb
|
245
227
|
- lib/nokogiri/css/parser.rb
|
246
228
|
- lib/nokogiri/css/parser.y
|
229
|
+
- lib/nokogiri/css/parser_extras.rb
|
247
230
|
- lib/nokogiri/css/syntax_error.rb
|
248
231
|
- lib/nokogiri/css/tokenizer.rb
|
249
232
|
- lib/nokogiri/css/tokenizer.rex
|
@@ -375,6 +358,8 @@ files:
|
|
375
358
|
- test/files/address_book.xml
|
376
359
|
- test/files/bar/bar.xsd
|
377
360
|
- test/files/dont_hurt_em_why.xml
|
361
|
+
- test/files/encoding.html
|
362
|
+
- test/files/encoding.xhtml
|
378
363
|
- test/files/exslt.xml
|
379
364
|
- test/files/exslt.xslt
|
380
365
|
- test/files/foo/foo.xsd
|
@@ -473,67 +458,67 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
473
458
|
requirements: []
|
474
459
|
|
475
460
|
rubyforge_project: nokogiri
|
476
|
-
rubygems_version: 1.
|
461
|
+
rubygems_version: 1.6.0
|
477
462
|
signing_key:
|
478
463
|
specification_version: 3
|
479
464
|
summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
|
480
465
|
test_files:
|
481
|
-
- test/
|
466
|
+
- test/test_convert_xpath.rb
|
467
|
+
- test/test_soap4r_sax.rb
|
468
|
+
- test/test_memory_leak.rb
|
469
|
+
- test/test_nokogiri.rb
|
482
470
|
- test/test_css_cache.rb
|
483
|
-
- test/
|
471
|
+
- test/css/test_nthiness.rb
|
472
|
+
- test/css/test_xpath_visitor.rb
|
473
|
+
- test/css/test_parser.rb
|
474
|
+
- test/css/test_tokenizer.rb
|
484
475
|
- test/decorators/test_slop.rb
|
485
|
-
- test/
|
486
|
-
- test/
|
487
|
-
- test/
|
488
|
-
- test/
|
489
|
-
- test/
|
490
|
-
- test/
|
476
|
+
- test/html/test_document.rb
|
477
|
+
- test/html/test_document_encoding.rb
|
478
|
+
- test/html/test_named_characters.rb
|
479
|
+
- test/html/test_document_fragment.rb
|
480
|
+
- test/html/test_node.rb
|
481
|
+
- test/html/test_builder.rb
|
482
|
+
- test/html/sax/test_parser_context.rb
|
483
|
+
- test/html/sax/test_parser.rb
|
484
|
+
- test/html/test_node_encoding.rb
|
485
|
+
- test/html/test_element_description.rb
|
486
|
+
- test/ffi/test_document.rb
|
487
|
+
- test/test_reader.rb
|
488
|
+
- test/xml/test_parse_options.rb
|
491
489
|
- test/xml/test_unparented_node.rb
|
492
|
-
- test/xml/
|
493
|
-
- test/xml/test_reader_encoding.rb
|
494
|
-
- test/xml/test_processing_instruction.rb
|
495
|
-
- test/xml/test_cdata.rb
|
496
|
-
- test/xml/test_node.rb
|
497
|
-
- test/xml/test_builder.rb
|
498
|
-
- test/xml/test_namespace.rb
|
490
|
+
- test/xml/test_element_decl.rb
|
499
491
|
- test/xml/test_document.rb
|
500
|
-
- test/xml/test_element_content.rb
|
501
|
-
- test/xml/test_document_fragment.rb
|
502
|
-
- test/xml/test_entity_reference.rb
|
503
|
-
- test/xml/test_attr.rb
|
504
492
|
- test/xml/test_dtd.rb
|
505
|
-
- test/xml/
|
506
|
-
- test/xml/sax/test_parser_context.rb
|
507
|
-
- test/xml/sax/test_push_parser.rb
|
508
|
-
- test/xml/test_element_decl.rb
|
509
|
-
- test/xml/test_node_attributes.rb
|
510
|
-
- test/xml/test_xpath.rb
|
511
|
-
- test/xml/test_node_set.rb
|
512
|
-
- test/xml/test_parse_options.rb
|
493
|
+
- test/xml/test_document_encoding.rb
|
513
494
|
- test/xml/test_entity_decl.rb
|
495
|
+
- test/xml/test_dtd_encoding.rb
|
514
496
|
- test/xml/node/test_save_options.rb
|
515
497
|
- test/xml/node/test_subclass.rb
|
516
|
-
- test/xml/
|
498
|
+
- test/xml/test_document_fragment.rb
|
499
|
+
- test/xml/test_cdata.rb
|
500
|
+
- test/xml/test_text.rb
|
501
|
+
- test/xml/test_reader_encoding.rb
|
502
|
+
- test/xml/test_xpath.rb
|
503
|
+
- test/xml/test_element_content.rb
|
504
|
+
- test/xml/test_node.rb
|
505
|
+
- test/xml/test_builder.rb
|
506
|
+
- test/xml/sax/test_push_parser.rb
|
507
|
+
- test/xml/sax/test_parser_context.rb
|
508
|
+
- test/xml/sax/test_parser.rb
|
517
509
|
- test/xml/test_schema.rb
|
518
|
-
- test/xml/
|
510
|
+
- test/xml/test_node_set.rb
|
511
|
+
- test/xml/test_attr.rb
|
512
|
+
- test/xml/test_processing_instruction.rb
|
513
|
+
- test/xml/test_node_encoding.rb
|
514
|
+
- test/xml/test_syntax_error.rb
|
519
515
|
- test/xml/test_comment.rb
|
520
|
-
- test/
|
521
|
-
- test/
|
522
|
-
- test/
|
523
|
-
- test/
|
524
|
-
- test/
|
525
|
-
- test/
|
526
|
-
- test/html/test_document_fragment.rb
|
527
|
-
- test/html/sax/test_parser.rb
|
528
|
-
- test/html/sax/test_parser_context.rb
|
529
|
-
- test/html/test_named_characters.rb
|
530
|
-
- test/html/test_element_description.rb
|
531
|
-
- test/ffi/test_document.rb
|
532
|
-
- test/test_convert_xpath.rb
|
533
|
-
- test/test_soap4r_sax.rb
|
534
|
-
- test/css/test_nthiness.rb
|
535
|
-
- test/css/test_parser.rb
|
536
|
-
- test/css/test_tokenizer.rb
|
537
|
-
- test/css/test_xpath_visitor.rb
|
538
|
-
- test/xslt/test_custom_functions.rb
|
516
|
+
- test/xml/test_entity_reference.rb
|
517
|
+
- test/xml/test_node_reparenting.rb
|
518
|
+
- test/xml/test_attribute_decl.rb
|
519
|
+
- test/xml/test_relax_ng.rb
|
520
|
+
- test/xml/test_namespace.rb
|
521
|
+
- test/xml/test_node_attributes.rb
|
539
522
|
- test/test_xslt_transforms.rb
|
523
|
+
- test/xslt/test_custom_functions.rb
|
524
|
+
- test/test_encoding_handler.rb
|