nokogiri 1.1.1 → 1.2.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/History.ja.txt +34 -0
- data/History.txt +36 -0
- data/Manifest.txt +21 -0
- data/README.ja.txt +1 -1
- data/README.txt +1 -1
- data/Rakefile +27 -89
- data/ext/nokogiri/extconf.rb +48 -63
- data/ext/nokogiri/html_document.c +90 -29
- data/ext/nokogiri/html_sax_parser.c +23 -2
- data/ext/nokogiri/native.c +18 -8
- data/ext/nokogiri/native.h +22 -0
- data/ext/nokogiri/xml_attr.c +83 -0
- data/ext/nokogiri/xml_attr.h +9 -0
- data/ext/nokogiri/xml_cdata.c +1 -1
- data/ext/nokogiri/xml_document.c +84 -18
- data/ext/nokogiri/xml_document_fragment.c +38 -0
- data/ext/nokogiri/xml_document_fragment.h +10 -0
- data/ext/nokogiri/xml_dtd.c +2 -22
- data/ext/nokogiri/xml_entity_reference.c +41 -0
- data/ext/nokogiri/xml_entity_reference.h +9 -0
- data/ext/nokogiri/xml_io.c +10 -3
- data/ext/nokogiri/xml_io.h +1 -0
- data/ext/nokogiri/xml_node.c +116 -66
- data/ext/nokogiri/xml_node_set.c +5 -1
- data/ext/nokogiri/xml_processing_instruction.c +44 -0
- data/ext/nokogiri/xml_processing_instruction.h +9 -0
- data/ext/nokogiri/xml_reader.c +20 -4
- data/ext/nokogiri/xml_sax_parser.c +51 -15
- data/ext/nokogiri/xml_sax_push_parser.c +85 -0
- data/ext/nokogiri/xml_sax_push_parser.h +9 -0
- data/ext/nokogiri/xml_syntax_error.c +12 -8
- data/ext/nokogiri/xml_syntax_error.h +2 -1
- data/ext/nokogiri/xml_xpath_context.c +11 -2
- data/ext/nokogiri/xslt_stylesheet.c +1 -6
- data/lib/nokogiri.rb +10 -13
- data/lib/nokogiri/css.rb +1 -1
- data/lib/nokogiri/css/generated_parser.rb +287 -295
- data/lib/nokogiri/css/generated_tokenizer.rb +36 -51
- data/lib/nokogiri/css/node.rb +1 -3
- data/lib/nokogiri/css/parser.rb +21 -12
- data/lib/nokogiri/css/parser.y +55 -44
- data/lib/nokogiri/css/syntax_error.rb +2 -1
- data/lib/nokogiri/css/tokenizer.rex +23 -32
- data/lib/nokogiri/decorators/hpricot/node_set.rb +1 -1
- data/lib/nokogiri/html.rb +10 -4
- data/lib/nokogiri/html/document.rb +6 -2
- data/lib/nokogiri/syntax_error.rb +4 -0
- data/lib/nokogiri/version.rb +2 -1
- data/lib/nokogiri/xml.rb +3 -1
- data/lib/nokogiri/xml/attr.rb +3 -4
- data/lib/nokogiri/xml/cdata.rb +1 -1
- data/lib/nokogiri/xml/document.rb +4 -7
- data/lib/nokogiri/xml/document_fragment.rb +9 -0
- data/lib/nokogiri/xml/dtd.rb +3 -0
- data/lib/nokogiri/xml/node.rb +144 -40
- data/lib/nokogiri/xml/node/save_options.rb +32 -0
- data/lib/nokogiri/xml/node_set.rb +11 -20
- data/lib/nokogiri/xml/processing_instruction.rb +6 -0
- data/lib/nokogiri/xml/reader.rb +5 -0
- data/lib/nokogiri/xml/sax.rb +1 -0
- data/lib/nokogiri/xml/sax/push_parser.rb +47 -0
- data/lib/nokogiri/xml/syntax_error.rb +3 -1
- data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -1
- data/tasks/test.rb +136 -0
- data/test/css/test_parser.rb +4 -0
- data/test/css/test_tokenizer.rb +30 -17
- data/test/css/test_xpath_visitor.rb +11 -0
- data/test/helper.rb +11 -0
- data/test/hpricot/test_builder.rb +2 -9
- data/test/hpricot/test_parser.rb +4 -4
- data/test/html/test_builder.rb +7 -7
- data/test/html/test_document.rb +90 -4
- data/test/html/test_node.rb +1 -0
- data/test/test_css_cache.rb +1 -3
- data/test/test_reader.rb +19 -1
- data/test/test_xslt_transforms.rb +1 -1
- data/test/xml/node/test_save_options.rb +20 -0
- data/test/xml/sax/test_parser.rb +17 -0
- data/test/xml/sax/test_push_parser.rb +67 -0
- data/test/xml/test_attr.rb +16 -0
- data/test/xml/test_cdata.rb +1 -1
- data/test/xml/test_document.rb +45 -0
- data/test/xml/test_document_fragment.rb +18 -0
- data/test/xml/test_dtd.rb +2 -4
- data/test/xml/test_entity_reference.rb +16 -0
- data/test/xml/test_node.rb +149 -80
- data/test/xml/test_processing_instruction.rb +24 -0
- metadata +28 -2
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', "helper"))
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class TestProcessingInstruction < Nokogiri::TestCase
|
6
|
+
def setup
|
7
|
+
@xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE)
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_type
|
11
|
+
assert_equal(Node::PI_NODE, @xml.children[0].type)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_name
|
15
|
+
assert_equal 'TEST-STYLE', @xml.children[0].name
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_new
|
19
|
+
assert ref = ProcessingInstruction.new(@xml, 'name', 'content')
|
20
|
+
assert_instance_of ProcessingInstruction, ref
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
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.2.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-02-22 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -42,24 +42,34 @@ files:
|
|
42
42
|
- ext/nokogiri/html_sax_parser.h
|
43
43
|
- ext/nokogiri/native.c
|
44
44
|
- ext/nokogiri/native.h
|
45
|
+
- ext/nokogiri/xml_attr.c
|
46
|
+
- ext/nokogiri/xml_attr.h
|
45
47
|
- ext/nokogiri/xml_cdata.c
|
46
48
|
- ext/nokogiri/xml_cdata.h
|
47
49
|
- ext/nokogiri/xml_comment.c
|
48
50
|
- ext/nokogiri/xml_comment.h
|
49
51
|
- ext/nokogiri/xml_document.c
|
50
52
|
- ext/nokogiri/xml_document.h
|
53
|
+
- ext/nokogiri/xml_document_fragment.c
|
54
|
+
- ext/nokogiri/xml_document_fragment.h
|
51
55
|
- ext/nokogiri/xml_dtd.c
|
52
56
|
- ext/nokogiri/xml_dtd.h
|
57
|
+
- ext/nokogiri/xml_entity_reference.c
|
58
|
+
- ext/nokogiri/xml_entity_reference.h
|
53
59
|
- ext/nokogiri/xml_io.c
|
54
60
|
- ext/nokogiri/xml_io.h
|
55
61
|
- ext/nokogiri/xml_node.c
|
56
62
|
- ext/nokogiri/xml_node.h
|
57
63
|
- ext/nokogiri/xml_node_set.c
|
58
64
|
- ext/nokogiri/xml_node_set.h
|
65
|
+
- ext/nokogiri/xml_processing_instruction.c
|
66
|
+
- ext/nokogiri/xml_processing_instruction.h
|
59
67
|
- ext/nokogiri/xml_reader.c
|
60
68
|
- ext/nokogiri/xml_reader.h
|
61
69
|
- ext/nokogiri/xml_sax_parser.c
|
62
70
|
- ext/nokogiri/xml_sax_parser.h
|
71
|
+
- ext/nokogiri/xml_sax_push_parser.c
|
72
|
+
- ext/nokogiri/xml_sax_push_parser.h
|
63
73
|
- ext/nokogiri/xml_syntax_error.c
|
64
74
|
- ext/nokogiri/xml_syntax_error.h
|
65
75
|
- ext/nokogiri/xml_text.c
|
@@ -93,6 +103,7 @@ files:
|
|
93
103
|
- lib/nokogiri/html/builder.rb
|
94
104
|
- lib/nokogiri/html/document.rb
|
95
105
|
- lib/nokogiri/html/sax/parser.rb
|
106
|
+
- lib/nokogiri/syntax_error.rb
|
96
107
|
- lib/nokogiri/version.rb
|
97
108
|
- lib/nokogiri/xml.rb
|
98
109
|
- lib/nokogiri/xml/after_handler.rb
|
@@ -102,16 +113,20 @@ files:
|
|
102
113
|
- lib/nokogiri/xml/cdata.rb
|
103
114
|
- lib/nokogiri/xml/comment.rb
|
104
115
|
- lib/nokogiri/xml/document.rb
|
116
|
+
- lib/nokogiri/xml/document_fragment.rb
|
105
117
|
- lib/nokogiri/xml/dtd.rb
|
106
118
|
- lib/nokogiri/xml/element.rb
|
107
119
|
- lib/nokogiri/xml/entity_declaration.rb
|
108
120
|
- lib/nokogiri/xml/node.rb
|
121
|
+
- lib/nokogiri/xml/node/save_options.rb
|
109
122
|
- lib/nokogiri/xml/node_set.rb
|
110
123
|
- lib/nokogiri/xml/notation.rb
|
124
|
+
- lib/nokogiri/xml/processing_instruction.rb
|
111
125
|
- lib/nokogiri/xml/reader.rb
|
112
126
|
- lib/nokogiri/xml/sax.rb
|
113
127
|
- lib/nokogiri/xml/sax/document.rb
|
114
128
|
- lib/nokogiri/xml/sax/parser.rb
|
129
|
+
- lib/nokogiri/xml/sax/push_parser.rb
|
115
130
|
- lib/nokogiri/xml/syntax_error.rb
|
116
131
|
- lib/nokogiri/xml/text.rb
|
117
132
|
- lib/nokogiri/xml/xpath.rb
|
@@ -119,6 +134,7 @@ files:
|
|
119
134
|
- lib/nokogiri/xml/xpath_context.rb
|
120
135
|
- lib/nokogiri/xslt.rb
|
121
136
|
- lib/nokogiri/xslt/stylesheet.rb
|
137
|
+
- tasks/test.rb
|
122
138
|
- test/css/test_nthiness.rb
|
123
139
|
- test/css/test_parser.rb
|
124
140
|
- test/css/test_tokenizer.rb
|
@@ -158,15 +174,20 @@ files:
|
|
158
174
|
- test/test_nokogiri.rb
|
159
175
|
- test/test_reader.rb
|
160
176
|
- test/test_xslt_transforms.rb
|
177
|
+
- test/xml/node/test_save_options.rb
|
161
178
|
- test/xml/sax/test_parser.rb
|
179
|
+
- test/xml/sax/test_push_parser.rb
|
162
180
|
- test/xml/test_attr.rb
|
163
181
|
- test/xml/test_builder.rb
|
164
182
|
- test/xml/test_cdata.rb
|
165
183
|
- test/xml/test_comment.rb
|
166
184
|
- test/xml/test_document.rb
|
185
|
+
- test/xml/test_document_fragment.rb
|
167
186
|
- test/xml/test_dtd.rb
|
187
|
+
- test/xml/test_entity_reference.rb
|
168
188
|
- test/xml/test_node.rb
|
169
189
|
- test/xml/test_node_set.rb
|
190
|
+
- test/xml/test_processing_instruction.rb
|
170
191
|
- test/xml/test_text.rb
|
171
192
|
- test/xml/test_xpath.rb
|
172
193
|
- vendor/hoe.rb
|
@@ -220,14 +241,19 @@ test_files:
|
|
220
241
|
- test/test_nokogiri.rb
|
221
242
|
- test/test_reader.rb
|
222
243
|
- test/test_xslt_transforms.rb
|
244
|
+
- test/xml/node/test_save_options.rb
|
223
245
|
- test/xml/sax/test_parser.rb
|
246
|
+
- test/xml/sax/test_push_parser.rb
|
224
247
|
- test/xml/test_attr.rb
|
225
248
|
- test/xml/test_builder.rb
|
226
249
|
- test/xml/test_cdata.rb
|
227
250
|
- test/xml/test_comment.rb
|
228
251
|
- test/xml/test_document.rb
|
252
|
+
- test/xml/test_document_fragment.rb
|
229
253
|
- test/xml/test_dtd.rb
|
254
|
+
- test/xml/test_entity_reference.rb
|
230
255
|
- test/xml/test_node.rb
|
231
256
|
- test/xml/test_node_set.rb
|
257
|
+
- test/xml/test_processing_instruction.rb
|
232
258
|
- test/xml/test_text.rb
|
233
259
|
- test/xml/test_xpath.rb
|