nokogiri 1.6.6.4-x86-mingw32 → 1.6.7.rc2-x86-mingw32

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.

Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  module Nokogiri
2
2
  # The version of Nokogiri you are using
3
- VERSION = '1.6.6.4'
3
+ VERSION = '1.6.7.rc2'
4
4
 
5
5
  class VersionInfo # :nodoc:
6
6
  def jruby?
@@ -32,6 +32,22 @@ module Nokogiri
32
32
  # * Nokogiri::XML::Node#next
33
33
  # * Nokogiri::XML::Node#previous
34
34
  #
35
+ #
36
+ # When printing or otherwise emitting a document or a node (and
37
+ # its subtree), there are a few methods you might want to use:
38
+ #
39
+ # * content, text, inner_text, to_str: emit plaintext
40
+ #
41
+ # These methods will all emit the plaintext version of your
42
+ # document, meaning that entities will be replaced (e.g., "<"
43
+ # will be replaced with "<"), meaning that any sanitizing will
44
+ # likely be un-done in the output.
45
+ #
46
+ # * to_s, to_xml, to_html, inner_html: emit well-formed markup
47
+ #
48
+ # These methods will all emit properly-escaped markup, meaning
49
+ # that it's suitable for consumption by browsers, parsers, etc.
50
+ #
35
51
  # You may search this node's subtree using Searchable#xpath and Searchable#css
36
52
  class Node
37
53
  include Nokogiri::XML::PP::Node
@@ -0,0 +1,25 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require "date"
4
+
5
+ dir = ARGV[0] || raise("ERROR: arg1 must be dir")
6
+
7
+ Dir.chdir dir
8
+
9
+ files_and_times = {}
10
+ Dir["*.patch"].sort.each do |filename|
11
+ dateline = `cat #{filename} | grep "Date:"`
12
+ datestr = dateline.split("Date:").last.strip
13
+ time = DateTime.parse datestr
14
+ files_and_times[filename] = time
15
+ end
16
+
17
+ count = 0
18
+ files_and_times.sort_by {|k,v| v}.each do |filename, time|
19
+ count += 1
20
+ _, patch_name = filename.split("-", 2)
21
+ new_filename = sprintf("%4.4d-%s", count, patch_name)
22
+ printf "mv -f %s %s # %s\n", filename, new_filename, time
23
+ end
24
+
25
+ STDERR.print "\n**\n** REMEMBER TO UPDATE THE Manifest.txt FILE\n**\n"
@@ -88,9 +88,9 @@ module Nokogiri
88
88
  def test_document_parse_method_with_url
89
89
  require 'open-uri'
90
90
  begin
91
- html = open('http://google.com').read
92
- rescue
93
- skip("This test needs the internet. Skips if no internet available.")
91
+ html = open('https://www.yahoo.com').read
92
+ rescue Exception => e
93
+ skip("This test needs the internet. Skips if no internet available. (#{e})")
94
94
  end
95
95
  doc = Nokogiri::HTML html ,"http:/foobar.foobar/"
96
96
  refute_empty doc.to_s, "Document should not be empty"
@@ -637,6 +637,24 @@ eohtml
637
637
  assert_equal original_errors.length+1, doc1.errors.length
638
638
  assert_match(/ID unique already defined/, doc1.errors.last.to_s)
639
639
  end
640
+
641
+ def test_silencing_nonparse_errors_during_attribute_insertion_1262
642
+ # see https://github.com/sparklemotion/nokogiri/issues/1262
643
+ #
644
+ # libxml2 emits a warning when this happens; the JRuby
645
+ # implementation does not. so rather than capture the error in
646
+ # doc.errors in a platform-dependent way, I'm opting to have
647
+ # the error silenced.
648
+ #
649
+ # So this test doesn't look meaningful, but we want to avoid
650
+ # having `ID unique-issue-1262 already defined` emitted to
651
+ # stderr when running the test suite.
652
+ #
653
+ doc = Nokogiri::HTML::Document.new
654
+ Nokogiri::XML::Element.new("div", doc).set_attribute('id', 'unique-issue-1262')
655
+ Nokogiri::XML::Element.new("div", doc).set_attribute('id', 'unique-issue-1262')
656
+ assert_equal 0, doc.errors.length
657
+ end
640
658
  end
