nokogiri 1.4.4.2-java → 1.4.5-java
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 +22 -0
- data/Manifest.txt +4 -3
- data/Rakefile +11 -36
- 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 +1 -5
- 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 +89 -130
- 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,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 4
|
8
|
-
- 4
|
9
|
-
- 2
|
10
|
-
version: 1.4.4.2
|
4
|
+
prerelease:
|
5
|
+
version: 1.4.5
|
11
6
|
platform: java
|
12
7
|
authors:
|
13
8
|
- Aaron Patterson
|
@@ -16,108 +11,75 @@ autorequire:
|
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
13
|
|
19
|
-
date:
|
14
|
+
date: 2011-06-16 00:00:00 -04:00
|
20
15
|
default_executable: nokogiri
|
21
16
|
dependencies:
|
22
17
|
- !ruby/object:Gem::Dependency
|
23
|
-
name:
|
18
|
+
name: racc
|
24
19
|
prerelease: false
|
25
20
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
21
|
none: false
|
27
22
|
requirements:
|
28
23
|
- - ">="
|
29
24
|
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
- 2
|
32
|
-
- 0
|
33
|
-
- 4
|
34
|
-
version: 2.0.4
|
25
|
+
version: "0"
|
35
26
|
type: :development
|
36
27
|
version_requirements: *id001
|
37
28
|
- !ruby/object:Gem::Dependency
|
38
|
-
name:
|
29
|
+
name: rexical
|
39
30
|
prerelease: false
|
40
31
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
32
|
none: false
|
42
33
|
requirements:
|
43
34
|
- - ">="
|
44
35
|
- !ruby/object:Gem::Version
|
45
|
-
segments:
|
46
|
-
- 0
|
47
36
|
version: "0"
|
48
37
|
type: :development
|
49
38
|
version_requirements: *id002
|
50
39
|
- !ruby/object:Gem::Dependency
|
51
|
-
name:
|
40
|
+
name: rake-compiler
|
52
41
|
prerelease: false
|
53
42
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
43
|
none: false
|
55
44
|
requirements:
|
56
45
|
- - ">="
|
57
46
|
- !ruby/object:Gem::Version
|
58
|
-
segments:
|
59
|
-
- 0
|
60
47
|
version: "0"
|
61
48
|
type: :development
|
62
49
|
version_requirements: *id003
|
63
50
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
51
|
+
name: minitest
|
65
52
|
prerelease: false
|
66
53
|
requirement: &id004 !ruby/object:Gem::Requirement
|
67
54
|
none: false
|
68
55
|
requirements:
|
69
56
|
- - ">="
|
70
57
|
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
- 0
|
73
|
-
version: "0"
|
58
|
+
version: 1.6.0
|
74
59
|
type: :development
|
75
60
|
version_requirements: *id004
|
76
61
|
- !ruby/object:Gem::Dependency
|
77
|
-
name:
|
62
|
+
name: hoe
|
78
63
|
prerelease: false
|
79
64
|
requirement: &id005 !ruby/object:Gem::Requirement
|
80
65
|
none: false
|
81
66
|
requirements:
|
82
67
|
- - ">="
|
83
68
|
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
- 1
|
86
|
-
- 6
|
87
|
-
- 0
|
88
|
-
version: 1.6.0
|
69
|
+
version: 2.9.4
|
89
70
|
type: :development
|
90
71
|
version_requirements: *id005
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: hoe
|
93
|
-
prerelease: false
|
94
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
|
-
requirements:
|
97
|
-
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
segments:
|
100
|
-
- 2
|
101
|
-
- 6
|
102
|
-
- 2
|
103
|
-
version: 2.6.2
|
104
|
-
type: :development
|
105
|
-
version_requirements: *id006
|
106
72
|
- !ruby/object:Gem::Dependency
|
107
73
|
name: weakling
|
108
74
|
prerelease: false
|
109
|
-
requirement: &
|
75
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
110
76
|
none: false
|
111
77
|
requirements:
|
112
78
|
- - ">="
|
113
79
|
- !ruby/object:Gem::Version
|
114
|
-
segments:
|
115
|
-
- 0
|
116
|
-
- 0
|
117
|
-
- 3
|
118
80
|
version: 0.0.3
|
119
81
|
type: :runtime
|
120
|
-
version_requirements: *
|
82
|
+
version_requirements: *id006
|
121
83
|
description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
|
122
84
|
many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
|
123
85
|
XML is like violence - if it doesn\xE2\x80\x99t solve your problems, you are not using\n\
|
@@ -131,45 +93,46 @@ extensions: []
|
|
131
93
|
|
132
94
|
extra_rdoc_files:
|
133
95
|
- Manifest.txt
|
96
|
+
- README.ja.rdoc
|
134
97
|
- CHANGELOG.rdoc
|
135
98
|
- CHANGELOG.ja.rdoc
|
136
99
|
- README.rdoc
|
137
|
-
- README.ja.rdoc
|
138
|
-
- ext/nokogiri/xml_io.c
|
139
|
-
- ext/nokogiri/xml_sax_parser.c
|
140
|
-
- ext/nokogiri/xml_xpath_context.c
|
141
|
-
- ext/nokogiri/html_element_description.c
|
142
|
-
- ext/nokogiri/xml_libxml2_hacks.c
|
143
|
-
- ext/nokogiri/xml_sax_parser_context.c
|
144
100
|
- ext/nokogiri/xml_sax_push_parser.c
|
145
|
-
- ext/nokogiri/
|
101
|
+
- ext/nokogiri/xml_relax_ng.c
|
102
|
+
- ext/nokogiri/html_sax_parser_context.c
|
103
|
+
- ext/nokogiri/html_entity_lookup.c
|
104
|
+
- ext/nokogiri/xml_text.c
|
146
105
|
- ext/nokogiri/nokogiri.c
|
147
106
|
- ext/nokogiri/xml_element_decl.c
|
148
|
-
- ext/nokogiri/
|
149
|
-
- ext/nokogiri/
|
150
|
-
- ext/nokogiri/xml_dtd.c
|
107
|
+
- ext/nokogiri/xml_encoding_handler.c
|
108
|
+
- ext/nokogiri/html_document.c
|
151
109
|
- ext/nokogiri/xslt_stylesheet.c
|
152
|
-
- ext/nokogiri/
|
110
|
+
- ext/nokogiri/xml_attribute_decl.c
|
111
|
+
- ext/nokogiri/xml_io.c
|
153
112
|
- ext/nokogiri/xml_document_fragment.c
|
154
|
-
- ext/nokogiri/xml_text.c
|
155
|
-
- ext/nokogiri/xml_entity_reference.c
|
156
|
-
- ext/nokogiri/html_sax_parser_context.c
|
157
|
-
- ext/nokogiri/xml_comment.c
|
158
113
|
- ext/nokogiri/xml_namespace.c
|
159
|
-
- ext/nokogiri/
|
160
|
-
- ext/nokogiri/
|
161
|
-
- ext/nokogiri/
|
114
|
+
- ext/nokogiri/xml_libxml2_hacks.c
|
115
|
+
- ext/nokogiri/xml_sax_parser_context.c
|
116
|
+
- ext/nokogiri/xml_comment.c
|
117
|
+
- ext/nokogiri/xml_sax_parser.c
|
118
|
+
- ext/nokogiri/html_element_description.c
|
119
|
+
- ext/nokogiri/xml_xpath_context.c
|
162
120
|
- ext/nokogiri/xml_syntax_error.c
|
163
121
|
- ext/nokogiri/xml_document.c
|
164
|
-
- ext/nokogiri/
|
122
|
+
- ext/nokogiri/xml_entity_decl.c
|
123
|
+
- ext/nokogiri/xml_node.c
|
124
|
+
- ext/nokogiri/xml_node_set.c
|
165
125
|
- ext/nokogiri/xml_reader.c
|
166
|
-
- ext/nokogiri/xml_attr.c
|
167
126
|
- ext/nokogiri/xml_processing_instruction.c
|
127
|
+
- ext/nokogiri/xml_element_content.c
|
128
|
+
- ext/nokogiri/xml_dtd.c
|
129
|
+
- ext/nokogiri/xml_attr.c
|
168
130
|
- ext/nokogiri/xml_schema.c
|
169
|
-
- ext/nokogiri/
|
170
|
-
- ext/nokogiri/
|
131
|
+
- ext/nokogiri/xml_cdata.c
|
132
|
+
- ext/nokogiri/xml_entity_reference.c
|
171
133
|
files:
|
172
134
|
- .autotest
|
135
|
+
- .gemtest
|
173
136
|
- CHANGELOG.ja.rdoc
|
174
137
|
- CHANGELOG.rdoc
|
175
138
|
- Manifest.txt
|
@@ -177,7 +140,6 @@ files:
|
|
177
140
|
- README.rdoc
|
178
141
|
- Rakefile
|
179
142
|
- bin/nokogiri
|
180
|
-
- deps.rip
|
181
143
|
- ext/nokogiri/depend
|
182
144
|
- ext/nokogiri/extconf.rb
|
183
145
|
- ext/nokogiri/html_document.c
|
@@ -248,11 +210,10 @@ files:
|
|
248
210
|
- ext/nokogiri/xslt_stylesheet.h
|
249
211
|
- lib/nokogiri.rb
|
250
212
|
- lib/nokogiri/css.rb
|
251
|
-
- lib/nokogiri/css/generated_parser.rb
|
252
|
-
- lib/nokogiri/css/generated_tokenizer.rb
|
253
213
|
- lib/nokogiri/css/node.rb
|
254
214
|
- lib/nokogiri/css/parser.rb
|
255
215
|
- lib/nokogiri/css/parser.y
|
216
|
+
- lib/nokogiri/css/parser_extras.rb
|
256
217
|
- lib/nokogiri/css/syntax_error.rb
|
257
218
|
- lib/nokogiri/css/tokenizer.rb
|
258
219
|
- lib/nokogiri/css/tokenizer.rex
|
@@ -384,6 +345,8 @@ files:
|
|
384
345
|
- test/files/address_book.xml
|
385
346
|
- test/files/bar/bar.xsd
|
386
347
|
- test/files/dont_hurt_em_why.xml
|
348
|
+
- test/files/encoding.html
|
349
|
+
- test/files/encoding.xhtml
|
387
350
|
- test/files/exslt.xml
|
388
351
|
- test/files/exslt.xslt
|
389
352
|
- test/files/foo/foo.xsd
|
@@ -451,12 +414,12 @@ files:
|
|
451
414
|
- test/xml/test_unparented_node.rb
|
452
415
|
- test/xml/test_xpath.rb
|
453
416
|
- test/xslt/test_custom_functions.rb
|
454
|
-
- ext/nokogiri/
|
455
|
-
- ext/nokogiri/libxml2.dll
|
417
|
+
- ext/nokogiri/libcharset-1.dll
|
456
418
|
- ext/nokogiri/libxslt.dll
|
419
|
+
- ext/nokogiri/libiconv-2.dll
|
457
420
|
- ext/nokogiri/zlib1.dll
|
458
421
|
- ext/nokogiri/libexslt.dll
|
459
|
-
- ext/nokogiri/
|
422
|
+
- ext/nokogiri/libxml2.dll
|
460
423
|
has_rdoc: true
|
461
424
|
homepage: http://nokogiri.org
|
462
425
|
licenses: []
|
@@ -472,81 +435,77 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
472
435
|
requirements:
|
473
436
|
- - ">="
|
474
437
|
- !ruby/object:Gem::Version
|
475
|
-
segments:
|
476
|
-
- 0
|
477
438
|
version: "0"
|
478
439
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
479
440
|
none: false
|
480
441
|
requirements:
|
481
442
|
- - ">="
|
482
443
|
- !ruby/object:Gem::Version
|
483
|
-
segments:
|
484
|
-
- 0
|
485
444
|
version: "0"
|
486
445
|
requirements: []
|
487
446
|
|
488
447
|
rubyforge_project: nokogiri
|
489
|
-
rubygems_version: 1.
|
448
|
+
rubygems_version: 1.5.1
|
490
449
|
signing_key:
|
491
450
|
specification_version: 3
|
492
451
|
summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
|
493
452
|
test_files:
|
494
|
-
- test/test_reader.rb
|
495
|
-
- test/test_css_cache.rb
|
496
|
-
- test/test_encoding_handler.rb
|
497
|
-
- test/test_memory_leak.rb
|
498
|
-
- test/test_nokogiri.rb
|
499
453
|
- test/test_convert_xpath.rb
|
500
454
|
- test/test_soap4r_sax.rb
|
455
|
+
- test/test_memory_leak.rb
|
456
|
+
- test/test_nokogiri.rb
|
457
|
+
- test/test_css_cache.rb
|
458
|
+
- test/test_reader.rb
|
501
459
|
- test/test_xslt_transforms.rb
|
460
|
+
- test/test_encoding_handler.rb
|
461
|
+
- test/css/test_nthiness.rb
|
462
|
+
- test/css/test_xpath_visitor.rb
|
463
|
+
- test/css/test_parser.rb
|
464
|
+
- test/css/test_tokenizer.rb
|
502
465
|
- test/decorators/test_slop.rb
|
466
|
+
- test/html/test_document.rb
|
467
|
+
- test/html/test_document_encoding.rb
|
468
|
+
- test/html/test_named_characters.rb
|
469
|
+
- test/html/test_document_fragment.rb
|
470
|
+
- test/html/test_node.rb
|
471
|
+
- test/html/test_builder.rb
|
472
|
+
- test/html/test_node_encoding.rb
|
473
|
+
- test/html/test_element_description.rb
|
474
|
+
- test/html/sax/test_parser_context.rb
|
475
|
+
- test/html/sax/test_parser.rb
|
476
|
+
- test/ffi/test_document.rb
|
477
|
+
- test/xml/test_parse_options.rb
|
478
|
+
- test/xml/test_unparented_node.rb
|
479
|
+
- test/xml/test_element_decl.rb
|
480
|
+
- test/xml/test_document.rb
|
481
|
+
- test/xml/test_dtd.rb
|
503
482
|
- test/xml/test_document_encoding.rb
|
504
|
-
- test/xml/
|
483
|
+
- test/xml/test_entity_decl.rb
|
484
|
+
- test/xml/test_dtd_encoding.rb
|
485
|
+
- test/xml/test_document_fragment.rb
|
486
|
+
- test/xml/test_cdata.rb
|
505
487
|
- test/xml/test_text.rb
|
506
|
-
- test/xml/test_node_reparenting.rb
|
507
|
-
- test/xml/test_syntax_error.rb
|
508
|
-
- test/xml/test_unparented_node.rb
|
509
|
-
- test/xml/test_node_encoding.rb
|
510
488
|
- test/xml/test_reader_encoding.rb
|
511
|
-
- test/xml/
|
512
|
-
- test/xml/
|
489
|
+
- test/xml/test_xpath.rb
|
490
|
+
- test/xml/test_element_content.rb
|
513
491
|
- test/xml/test_node.rb
|
514
492
|
- test/xml/test_builder.rb
|
515
|
-
- test/xml/test_namespace.rb
|
516
|
-
- test/xml/test_document.rb
|
517
|
-
- test/xml/test_element_content.rb
|
518
|
-
- test/xml/test_document_fragment.rb
|
519
|
-
- test/xml/test_entity_reference.rb
|
520
|
-
- test/xml/test_attr.rb
|
521
|
-
- test/xml/test_dtd.rb
|
522
|
-
- test/xml/test_element_decl.rb
|
523
|
-
- test/xml/test_node_attributes.rb
|
524
|
-
- test/xml/test_xpath.rb
|
525
|
-
- test/xml/test_node_set.rb
|
526
|
-
- test/xml/test_parse_options.rb
|
527
|
-
- test/xml/test_entity_decl.rb
|
528
|
-
- test/xml/test_attribute_decl.rb
|
529
493
|
- test/xml/test_schema.rb
|
530
|
-
- test/xml/
|
494
|
+
- test/xml/test_node_set.rb
|
495
|
+
- test/xml/test_attr.rb
|
496
|
+
- test/xml/test_processing_instruction.rb
|
497
|
+
- test/xml/test_node_encoding.rb
|
498
|
+
- test/xml/test_syntax_error.rb
|
531
499
|
- test/xml/test_comment.rb
|
532
|
-
- test/xml/
|
533
|
-
- test/xml/
|
534
|
-
- test/xml/
|
500
|
+
- test/xml/test_entity_reference.rb
|
501
|
+
- test/xml/test_node_reparenting.rb
|
502
|
+
- test/xml/test_attribute_decl.rb
|
503
|
+
- test/xml/test_relax_ng.rb
|
504
|
+
- test/xml/test_namespace.rb
|
505
|
+
- test/xml/test_node_attributes.rb
|
535
506
|
- test/xml/node/test_save_options.rb
|
536
507
|
- test/xml/node/test_subclass.rb
|
537
|
-
- test/
|
538
|
-
- test/
|
539
|
-
- test/
|
540
|
-
- test/html/test_builder.rb
|
541
|
-
- test/html/test_document.rb
|
542
|
-
- test/html/test_document_fragment.rb
|
543
|
-
- test/html/test_named_characters.rb
|
544
|
-
- test/html/test_element_description.rb
|
545
|
-
- test/html/sax/test_parser.rb
|
546
|
-
- test/html/sax/test_parser_context.rb
|
547
|
-
- test/ffi/test_document.rb
|
548
|
-
- test/css/test_nthiness.rb
|
549
|
-
- test/css/test_parser.rb
|
550
|
-
- test/css/test_tokenizer.rb
|
551
|
-
- test/css/test_xpath_visitor.rb
|
508
|
+
- test/xml/sax/test_push_parser.rb
|
509
|
+
- test/xml/sax/test_parser_context.rb
|
510
|
+
- test/xml/sax/test_parser.rb
|
552
511
|
- test/xslt/test_custom_functions.rb
|