nokogiri 1.3.3 → 1.4.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.
- data/CHANGELOG.ja.rdoc +48 -3
- data/CHANGELOG.rdoc +42 -0
- data/Manifest.txt +44 -29
- data/README.ja.rdoc +0 -2
- data/README.rdoc +4 -7
- data/Rakefile +42 -6
- data/bin/nokogiri +7 -5
- data/ext/nokogiri/extconf.rb +5 -21
- data/ext/nokogiri/html_document.c +14 -50
- data/ext/nokogiri/html_element_description.c +7 -7
- data/ext/nokogiri/html_entity_lookup.c +6 -4
- data/ext/nokogiri/html_sax_parser_context.c +92 -0
- data/ext/nokogiri/html_sax_parser_context.h +11 -0
- data/ext/nokogiri/nokogiri.c +9 -3
- data/ext/nokogiri/nokogiri.h +16 -20
- data/ext/nokogiri/xml_attr.c +1 -1
- data/ext/nokogiri/xml_attribute_decl.c +67 -0
- data/ext/nokogiri/xml_attribute_decl.h +9 -0
- data/ext/nokogiri/xml_cdata.c +6 -5
- data/ext/nokogiri/xml_comment.c +3 -2
- data/ext/nokogiri/xml_document.c +93 -23
- data/ext/nokogiri/xml_document_fragment.c +1 -3
- data/ext/nokogiri/xml_dtd.c +63 -6
- data/ext/nokogiri/xml_element_content.c +123 -0
- data/ext/nokogiri/xml_element_content.h +10 -0
- data/ext/nokogiri/xml_element_decl.c +69 -0
- data/ext/nokogiri/xml_element_decl.h +9 -0
- data/ext/nokogiri/xml_entity_decl.c +97 -0
- data/ext/nokogiri/xml_entity_decl.h +10 -0
- data/ext/nokogiri/xml_entity_reference.c +1 -1
- data/ext/nokogiri/xml_io.c +10 -3
- data/ext/nokogiri/xml_io.h +1 -0
- data/ext/nokogiri/xml_namespace.c +2 -2
- data/ext/nokogiri/xml_node.c +139 -34
- data/ext/nokogiri/xml_node.h +0 -1
- data/ext/nokogiri/xml_node_set.c +23 -16
- data/ext/nokogiri/xml_processing_instruction.c +1 -1
- data/ext/nokogiri/xml_reader.c +78 -50
- data/ext/nokogiri/xml_sax_parser.c +109 -168
- data/ext/nokogiri/xml_sax_parser.h +33 -0
- data/ext/nokogiri/xml_sax_parser_context.c +155 -0
- data/ext/nokogiri/xml_sax_parser_context.h +10 -0
- data/ext/nokogiri/xml_sax_push_parser.c +11 -6
- data/ext/nokogiri/xml_syntax_error.c +63 -12
- data/ext/nokogiri/xml_text.c +4 -3
- data/ext/nokogiri/xml_xpath.c +1 -1
- data/ext/nokogiri/xml_xpath_context.c +12 -25
- data/ext/nokogiri/xslt_stylesheet.c +3 -3
- data/lib/nokogiri.rb +4 -4
- data/lib/nokogiri/css/generated_tokenizer.rb +1 -0
- data/lib/nokogiri/css/node.rb +1 -9
- data/lib/nokogiri/css/xpath_visitor.rb +11 -21
- data/lib/nokogiri/ffi/html/document.rb +0 -9
- data/lib/nokogiri/ffi/html/sax/parser_context.rb +38 -0
- data/lib/nokogiri/ffi/io_callbacks.rb +4 -2
- data/lib/nokogiri/ffi/libxml.rb +44 -10
- data/lib/nokogiri/ffi/structs/common_node.rb +1 -1
- data/lib/nokogiri/ffi/structs/xml_attribute.rb +27 -0
- data/lib/nokogiri/ffi/structs/xml_dtd.rb +3 -1
- data/lib/nokogiri/ffi/structs/xml_element.rb +26 -0
- data/lib/nokogiri/ffi/structs/xml_element_content.rb +17 -0
- data/lib/nokogiri/ffi/structs/xml_entity.rb +32 -0
- data/lib/nokogiri/ffi/structs/xml_enumeration.rb +12 -0
- data/lib/nokogiri/ffi/structs/xml_parser_context.rb +19 -0
- data/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +4 -3
- data/lib/nokogiri/ffi/structs/xml_syntax_error.rb +1 -1
- data/lib/nokogiri/ffi/xml/attribute_decl.rb +27 -0
- data/lib/nokogiri/ffi/xml/comment.rb +2 -2
- data/lib/nokogiri/ffi/xml/document.rb +29 -12
- data/lib/nokogiri/ffi/xml/document_fragment.rb +0 -5
- data/lib/nokogiri/ffi/xml/dtd.rb +14 -3
- data/lib/nokogiri/ffi/xml/element_content.rb +43 -0
- data/lib/nokogiri/ffi/xml/element_decl.rb +19 -0
- data/lib/nokogiri/ffi/xml/entity_decl.rb +27 -0
- data/lib/nokogiri/ffi/xml/node.rb +45 -5
- data/lib/nokogiri/ffi/xml/node_set.rb +1 -1
- data/lib/nokogiri/ffi/xml/reader.rb +45 -24
- data/lib/nokogiri/ffi/xml/sax/parser.rb +27 -34
- data/lib/nokogiri/ffi/xml/sax/parser_context.rb +67 -0
- data/lib/nokogiri/ffi/xml/sax/push_parser.rb +5 -4
- data/lib/nokogiri/ffi/xml/syntax_error.rb +31 -16
- data/lib/nokogiri/ffi/xml/text.rb +2 -2
- data/lib/nokogiri/html.rb +1 -0
- data/lib/nokogiri/html/document.rb +39 -24
- data/lib/nokogiri/html/sax/parser.rb +2 -2
- data/lib/nokogiri/html/sax/parser_context.rb +16 -0
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml.rb +6 -1
- data/lib/nokogiri/xml/attr.rb +5 -0
- data/lib/nokogiri/xml/attribute_decl.rb +18 -0
- data/lib/nokogiri/xml/builder.rb +121 -13
- data/lib/nokogiri/xml/character_data.rb +7 -0
- data/lib/nokogiri/xml/document.rb +43 -29
- data/lib/nokogiri/xml/document_fragment.rb +26 -6
- data/lib/nokogiri/xml/dtd.rb +5 -5
- data/lib/nokogiri/xml/element_content.rb +36 -0
- data/lib/nokogiri/xml/element_decl.rb +13 -0
- data/lib/nokogiri/xml/entity_decl.rb +15 -0
- data/lib/nokogiri/xml/fragment_handler.rb +22 -11
- data/lib/nokogiri/xml/namespace.rb +6 -0
- data/lib/nokogiri/xml/node.rb +33 -15
- data/lib/nokogiri/xml/node_set.rb +66 -44
- data/lib/nokogiri/xml/pp.rb +2 -0
- data/lib/nokogiri/xml/pp/character_data.rb +18 -0
- data/lib/nokogiri/xml/pp/node.rb +56 -0
- data/lib/nokogiri/xml/reader.rb +8 -0
- data/lib/nokogiri/xml/sax.rb +1 -1
- data/lib/nokogiri/xml/sax/document.rb +18 -1
- data/lib/nokogiri/xml/sax/parser.rb +15 -8
- data/lib/nokogiri/xml/sax/parser_context.rb +16 -0
- data/lib/nokogiri/xml/sax/push_parser.rb +0 -3
- data/lib/nokogiri/xml/syntax_error.rb +4 -0
- data/lib/nokogiri/xslt/stylesheet.rb +1 -1
- data/test/css/test_nthiness.rb +1 -1
- data/test/css/test_parser.rb +1 -1
- data/test/css/test_tokenizer.rb +1 -1
- data/test/css/test_xpath_visitor.rb +1 -1
- data/test/ffi/test_document.rb +1 -1
- data/test/files/shift_jis.html +10 -0
- data/test/files/staff.dtd +10 -0
- data/test/helper.rb +12 -3
- data/test/html/sax/test_parser.rb +1 -1
- data/test/html/sax/test_parser_context.rb +48 -0
- data/test/html/test_builder.rb +8 -2
- data/test/html/test_document.rb +23 -1
- data/test/html/test_document_encoding.rb +15 -1
- data/test/html/test_document_fragment.rb +10 -1
- data/test/html/test_element_description.rb +1 -2
- data/test/html/test_named_characters.rb +1 -1
- data/test/html/test_node.rb +61 -1
- data/test/html/test_node_encoding.rb +27 -0
- data/test/test_convert_xpath.rb +1 -3
- data/test/test_css_cache.rb +1 -1
- data/test/test_gc.rb +1 -1
- data/test/test_memory_leak.rb +1 -1
- data/test/test_nokogiri.rb +3 -3
- data/test/test_reader.rb +29 -1
- data/test/test_xslt_transforms.rb +1 -1
- data/test/xml/node/test_save_options.rb +1 -1
- data/test/xml/node/test_subclass.rb +1 -1
- data/test/xml/sax/test_parser.rb +64 -3
- data/test/xml/sax/test_parser_context.rb +56 -0
- data/test/xml/sax/test_push_parser.rb +11 -1
- data/test/xml/test_attr.rb +1 -1
- data/test/xml/test_attribute_decl.rb +82 -0
- data/test/xml/test_builder.rb +95 -1
- data/test/xml/test_cdata.rb +1 -1
- data/test/xml/test_comment.rb +7 -1
- data/test/xml/test_document.rb +147 -6
- data/test/xml/test_document_encoding.rb +1 -1
- data/test/xml/test_document_fragment.rb +55 -5
- data/test/xml/test_dtd.rb +40 -5
- data/test/xml/test_dtd_encoding.rb +3 -1
- data/test/xml/test_element_content.rb +56 -0
- data/test/xml/test_element_decl.rb +73 -0
- data/test/xml/test_entity_decl.rb +83 -0
- data/test/xml/test_entity_reference.rb +1 -1
- data/test/xml/test_namespace.rb +21 -1
- data/test/xml/test_node.rb +70 -4
- data/test/xml/test_node_attributes.rb +1 -1
- data/test/xml/test_node_encoding.rb +1 -1
- data/test/xml/test_node_set.rb +136 -2
- data/test/xml/test_parse_options.rb +1 -1
- data/test/xml/test_processing_instruction.rb +1 -1
- data/test/xml/test_reader_encoding.rb +1 -1
- data/test/xml/test_relax_ng.rb +1 -1
- data/test/xml/test_schema.rb +1 -1
- data/test/xml/test_syntax_error.rb +27 -0
- data/test/xml/test_text.rb +13 -1
- data/test/xml/test_unparented_node.rb +1 -1
- data/test/xml/test_xpath.rb +1 -1
- metadata +57 -40
- data/ext/nokogiri/html_sax_parser.c +0 -57
- data/ext/nokogiri/html_sax_parser.h +0 -11
- data/lib/action-nokogiri.rb +0 -38
- data/lib/nokogiri/decorators.rb +0 -2
- data/lib/nokogiri/decorators/hpricot.rb +0 -3
- data/lib/nokogiri/decorators/hpricot/node.rb +0 -56
- data/lib/nokogiri/decorators/hpricot/node_set.rb +0 -54
- data/lib/nokogiri/decorators/hpricot/xpath_visitor.rb +0 -30
- data/lib/nokogiri/ffi/html/sax/parser.rb +0 -21
- data/lib/nokogiri/hpricot.rb +0 -92
- data/lib/nokogiri/xml/entity_declaration.rb +0 -11
- data/lib/nokogiri/xml/sax/legacy_handlers.rb +0 -65
- data/test/hpricot/files/basic.xhtml +0 -17
- data/test/hpricot/files/boingboing.html +0 -2266
- data/test/hpricot/files/cy0.html +0 -3653
- data/test/hpricot/files/immob.html +0 -400
- data/test/hpricot/files/pace_application.html +0 -1320
- data/test/hpricot/files/tenderlove.html +0 -16
- data/test/hpricot/files/uswebgen.html +0 -220
- data/test/hpricot/files/utf8.html +0 -1054
- data/test/hpricot/files/week9.html +0 -1723
- data/test/hpricot/files/why.xml +0 -19
- data/test/hpricot/load_files.rb +0 -11
- data/test/hpricot/test_alter.rb +0 -68
- data/test/hpricot/test_builder.rb +0 -20
- data/test/hpricot/test_parser.rb +0 -350
- data/test/hpricot/test_paths.rb +0 -15
- data/test/hpricot/test_preserved.rb +0 -77
- data/test/hpricot/test_xml.rb +0 -30
data/test/xml/test_node_set.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "helper"
|
2
2
|
|
3
3
|
module Nokogiri
|
4
4
|
module XML
|
@@ -6,6 +6,79 @@ module Nokogiri
|
|
6
6
|
def setup
|
7
7
|
super
|
8
8
|
@xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE)
|
9
|
+
@list = @xml.css('employee')
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_remove_attr
|
13
|
+
@list.each { |x| x['class'] = 'blah' }
|
14
|
+
assert_equal @list, @list.remove_attr('class')
|
15
|
+
@list.each { |x| assert_nil x['class'] }
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_add_class
|
19
|
+
assert_equal @list, @list.add_class('bar')
|
20
|
+
@list.each { |x| assert_equal 'bar', x['class'] }
|
21
|
+
|
22
|
+
@list.add_class('bar')
|
23
|
+
@list.each { |x| assert_equal 'bar', x['class'] }
|
24
|
+
|
25
|
+
@list.add_class('baz')
|
26
|
+
@list.each { |x| assert_equal 'bar baz', x['class'] }
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_remove_class_with_no_class
|
30
|
+
assert_equal @list, @list.remove_class('bar')
|
31
|
+
@list.each { |e| assert_nil e['class'] }
|
32
|
+
|
33
|
+
@list.each { |e| e['class'] = '' }
|
34
|
+
assert_equal @list, @list.remove_class('bar')
|
35
|
+
@list.each { |e| assert_nil e['class'] }
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_remove_class_single
|
39
|
+
@list.each { |e| e['class'] = 'foo bar' }
|
40
|
+
|
41
|
+
assert_equal @list, @list.remove_class('bar')
|
42
|
+
@list.each { |e| assert_equal 'foo', e['class'] }
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_remove_class_completely
|
46
|
+
@list.each { |e| e['class'] = 'foo' }
|
47
|
+
|
48
|
+
assert_equal @list, @list.remove_class
|
49
|
+
@list.each { |e| assert_nil e['class'] }
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_attribute_set
|
53
|
+
@list.each { |e| assert_nil e['foo'] }
|
54
|
+
|
55
|
+
[ ['attribute', 'bar'], ['attr', 'biz'], ['set', 'baz'] ].each do |t|
|
56
|
+
@list.send(t.first.to_sym, 'foo', t.last)
|
57
|
+
@list.each { |e| assert_equal t.last, e['foo'] }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_attribute_set_with_block
|
62
|
+
@list.each { |e| assert_nil e['foo'] }
|
63
|
+
|
64
|
+
[ ['attribute', 'bar'], ['attr', 'biz'], ['set', 'baz'] ].each do |t|
|
65
|
+
@list.send(t.first.to_sym, 'foo') { |x| t.last }
|
66
|
+
@list.each { |e| assert_equal t.last, e['foo'] }
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_attribute_set_with_hash
|
71
|
+
@list.each { |e| assert_nil e['foo'] }
|
72
|
+
|
73
|
+
[ ['attribute', 'bar'], ['attr', 'biz'], ['set', 'baz'] ].each do |t|
|
74
|
+
@list.send(t.first.to_sym, 'foo' => t.last)
|
75
|
+
@list.each { |e| assert_equal t.last, e['foo'] }
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_attribute_no_args
|
80
|
+
@list.first['foo'] = 'bar'
|
81
|
+
assert_equal @list.first.attribute('foo'), @list.attribute('foo')
|
9
82
|
end
|
10
83
|
|
11
84
|
def test_search_empty_node_set
|
@@ -15,6 +88,39 @@ module Nokogiri
|
|
15
88
|
assert_equal 0, set.search('foo').length
|
16
89
|
end
|
17
90
|
|
91
|
+
def test_xpath_with_custom_object
|
92
|
+
set = @xml.xpath('//staff')
|
93
|
+
custom_employees = set.xpath('//*[awesome(.)]', Class.new {
|
94
|
+
def awesome ns
|
95
|
+
ns.select { |n| n.name == 'employee' }
|
96
|
+
end
|
97
|
+
}.new)
|
98
|
+
|
99
|
+
assert_equal @xml.xpath('//employee'), custom_employees
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_css_with_custom_object
|
103
|
+
set = @xml.xpath('//staff')
|
104
|
+
custom_employees = set.css('*:awesome', Class.new {
|
105
|
+
def awesome ns
|
106
|
+
ns.select { |n| n.name == 'employee' }
|
107
|
+
end
|
108
|
+
}.new)
|
109
|
+
|
110
|
+
assert_equal @xml.xpath('//employee'), custom_employees
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_search_with_custom_object
|
114
|
+
set = @xml.xpath('//staff')
|
115
|
+
custom_employees = set.search('//*[awesome(.)]', Class.new {
|
116
|
+
def awesome ns
|
117
|
+
ns.select { |n| n.name == 'employee' }
|
118
|
+
end
|
119
|
+
}.new)
|
120
|
+
|
121
|
+
assert_equal @xml.xpath('//employee'), custom_employees
|
122
|
+
end
|
123
|
+
|
18
124
|
def test_css_searches_match_self
|
19
125
|
html = Nokogiri::HTML("<html><body><div class='a'></div></body></html>")
|
20
126
|
set = html.xpath("/html/body/div")
|
@@ -148,7 +254,7 @@ module Nokogiri
|
|
148
254
|
assert node_set = @xml.search('//employee')
|
149
255
|
assert_equal node_set.first, node_set.at(0)
|
150
256
|
end
|
151
|
-
|
257
|
+
|
152
258
|
def test_percent
|
153
259
|
assert node_set = @xml.search('//employee')
|
154
260
|
assert_equal node_set.first, node_set % 0
|
@@ -284,6 +390,14 @@ module Nokogiri
|
|
284
390
|
assert_equal 'employee', @xml.search("//wrapper").first.children[0].name
|
285
391
|
end
|
286
392
|
|
393
|
+
def test_wrap_preserves_document_structure
|
394
|
+
assert_equal "employeeId",
|
395
|
+
@xml.at_xpath("//employee").children.detect{|j| ! j.text? }.name
|
396
|
+
@xml.xpath("//employeeId[text()='EMP0001']").wrap("<wrapper/>")
|
397
|
+
assert_equal "wrapper",
|
398
|
+
@xml.at_xpath("//employee").children.detect{|j| ! j.text? }.name
|
399
|
+
end
|
400
|
+
|
287
401
|
def test_plus_operator
|
288
402
|
names = @xml.search("name")
|
289
403
|
positions = @xml.search("position")
|
@@ -302,6 +416,12 @@ module Nokogiri
|
|
302
416
|
assert_equal result.length, names.length
|
303
417
|
end
|
304
418
|
|
419
|
+
def test_union
|
420
|
+
names = @xml.search("name")
|
421
|
+
|
422
|
+
assert_equal(names.length, (names | @xml.search("name")).length)
|
423
|
+
end
|
424
|
+
|
305
425
|
def test_minus_operator
|
306
426
|
employees = @xml.search("//employee")
|
307
427
|
females = @xml.search("//employee[gender[text()='Female']]")
|
@@ -328,6 +448,12 @@ module Nokogiri
|
|
328
448
|
assert_nil employees.index(other)
|
329
449
|
end
|
330
450
|
|
451
|
+
def test_slice_too_far
|
452
|
+
employees = @xml.search("//employee")
|
453
|
+
assert_equal employees.length, employees[0, employees.length + 1].length
|
454
|
+
assert_equal employees.length, employees[0, employees.length].length
|
455
|
+
end
|
456
|
+
|
331
457
|
def test_array_slice_with_start_and_end
|
332
458
|
employees = @xml.search("//employee")
|
333
459
|
assert_equal [employees[1], employees[2], employees[3]], employees[1,3].to_a
|
@@ -392,6 +518,14 @@ module Nokogiri
|
|
392
518
|
assert_equal count, set.length
|
393
519
|
end
|
394
520
|
|
521
|
+
def test_inspect
|
522
|
+
employees = @xml.search("//employee")
|
523
|
+
inspected = employees.inspect
|
524
|
+
|
525
|
+
assert_equal "[#{employees.map { |x| x.inspect }.join(', ')}]",
|
526
|
+
inspected
|
527
|
+
end
|
528
|
+
|
395
529
|
end
|
396
530
|
end
|
397
531
|
end
|
data/test/xml/test_relax_ng.rb
CHANGED
data/test/xml/test_schema.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class TestSyntaxError < Nokogiri::TestCase
|
6
|
+
def test_new
|
7
|
+
error = Nokogiri::XML::SyntaxError.new 'hello'
|
8
|
+
assert_equal 'hello', error.message
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_exception
|
12
|
+
error = Nokogiri::XML::SyntaxError.new 'hello'
|
13
|
+
dup = error.exception 'world'
|
14
|
+
assert_equal 'hello', dup.message
|
15
|
+
assert_not_equal error.message.object_id, dup.message.object_id
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_initialize_copy
|
19
|
+
error = Nokogiri::XML::SyntaxError.new 'hello'
|
20
|
+
dup = error.dup
|
21
|
+
assert_equal 'hello', dup.message
|
22
|
+
assert_not_equal error.object_id, dup.object_id
|
23
|
+
assert_not_equal error.message.object_id, dup.message.object_id
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/test/xml/test_text.rb
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
require
|
1
|
+
require "helper"
|
2
2
|
|
3
3
|
module Nokogiri
|
4
4
|
module XML
|
5
5
|
class TestText < Nokogiri::TestCase
|
6
|
+
def test_inspect
|
7
|
+
node = Text.new('hello world', Document.new)
|
8
|
+
assert_equal "#<#{node.class.name}:#{sprintf("0x%x",node.object_id)} #{node.text.inspect}>", node.inspect
|
9
|
+
end
|
10
|
+
|
6
11
|
def test_new
|
7
12
|
node = Text.new('hello world', Document.new)
|
8
13
|
assert node
|
@@ -13,6 +18,13 @@ module Nokogiri
|
|
13
18
|
def test_lots_of_text
|
14
19
|
100.times { Text.new('hello world', Document.new) }
|
15
20
|
end
|
21
|
+
|
22
|
+
# No assertion because this was a segv
|
23
|
+
def test_new_without_document
|
24
|
+
doc = Document.new
|
25
|
+
node = Nokogiri::XML::Element.new('foo', doc)
|
26
|
+
text = Text.new('hello world', node)
|
27
|
+
end
|
16
28
|
end
|
17
29
|
end
|
18
30
|
end
|
data/test/xml/test_xpath.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-10-30 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.3.
|
54
|
+
version: 2.3.3
|
55
55
|
version:
|
56
56
|
description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
|
57
57
|
many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
|
@@ -86,12 +86,14 @@ files:
|
|
86
86
|
- ext/nokogiri/html_element_description.h
|
87
87
|
- ext/nokogiri/html_entity_lookup.c
|
88
88
|
- ext/nokogiri/html_entity_lookup.h
|
89
|
-
- ext/nokogiri/
|
90
|
-
- ext/nokogiri/
|
89
|
+
- ext/nokogiri/html_sax_parser_context.c
|
90
|
+
- ext/nokogiri/html_sax_parser_context.h
|
91
91
|
- ext/nokogiri/nokogiri.c
|
92
92
|
- ext/nokogiri/nokogiri.h
|
93
93
|
- ext/nokogiri/xml_attr.c
|
94
94
|
- ext/nokogiri/xml_attr.h
|
95
|
+
- ext/nokogiri/xml_attribute_decl.c
|
96
|
+
- ext/nokogiri/xml_attribute_decl.h
|
95
97
|
- ext/nokogiri/xml_cdata.c
|
96
98
|
- ext/nokogiri/xml_cdata.h
|
97
99
|
- ext/nokogiri/xml_comment.c
|
@@ -102,6 +104,12 @@ files:
|
|
102
104
|
- ext/nokogiri/xml_document_fragment.h
|
103
105
|
- ext/nokogiri/xml_dtd.c
|
104
106
|
- ext/nokogiri/xml_dtd.h
|
107
|
+
- ext/nokogiri/xml_element_content.c
|
108
|
+
- ext/nokogiri/xml_element_content.h
|
109
|
+
- ext/nokogiri/xml_element_decl.c
|
110
|
+
- ext/nokogiri/xml_element_decl.h
|
111
|
+
- ext/nokogiri/xml_entity_decl.c
|
112
|
+
- ext/nokogiri/xml_entity_decl.h
|
105
113
|
- ext/nokogiri/xml_entity_reference.c
|
106
114
|
- ext/nokogiri/xml_entity_reference.h
|
107
115
|
- ext/nokogiri/xml_io.c
|
@@ -120,6 +128,8 @@ files:
|
|
120
128
|
- ext/nokogiri/xml_relax_ng.h
|
121
129
|
- ext/nokogiri/xml_sax_parser.c
|
122
130
|
- ext/nokogiri/xml_sax_parser.h
|
131
|
+
- ext/nokogiri/xml_sax_parser_context.c
|
132
|
+
- ext/nokogiri/xml_sax_parser_context.h
|
123
133
|
- ext/nokogiri/xml_sax_push_parser.c
|
124
134
|
- ext/nokogiri/xml_sax_push_parser.h
|
125
135
|
- ext/nokogiri/xml_schema.c
|
@@ -134,7 +144,6 @@ files:
|
|
134
144
|
- ext/nokogiri/xml_xpath_context.h
|
135
145
|
- ext/nokogiri/xslt_stylesheet.c
|
136
146
|
- ext/nokogiri/xslt_stylesheet.h
|
137
|
-
- lib/action-nokogiri.rb
|
138
147
|
- lib/nokogiri.rb
|
139
148
|
- lib/nokogiri/css.rb
|
140
149
|
- lib/nokogiri/css/generated_parser.rb
|
@@ -146,16 +155,11 @@ files:
|
|
146
155
|
- lib/nokogiri/css/tokenizer.rb
|
147
156
|
- lib/nokogiri/css/tokenizer.rex
|
148
157
|
- lib/nokogiri/css/xpath_visitor.rb
|
149
|
-
- lib/nokogiri/decorators.rb
|
150
|
-
- lib/nokogiri/decorators/hpricot.rb
|
151
|
-
- lib/nokogiri/decorators/hpricot/node.rb
|
152
|
-
- lib/nokogiri/decorators/hpricot/node_set.rb
|
153
|
-
- lib/nokogiri/decorators/hpricot/xpath_visitor.rb
|
154
158
|
- lib/nokogiri/decorators/slop.rb
|
155
159
|
- lib/nokogiri/ffi/html/document.rb
|
156
160
|
- lib/nokogiri/ffi/html/element_description.rb
|
157
161
|
- lib/nokogiri/ffi/html/entity_lookup.rb
|
158
|
-
- lib/nokogiri/ffi/html/sax/
|
162
|
+
- lib/nokogiri/ffi/html/sax/parser_context.rb
|
159
163
|
- lib/nokogiri/ffi/io_callbacks.rb
|
160
164
|
- lib/nokogiri/ffi/libxml.rb
|
161
165
|
- lib/nokogiri/ffi/structs/common_node.rb
|
@@ -163,13 +167,19 @@ files:
|
|
163
167
|
- lib/nokogiri/ffi/structs/html_entity_desc.rb
|
164
168
|
- lib/nokogiri/ffi/structs/xml_alloc.rb
|
165
169
|
- lib/nokogiri/ffi/structs/xml_attr.rb
|
170
|
+
- lib/nokogiri/ffi/structs/xml_attribute.rb
|
166
171
|
- lib/nokogiri/ffi/structs/xml_buffer.rb
|
167
172
|
- lib/nokogiri/ffi/structs/xml_document.rb
|
168
173
|
- lib/nokogiri/ffi/structs/xml_dtd.rb
|
174
|
+
- lib/nokogiri/ffi/structs/xml_element.rb
|
175
|
+
- lib/nokogiri/ffi/structs/xml_element_content.rb
|
176
|
+
- lib/nokogiri/ffi/structs/xml_entity.rb
|
177
|
+
- lib/nokogiri/ffi/structs/xml_enumeration.rb
|
169
178
|
- lib/nokogiri/ffi/structs/xml_node.rb
|
170
179
|
- lib/nokogiri/ffi/structs/xml_node_set.rb
|
171
180
|
- lib/nokogiri/ffi/structs/xml_notation.rb
|
172
181
|
- lib/nokogiri/ffi/structs/xml_ns.rb
|
182
|
+
- lib/nokogiri/ffi/structs/xml_parser_context.rb
|
173
183
|
- lib/nokogiri/ffi/structs/xml_relax_ng.rb
|
174
184
|
- lib/nokogiri/ffi/structs/xml_sax_handler.rb
|
175
185
|
- lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb
|
@@ -181,11 +191,15 @@ files:
|
|
181
191
|
- lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb
|
182
192
|
- lib/nokogiri/ffi/structs/xslt_stylesheet.rb
|
183
193
|
- lib/nokogiri/ffi/xml/attr.rb
|
194
|
+
- lib/nokogiri/ffi/xml/attribute_decl.rb
|
184
195
|
- lib/nokogiri/ffi/xml/cdata.rb
|
185
196
|
- lib/nokogiri/ffi/xml/comment.rb
|
186
197
|
- lib/nokogiri/ffi/xml/document.rb
|
187
198
|
- lib/nokogiri/ffi/xml/document_fragment.rb
|
188
199
|
- lib/nokogiri/ffi/xml/dtd.rb
|
200
|
+
- lib/nokogiri/ffi/xml/element_content.rb
|
201
|
+
- lib/nokogiri/ffi/xml/element_decl.rb
|
202
|
+
- lib/nokogiri/ffi/xml/entity_decl.rb
|
189
203
|
- lib/nokogiri/ffi/xml/entity_reference.rb
|
190
204
|
- lib/nokogiri/ffi/xml/namespace.rb
|
191
205
|
- lib/nokogiri/ffi/xml/node.rb
|
@@ -194,6 +208,7 @@ files:
|
|
194
208
|
- lib/nokogiri/ffi/xml/reader.rb
|
195
209
|
- lib/nokogiri/ffi/xml/relax_ng.rb
|
196
210
|
- lib/nokogiri/ffi/xml/sax/parser.rb
|
211
|
+
- lib/nokogiri/ffi/xml/sax/parser_context.rb
|
197
212
|
- lib/nokogiri/ffi/xml/sax/push_parser.rb
|
198
213
|
- lib/nokogiri/ffi/xml/schema.rb
|
199
214
|
- lib/nokogiri/ffi/xml/syntax_error.rb
|
@@ -201,7 +216,6 @@ files:
|
|
201
216
|
- lib/nokogiri/ffi/xml/xpath.rb
|
202
217
|
- lib/nokogiri/ffi/xml/xpath_context.rb
|
203
218
|
- lib/nokogiri/ffi/xslt/stylesheet.rb
|
204
|
-
- lib/nokogiri/hpricot.rb
|
205
219
|
- lib/nokogiri/html.rb
|
206
220
|
- lib/nokogiri/html/builder.rb
|
207
221
|
- lib/nokogiri/html/document.rb
|
@@ -209,17 +223,22 @@ files:
|
|
209
223
|
- lib/nokogiri/html/element_description.rb
|
210
224
|
- lib/nokogiri/html/entity_lookup.rb
|
211
225
|
- lib/nokogiri/html/sax/parser.rb
|
226
|
+
- lib/nokogiri/html/sax/parser_context.rb
|
212
227
|
- lib/nokogiri/syntax_error.rb
|
213
228
|
- lib/nokogiri/version.rb
|
214
229
|
- lib/nokogiri/version_warning.rb
|
215
230
|
- lib/nokogiri/xml.rb
|
216
231
|
- lib/nokogiri/xml/attr.rb
|
232
|
+
- lib/nokogiri/xml/attribute_decl.rb
|
217
233
|
- lib/nokogiri/xml/builder.rb
|
218
234
|
- lib/nokogiri/xml/cdata.rb
|
235
|
+
- lib/nokogiri/xml/character_data.rb
|
219
236
|
- lib/nokogiri/xml/document.rb
|
220
237
|
- lib/nokogiri/xml/document_fragment.rb
|
221
238
|
- lib/nokogiri/xml/dtd.rb
|
222
|
-
- lib/nokogiri/xml/
|
239
|
+
- lib/nokogiri/xml/element_content.rb
|
240
|
+
- lib/nokogiri/xml/element_decl.rb
|
241
|
+
- lib/nokogiri/xml/entity_decl.rb
|
223
242
|
- lib/nokogiri/xml/fragment_handler.rb
|
224
243
|
- lib/nokogiri/xml/namespace.rb
|
225
244
|
- lib/nokogiri/xml/node.rb
|
@@ -227,13 +246,16 @@ files:
|
|
227
246
|
- lib/nokogiri/xml/node_set.rb
|
228
247
|
- lib/nokogiri/xml/notation.rb
|
229
248
|
- lib/nokogiri/xml/parse_options.rb
|
249
|
+
- lib/nokogiri/xml/pp.rb
|
250
|
+
- lib/nokogiri/xml/pp/character_data.rb
|
251
|
+
- lib/nokogiri/xml/pp/node.rb
|
230
252
|
- lib/nokogiri/xml/processing_instruction.rb
|
231
253
|
- lib/nokogiri/xml/reader.rb
|
232
254
|
- lib/nokogiri/xml/relax_ng.rb
|
233
255
|
- lib/nokogiri/xml/sax.rb
|
234
256
|
- lib/nokogiri/xml/sax/document.rb
|
235
|
-
- lib/nokogiri/xml/sax/legacy_handlers.rb
|
236
257
|
- lib/nokogiri/xml/sax/parser.rb
|
258
|
+
- lib/nokogiri/xml/sax/parser_context.rb
|
237
259
|
- lib/nokogiri/xml/sax/push_parser.rb
|
238
260
|
- lib/nokogiri/xml/schema.rb
|
239
261
|
- lib/nokogiri/xml/syntax_error.rb
|
@@ -259,31 +281,17 @@ files:
|
|
259
281
|
- test/files/foo/foo.xsd
|
260
282
|
- test/files/po.xml
|
261
283
|
- test/files/po.xsd
|
284
|
+
- test/files/shift_jis.html
|
262
285
|
- test/files/shift_jis.xml
|
263
286
|
- test/files/snuggles.xml
|
287
|
+
- test/files/staff.dtd
|
264
288
|
- test/files/staff.xml
|
265
289
|
- test/files/staff.xslt
|
266
290
|
- test/files/tlm.html
|
267
291
|
- test/files/valid_bar.xml
|
268
292
|
- test/helper.rb
|
269
|
-
- test/hpricot/files/basic.xhtml
|
270
|
-
- test/hpricot/files/boingboing.html
|
271
|
-
- test/hpricot/files/cy0.html
|
272
|
-
- test/hpricot/files/immob.html
|
273
|
-
- test/hpricot/files/pace_application.html
|
274
|
-
- test/hpricot/files/tenderlove.html
|
275
|
-
- test/hpricot/files/uswebgen.html
|
276
|
-
- test/hpricot/files/utf8.html
|
277
|
-
- test/hpricot/files/week9.html
|
278
|
-
- test/hpricot/files/why.xml
|
279
|
-
- test/hpricot/load_files.rb
|
280
|
-
- test/hpricot/test_alter.rb
|
281
|
-
- test/hpricot/test_builder.rb
|
282
|
-
- test/hpricot/test_parser.rb
|
283
|
-
- test/hpricot/test_paths.rb
|
284
|
-
- test/hpricot/test_preserved.rb
|
285
|
-
- test/hpricot/test_xml.rb
|
286
293
|
- test/html/sax/test_parser.rb
|
294
|
+
- test/html/sax/test_parser_context.rb
|
287
295
|
- test/html/test_builder.rb
|
288
296
|
- test/html/test_document.rb
|
289
297
|
- test/html/test_document_encoding.rb
|
@@ -291,6 +299,7 @@ files:
|
|
291
299
|
- test/html/test_element_description.rb
|
292
300
|
- test/html/test_named_characters.rb
|
293
301
|
- test/html/test_node.rb
|
302
|
+
- test/html/test_node_encoding.rb
|
294
303
|
- test/test_convert_xpath.rb
|
295
304
|
- test/test_css_cache.rb
|
296
305
|
- test/test_gc.rb
|
@@ -301,8 +310,10 @@ files:
|
|
301
310
|
- test/xml/node/test_save_options.rb
|
302
311
|
- test/xml/node/test_subclass.rb
|
303
312
|
- test/xml/sax/test_parser.rb
|
313
|
+
- test/xml/sax/test_parser_context.rb
|
304
314
|
- test/xml/sax/test_push_parser.rb
|
305
315
|
- test/xml/test_attr.rb
|
316
|
+
- test/xml/test_attribute_decl.rb
|
306
317
|
- test/xml/test_builder.rb
|
307
318
|
- test/xml/test_cdata.rb
|
308
319
|
- test/xml/test_comment.rb
|
@@ -311,6 +322,9 @@ files:
|
|
311
322
|
- test/xml/test_document_fragment.rb
|
312
323
|
- test/xml/test_dtd.rb
|
313
324
|
- test/xml/test_dtd_encoding.rb
|
325
|
+
- test/xml/test_element_content.rb
|
326
|
+
- test/xml/test_element_decl.rb
|
327
|
+
- test/xml/test_entity_decl.rb
|
314
328
|
- test/xml/test_entity_reference.rb
|
315
329
|
- test/xml/test_namespace.rb
|
316
330
|
- test/xml/test_node.rb
|
@@ -322,11 +336,12 @@ files:
|
|
322
336
|
- test/xml/test_reader_encoding.rb
|
323
337
|
- test/xml/test_relax_ng.rb
|
324
338
|
- test/xml/test_schema.rb
|
339
|
+
- test/xml/test_syntax_error.rb
|
325
340
|
- test/xml/test_text.rb
|
326
341
|
- test/xml/test_unparented_node.rb
|
327
342
|
- test/xml/test_xpath.rb
|
328
343
|
has_rdoc: true
|
329
|
-
homepage: http://nokogiri.org
|
344
|
+
homepage: http://nokogiri.org
|
330
345
|
licenses: []
|
331
346
|
|
332
347
|
post_install_message:
|
@@ -351,7 +366,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
366
|
requirements: []
|
352
367
|
|
353
368
|
rubyforge_project: nokogiri
|
354
|
-
rubygems_version: 1.3.
|
369
|
+
rubygems_version: 1.3.5
|
355
370
|
signing_key:
|
356
371
|
specification_version: 3
|
357
372
|
summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
|
@@ -361,13 +376,8 @@ test_files:
|
|
361
376
|
- test/css/test_tokenizer.rb
|
362
377
|
- test/css/test_xpath_visitor.rb
|
363
378
|
- test/ffi/test_document.rb
|
364
|
-
- test/hpricot/test_alter.rb
|
365
|
-
- test/hpricot/test_builder.rb
|
366
|
-
- test/hpricot/test_parser.rb
|
367
|
-
- test/hpricot/test_paths.rb
|
368
|
-
- test/hpricot/test_preserved.rb
|
369
|
-
- test/hpricot/test_xml.rb
|
370
379
|
- test/html/sax/test_parser.rb
|
380
|
+
- test/html/sax/test_parser_context.rb
|
371
381
|
- test/html/test_builder.rb
|
372
382
|
- test/html/test_document.rb
|
373
383
|
- test/html/test_document_encoding.rb
|
@@ -375,6 +385,7 @@ test_files:
|
|
375
385
|
- test/html/test_element_description.rb
|
376
386
|
- test/html/test_named_characters.rb
|
377
387
|
- test/html/test_node.rb
|
388
|
+
- test/html/test_node_encoding.rb
|
378
389
|
- test/test_convert_xpath.rb
|
379
390
|
- test/test_css_cache.rb
|
380
391
|
- test/test_gc.rb
|
@@ -385,8 +396,10 @@ test_files:
|
|
385
396
|
- test/xml/node/test_save_options.rb
|
386
397
|
- test/xml/node/test_subclass.rb
|
387
398
|
- test/xml/sax/test_parser.rb
|
399
|
+
- test/xml/sax/test_parser_context.rb
|
388
400
|
- test/xml/sax/test_push_parser.rb
|
389
401
|
- test/xml/test_attr.rb
|
402
|
+
- test/xml/test_attribute_decl.rb
|
390
403
|
- test/xml/test_builder.rb
|
391
404
|
- test/xml/test_cdata.rb
|
392
405
|
- test/xml/test_comment.rb
|
@@ -395,6 +408,9 @@ test_files:
|
|
395
408
|
- test/xml/test_document_fragment.rb
|
396
409
|
- test/xml/test_dtd.rb
|
397
410
|
- test/xml/test_dtd_encoding.rb
|
411
|
+
- test/xml/test_element_content.rb
|
412
|
+
- test/xml/test_element_decl.rb
|
413
|
+
- test/xml/test_entity_decl.rb
|
398
414
|
- test/xml/test_entity_reference.rb
|
399
415
|
- test/xml/test_namespace.rb
|
400
416
|
- test/xml/test_node.rb
|
@@ -406,6 +422,7 @@ test_files:
|
|
406
422
|
- test/xml/test_reader_encoding.rb
|
407
423
|
- test/xml/test_relax_ng.rb
|
408
424
|
- test/xml/test_schema.rb
|
425
|
+
- test/xml/test_syntax_error.rb
|
409
426
|
- test/xml/test_text.rb
|
410
427
|
- test/xml/test_unparented_node.rb
|
411
428
|
- test/xml/test_xpath.rb
|