641
659
  end
642
660
  end
@@ -376,6 +376,17 @@ module Nokogiri
376
376
 
377
377
  assert_equal [['Root', []], ['Data', []], ['Item', []], ['Data', []], ['Item', []]], @parser.document.start_elements
378
378
  end
379
+
380
+ def test_square_bracket_in_text # issue 1261
381
+ xml = <<-eoxml
382
+ <tu tuid="87dea04cf60af103ff09d1dba36ae820" segtype="block">
383
+ <prop type="x-smartling-string-variant">en:#:home_page:#:stories:#:[6]:#:name</prop>
384
+ <tuv xml:lang="en-US"><seg>Sandy S.</seg></tuv>
385
+ </tu>
386
+ eoxml
387
+ @parser.parse(xml)
388
+ assert @parser.document.data.must_include "en:#:home_page:#:stories:#:[6]:#:name"
389
+ end
379
390
  end
380
391
  end
381
392
  end
@@ -689,6 +689,17 @@ module Nokogiri
689
689
  refute_nil doc
690
690
  end
691
691
 
692
+ def test_parse_works_with_an_object_that_responds_to_read
693
+ klass = Class.new do
694
+ def read *args
695
+ "<div>foo</div>"
696
+ end
697
+ end
698
+
699
+ doc = Nokogiri::XML.parse klass.new
700
+ doc.at_css("div").content.must_equal("foo")
701
+ end
702
+
692
703
  def test_search_on_empty_documents
693
704
  doc = Nokogiri::XML::Document.new
694
705
  ns = doc.search('//foo')
data/test_all CHANGED
@@ -14,11 +14,11 @@
14
14
  RUBIES="\
15
15
  ruby-2.2 \
16
16
  ruby-2.1 \
17
- ruby-2.0.0-p647 \
17
+ ruby-2.0.0-p598 \
18
18
  ruby-1.9.3-p551 \
19
19
  ruby-1.9.2-p330 \
20
- jruby-9.0.4.0 \
21
- jruby-1.7.19
20
+ jruby-9.0.0.0.pre1 \
21
+ jruby-1.7.18
22
22
  "
23
23
 
24
24
  TEST_LOG=test.log
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.6.6.4
4
+ version: 1.6.7.rc2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Aaron Patterson
@@ -12,182 +12,197 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-11-19 00:00:00.000000000 Z
15
+ date: 2015-08-31 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: mini_portile
19
19
  requirement: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ~>
21
+ - - "~>"
22
22
  - !ruby/object:Gem::Version
23
- version: 0.6.0
23
+ version: 0.7.0.rc2
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ~>
28
+ - - "~>"
29
29
  - !ruby/object:Gem::Version
30
- version: 0.6.0
30
+ version: 0.7.0.rc2
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: rdoc
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  requirements:
35
- - - ~>
35
+ - - "~>"
36
36
  - !ruby/object:Gem::Version
37
37
  version: '4.0'
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - ~>
42
+ - - "~>"
43
43
  - !ruby/object:Gem::Version
44
44
  version: '4.0'
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: hoe-bundler
47
47
  requirement: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - '>='
49
+ - - ">="
50
50
  - !ruby/object:Gem::Version
51
51
  version: '1.1'
52
52
  type: :development
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - '>='
56
+ - - ">="
57
57
  - !ruby/object:Gem::Version
58
58
  version: '1.1'
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: hoe-debugging
61
61
  requirement: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - ~>
63
+ - - "~>"
64
64
  - !ruby/object:Gem::Version
65
65
  version: 1.2.0
66
66
  type: :development
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ~>
70
+ - - "~>"
71
71
  - !ruby/object:Gem::Version
