nokogiri 1.1.0 → 1.1.1

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.

@@ -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)
@@ -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(XPathHandler) {
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
@@ -455,6 +455,7 @@ class Hoe
455
455
  t.test_files = FileList['test/**/test_*.rb'] +
456
456
  FileList['test/**/*_test.rb']
457
457
  t.verbose = true
458
+ t.warning = true
458
459
  end
459
460
 
460
461
  desc 'Show which test files fail when run alone.'
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.0
4
+ version: 1.1.1
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: 2008-12-21 00:00:00 -08:00
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
@@ -211,6 +212,7 @@ test_files:
211
212
  - test/html/sax/test_parser.rb
212
213
  - test/html/test_builder.rb
213
214
  - test/html/test_document.rb
215
+ - test/html/test_node.rb
214
216
  - test/test_convert_xpath.rb
215
217
  - test/test_css_cache.rb
216
218
  - test/test_gc.rb
@@ -219,6 +221,7 @@ test_files:
219
221
  - test/test_reader.rb
220
222
  - test/test_xslt_transforms.rb
221
223
  - test/xml/sax/test_parser.rb
224
+ - test/xml/test_attr.rb
222
225
  - test/xml/test_builder.rb
223
226
  - test/xml/test_cdata.rb
224
227
  - test/xml/test_comment.rb
@@ -1,6 +0,0 @@
1
- module Nokogiri
2
- module CSS
3
- class SelectorHandler < XML::XPathHandler
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module Nokogiri
2
- module XML
3
- class XPathHandler
4
- end
5
- end
6
- end