nokogiri 1.1.0-x86-mswin32-60 → 1.1.1-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- data/History.ja.txt +17 -1
- data/History.txt +17 -0
- data/Manifest.txt +3 -2
- data/Rakefile +28 -9
- data/ext/nokogiri/extconf.rb +27 -30
- data/ext/nokogiri/native.so +0 -0
- data/ext/nokogiri/xml_node.c +79 -42
- data/ext/nokogiri/xml_reader.c +39 -4
- data/ext/nokogiri/xml_text.c +1 -0
- data/ext/nokogiri/xml_xpath_context.c +5 -6
- data/lib/nokogiri/css.rb +0 -1
- data/lib/nokogiri/css/generated_parser.rb +416 -396
- data/lib/nokogiri/decorators/slop.rb +2 -2
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml.rb +1 -1
- data/lib/nokogiri/xml/attr.rb +10 -0
- data/lib/nokogiri/xml/document.rb +0 -1
- data/lib/nokogiri/xml/node.rb +64 -16
- data/lib/nokogiri/xml/node_set.rb +10 -0
- data/lib/nokogiri/xml/reader.rb +6 -0
- data/test/hpricot/test_alter.rb +7 -7
- data/test/hpricot/test_parser.rb +7 -6
- data/test/hpricot/test_preserved.rb +0 -1
- data/test/html/test_node.rb +21 -0
- data/test/xml/test_attr.rb +15 -0
- data/test/xml/test_node.rb +113 -2
- data/test/xml/test_node_set.rb +22 -0
- data/test/xml/test_xpath.rb +8 -1
- data/vendor/hoe.rb +1 -0
- metadata +7 -4
- data/lib/nokogiri/css/selector_handler.rb +0 -6
- data/lib/nokogiri/xml/xpath_handler.rb +0 -6
data/test/xml/test_node_set.rb
CHANGED
@@ -12,6 +12,28 @@ module Nokogiri
|
|
12
12
|
assert_equal node_set.length, node_set.size
|
13
13
|
end
|
14
14
|
|
15
|
+
def test_to_xml
|
16
|
+
assert node_set = @xml.search('//employee')
|
17
|
+
assert node_set.to_xml
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_inner_html
|
21
|
+
doc = Nokogiri::HTML(<<-eohtml)
|
22
|
+
<html>
|
23
|
+
<body>
|
24
|
+
<div>
|
25
|
+
<a>one</a>
|
26
|
+
</div>
|
27
|
+
<div>
|
28
|
+
<a>two</a>
|
29
|
+
</div>
|
30
|
+
</body>
|
31
|
+
</html>
|
32
|
+
eohtml
|
33
|
+
assert html = doc.css('div').inner_html
|
34
|
+
assert_match '<a>', html
|
35
|
+
end
|
36
|
+
|
15
37
|
def test_at
|
16
38
|
assert node_set = @xml.search('//employee')
|
17
39
|
assert_equal node_set.first, node_set.at(0)
|
data/test/xml/test_xpath.rb
CHANGED
@@ -6,7 +6,7 @@ module Nokogiri
|
|
6
6
|
def setup
|
7
7
|
@xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE)
|
8
8
|
|
9
|
-
@handler = Class.new
|
9
|
+
@handler = Class.new {
|
10
10
|
attr_reader :things
|
11
11
|
|
12
12
|
def initialize
|
@@ -93,6 +93,13 @@ module Nokogiri
|
|
93
93
|
assert_equal(set.length, @handler.things.length)
|
94
94
|
assert_equal(set.to_a, @handler.things.flatten)
|
95
95
|
end
|
96
|
+
|
97
|
+
def test_code_that_invokes_OP_RESET_inside_libxml2
|
98
|
+
doc = "<html><body id='foo'><foo>hi</foo></body></html>"
|
99
|
+
xpath = 'id("foo")//foo'
|
100
|
+
nokogiri = Nokogiri::HTML.parse(doc)
|
101
|
+
tree = nokogiri.xpath(xpath)
|
102
|
+
end
|
96
103
|
end
|
97
104
|
end
|
98
105
|
end
|
data/vendor/hoe.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.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: x86-mswin32-60
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2009-01-13 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -78,7 +78,6 @@ files:
|
|
78
78
|
- lib/nokogiri/css/node.rb
|
79
79
|
- lib/nokogiri/css/parser.rb
|
80
80
|
- lib/nokogiri/css/parser.y
|
81
|
-
- lib/nokogiri/css/selector_handler.rb
|
82
81
|
- lib/nokogiri/css/syntax_error.rb
|
83
82
|
- lib/nokogiri/css/tokenizer.rb
|
84
83
|
- lib/nokogiri/css/tokenizer.rex
|
@@ -97,6 +96,7 @@ files:
|
|
97
96
|
- lib/nokogiri/version.rb
|
98
97
|
- lib/nokogiri/xml.rb
|
99
98
|
- lib/nokogiri/xml/after_handler.rb
|
99
|
+
- lib/nokogiri/xml/attr.rb
|
100
100
|
- lib/nokogiri/xml/before_handler.rb
|
101
101
|
- lib/nokogiri/xml/builder.rb
|
102
102
|
- lib/nokogiri/xml/cdata.rb
|
@@ -117,7 +117,6 @@ files:
|
|
117
117
|
- lib/nokogiri/xml/xpath.rb
|
118
118
|
- lib/nokogiri/xml/xpath/syntax_error.rb
|
119
119
|
- lib/nokogiri/xml/xpath_context.rb
|
120
|
-
- lib/nokogiri/xml/xpath_handler.rb
|
121
120
|
- lib/nokogiri/xslt.rb
|
122
121
|
- lib/nokogiri/xslt/stylesheet.rb
|
123
122
|
- test/css/test_nthiness.rb
|
@@ -151,6 +150,7 @@ files:
|
|
151
150
|
- test/html/sax/test_parser.rb
|
152
151
|
- test/html/test_builder.rb
|
153
152
|
- test/html/test_document.rb
|
153
|
+
- test/html/test_node.rb
|
154
154
|
- test/test_convert_xpath.rb
|
155
155
|
- test/test_css_cache.rb
|
156
156
|
- test/test_gc.rb
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- test/test_reader.rb
|
160
160
|
- test/test_xslt_transforms.rb
|
161
161
|
- test/xml/sax/test_parser.rb
|
162
|
+
- test/xml/test_attr.rb
|
162
163
|
- test/xml/test_builder.rb
|
163
164
|
- test/xml/test_cdata.rb
|
164
165
|
- test/xml/test_comment.rb
|
@@ -217,6 +218,7 @@ test_files:
|
|
217
218
|
- test/html/sax/test_parser.rb
|
218
219
|
- test/html/test_builder.rb
|
219
220
|
- test/html/test_document.rb
|
221
|
+
- test/html/test_node.rb
|
220
222
|
- test/test_convert_xpath.rb
|
221
223
|
- test/test_css_cache.rb
|
222
224
|
- test/test_gc.rb
|
@@ -225,6 +227,7 @@ test_files:
|
|
225
227
|
- test/test_reader.rb
|
226
228
|
- test/test_xslt_transforms.rb
|
227
229
|
- test/xml/sax/test_parser.rb
|
230
|
+
- test/xml/test_attr.rb
|
228
231
|
- test/xml/test_builder.rb
|
229
232
|
- test/xml/test_cdata.rb
|
230
233
|
- test/xml/test_comment.rb
|