72
72
  version: 1.2.0
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: hoe-gemspec
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - '>='
77
+ - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  version: '1.0'
80
80
  type: :development
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: '1.0'
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: hoe-git
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - '>='
91
+ - - ">="
92
92
  - !ruby/object:Gem::Version
93
93
  version: '1.4'
94
94
  type: :development
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - '>='
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '1.4'
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: minitest
103
103
  requirement: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - ~>
105
+ - - "~>"
106
106
  - !ruby/object:Gem::Version
107
107
  version: 2.2.2
108
108
  type: :development
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
111
111
  requirements:
112
- - - ~>
112
+ - - "~>"
113
113
  - !ruby/object:Gem::Version
114
114
  version: 2.2.2
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: rake
117
117
  requirement: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - '>='
119
+ - - ">="
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0.9'
122
122
  type: :development
123
123
  prerelease: false
124
124
  version_requirements: !ruby/object:Gem::Requirement
125
125
  requirements:
126
- - - '>='
126
+ - - ">="
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0.9'
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: rake-compiler
131
131
  requirement: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - ~>
133
+ - - "~>"
134
134
  - !ruby/object:Gem::Version
135
135
  version: 0.9.2
136
136
  type: :development
137
137
  prerelease: false
138
138
  version_requirements: !ruby/object:Gem::Requirement
139
139
  requirements:
140
- - - ~>
140
+ - - "~>"
141
141
  - !ruby/object:Gem::Version
142
142
  version: 0.9.2
143
+ - !ruby/object:Gem::Dependency
144
+ name: rake-compiler-dock
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: 0.4.2
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - "~>"
155
+ - !ruby/object:Gem::Version
156
+ version: 0.4.2
143
157
  - !ruby/object:Gem::Dependency
144
158
  name: racc
145
159
  requirement: !ruby/object:Gem::Requirement
146
160
  requirements:
147
- - - '>='
161
+ - - ">="
148
162
  - !ruby/object:Gem::Version
149
163
  version: 1.4.6
150
164
  type: :development
151
165
  prerelease: false
152
166
  version_requirements: !ruby/object:Gem::Requirement
153
167
  requirements:
154
- - - '>='
168
+ - - ">="
155
169
  - !ruby/object:Gem::Version
156
170
  version: 1.4.6
157
171
  - !ruby/object:Gem::Dependency
158
172
  name: rexical
159
173
  requirement: !ruby/object:Gem::Requirement
160
174
  requirements:
161
- - - '>='
175
+ - - ">="
162
176
  - !ruby/object:Gem::Version
163
177
  version: 1.0.5
164
178
  type: :development
165
179
  prerelease: false
166
180
  version_requirements: !ruby/object:Gem::Requirement
167
181
  requirements:
168
- - - '>='
182
+ - - ">="
169
183
  - !ruby/object:Gem::Version
170
184
  version: 1.0.5
171
185
  - !ruby/object:Gem::Dependency
172
186
  name: hoe
173
187
  requirement: !ruby/object:Gem::Requirement
174
188
  requirements:
175
- - - ~>
189
+ - - "~>"
176
190
  - !ruby/object:Gem::Version
177
- version: '3.14'
191
+ version: '3.13'
178
192
  type: :development
179
193
  prerelease: false
180
194
  version_requirements: !ruby/object:Gem::Requirement
181
195
  requirements:
182
- - - ~>
196
+ - - "~>"
183
197
  - !ruby/object:Gem::Version
184
- version: '3.14'
198
+ version: '3.13'
185
199
  description: |-
186
- Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's
187
- many features is the ability to search documents via XPath or CSS3 selectors.
200
+ Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
201
+ Nokogiri's many features is the ability to search documents via XPath
202
+ or CSS3 selectors.
188
203
 
189
- XML is like violence - if it doesn’t solve your problems, you are not using
190
- enough of it.
204
+ XML is like violence - if it doesn’t solve your problems, you are not
205
+ using enough of it.
191
206
  email:
