nokogiri 1.6.6.4-x64-mingw32 → 1.6.7.rc2-x64-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.
- checksums.yaml +4 -4
- data/.cross_rubies +7 -5
- data/.travis.yml +33 -30
- data/CHANGELOG.ja.rdoc +15 -18
- data/CHANGELOG.rdoc +12 -15
- data/Gemfile +2 -1
- data/LICENSE.txt +31 -0
- data/Manifest.txt +4 -24
- data/README.md +170 -0
- data/Rakefile +24 -22
- data/appveyor.yml +22 -0
- data/build_all +6 -90
- data/ext/nokogiri/extconf.rb +29 -31
- data/ext/nokogiri/xml_node.c +21 -11
- data/lib/nokogiri/2.0/nokogiri.so +0 -0
- data/lib/nokogiri/2.1/nokogiri.so +0 -0
- data/lib/nokogiri/2.2/nokogiri.so +0 -0
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/node.rb +16 -0
- data/patches/sort-patches-by-date +25 -0
- data/test/html/test_document.rb +21 -3
- data/test/xml/sax/test_parser.rb +11 -0
- data/test/xml/test_document.rb +11 -0
- data/test_all +3 -3
- metadata +69 -48
- data/README.ja.rdoc +0 -112
- data/README.rdoc +0 -177
Binary file
|
Binary file
|
Binary file
|
data/lib/nokogiri/version.rb
CHANGED
data/lib/nokogiri/xml/node.rb
CHANGED
@@ -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"
|
data/test/html/test_document.rb
CHANGED
@@ -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('
|
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
|
data/test/xml/sax/test_parser.rb
CHANGED
@@ -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
|
data/test/xml/test_document.rb
CHANGED
@@ -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
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.
|
4
|
+
version: 1.6.7.rc2
|
5
5
|
platform: x64-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-
|
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.
|
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.
|
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.
|
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.
|
198
|
+
version: '3.13'
|
185
199
|
description: |-
|
186
|
-
Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
|
187
|
-
many features is the ability to search documents via XPath
|
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
|
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.
|
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.
|
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
|
@@ -335,6 +351,7 @@ files:
|
|
335
351
|
- lib/nokogiri.rb
|
336
352
|
- lib/nokogiri/2.0/nokogiri.so
|
337
353
|
- lib/nokogiri/2.1/nokogiri.so
|
354
|
+
- lib/nokogiri/2.2/nokogiri.so
|
338
355
|
- lib/nokogiri/css.rb
|
339
356
|
- lib/nokogiri/css/node.rb
|
340
357
|
- lib/nokogiri/css/parser.rb
|
@@ -396,6 +413,7 @@ files:
|
|
396
413
|
- lib/nokogiri/xslt.rb
|
397
414
|
- lib/nokogiri/xslt/stylesheet.rb
|
398
415
|
- lib/xsd/xmlparser/nokogiri.rb
|
416
|
+
- patches/sort-patches-by-date
|
399
417
|
- suppressions/README.txt
|
400
418
|
- suppressions/nokogiri_ree-1.8.7.358.supp
|
401
419
|
- suppressions/nokogiri_ruby-1.8.7.370.supp
|
@@ -516,20 +534,23 @@ metadata: {}
|
|
516
534
|
post_install_message: |
|
517
535
|
Nokogiri is built with the packaged libraries: libxml2-2.9.2, libxslt-1.1.28, zlib-1.2.8, libiconv-1.14.
|
518
536
|
rdoc_options:
|
519
|
-
- --main
|
520
|
-
- README.
|
537
|
+
- "--main"
|
538
|
+
- README.md
|
521
539
|
require_paths:
|
522
540
|
- lib
|
523
541
|
required_ruby_version: !ruby/object:Gem::Requirement
|
524
542
|
requirements:
|
525
|
-
- -
|
543
|
+
- - ">="
|
526
544
|
- !ruby/object:Gem::Version
|
527
545
|
version: 1.9.2
|
546
|
+
- - "<"
|
547
|
+
- !ruby/object:Gem::Version
|
548
|
+
version: '2.3'
|
528
549
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
529
550
|
requirements:
|
530
|
-
- -
|
551
|
+
- - ">"
|
531
552
|
- !ruby/object:Gem::Version
|
532
|
-
version:
|
553
|
+
version: 1.3.1
|
533
554
|
requirements: []
|
534
555
|
rubyforge_project:
|
535
556
|
rubygems_version: 2.4.8
|