192
207
  - aaronp@rubyforge.org
193
208
  - mike.dalessio@gmail.com
@@ -201,9 +216,9 @@ extra_rdoc_files:
201
216
  - CHANGELOG.ja.rdoc
202
217
  - CHANGELOG.rdoc
203
218
  - C_CODING_STYLE.rdoc
219
+ - LICENSE.txt
204
220
  - Manifest.txt
205
- - README.ja.rdoc
206
- - README.rdoc
221
+ - README.md
207
222
  - ROADMAP.md
208
223
  - STANDARD_RESPONSES.md
209
224
  - Y_U_NO_GEMSPEC.md
@@ -243,22 +258,23 @@ extra_rdoc_files:
243
258
  - ext/nokogiri/xml_xpath_context.c
244
259
  - ext/nokogiri/xslt_stylesheet.c
245
260
  files:
246
- - .autotest
247
- - .cross_rubies
248
- - .editorconfig
249
- - .gemtest
250
- - .travis.yml
261
+ - ".autotest"
262
+ - ".cross_rubies"
263
+ - ".editorconfig"
264
+ - ".gemtest"
265
+ - ".travis.yml"
251
266
  - CHANGELOG.ja.rdoc
252
267
  - CHANGELOG.rdoc
253
268
  - C_CODING_STYLE.rdoc
254
269
  - Gemfile
270
+ - LICENSE.txt
255
271
  - Manifest.txt
256
- - README.ja.rdoc
257
- - README.rdoc
272
+ - README.md
258
273
  - ROADMAP.md
259
274
  - Rakefile
260
275
  - STANDARD_RESPONSES.md
261
276
  - Y_U_NO_GEMSPEC.md
277
+ - appveyor.yml
262
278
  - bin/nokogiri
263
279
  - build_all
264
280
  - dependencies.yml
@@ -336,6 +352,7 @@ files:
336
352
  - lib/nokogiri/1.9/nokogiri.so
337
353
  - lib/nokogiri/2.0/nokogiri.so
338
354
  - lib/nokogiri/2.1/nokogiri.so
355
+ - lib/nokogiri/2.2/nokogiri.so
339
356
  - lib/nokogiri/css.rb
340
357
  - lib/nokogiri/css/node.rb
341
358
  - lib/nokogiri/css/parser.rb
@@ -397,6 +414,7 @@ files:
397
414
  - lib/nokogiri/xslt.rb
398
415
  - lib/nokogiri/xslt/stylesheet.rb
399
416
  - lib/xsd/xmlparser/nokogiri.rb
417
+ - patches/sort-patches-by-date
400
418
  - suppressions/README.txt
401
419
  - suppressions/nokogiri_ree-1.8.7.358.supp
402
420
  - suppressions/nokogiri_ruby-1.8.7.370.supp
@@ -517,20 +535,23 @@ metadata: {}
517
535
  post_install_message: |
518
536
  Nokogiri is built with the packaged libraries: libxml2-2.9.2, libxslt-1.1.28, zlib-1.2.8, libiconv-1.14.
519
537
  rdoc_options:
520
- - --main
521
- - README.rdoc
538
+ - "--main"
539
+ - README.md
522
540
  require_paths:
523
541
  - lib
524
542
  required_ruby_version: !ruby/object:Gem::Requirement
525
543
  requirements:
526
- - - '>='
544
+ - - ">="
527
545
  - !ruby/object:Gem::Version
528
546
  version: 1.9.2
547
+ - - "<"
548
+ - !ruby/object:Gem::Version
549
+ version: '2.3'
529
550
  required_rubygems_version: !ruby/object:Gem::Requirement
530
551
  requirements:
531
- - - '>='
552
+ - - ">"
532
553
  - !ruby/object:Gem::Version
533
- version: '0'
554
+ version: 1.3.1
534
555
  requirements: []
535
556
  rubyforge_project:
536
557
  rubygems_version: 2.4.8