nokogiri 1.6.8.1-x64-mingw32 → 1.7.0-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/.autotest +1 -5
- data/.cross_rubies +0 -3
- data/.travis.yml +12 -19
- data/{CHANGELOG.rdoc → CHANGELOG.md} +102 -84
- data/Gemfile +2 -2
- data/Manifest.txt +1 -1
- data/README.md +7 -3
- data/Rakefile +3 -5
- data/Y_U_NO_GEMSPEC.md +1 -1
- data/build_all +0 -1
- data/ext/nokogiri/extconf.rb +11 -20
- data/ext/nokogiri/nokogiri.c +0 -4
- data/lib/nokogiri.rb +1 -1
- data/lib/nokogiri/2.1/nokogiri.so +0 -0
- data/lib/nokogiri/2.2/nokogiri.so +0 -0
- data/lib/nokogiri/2.3/nokogiri.so +0 -0
- data/lib/nokogiri/html/document.rb +1 -1
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml.rb +1 -1
- data/lib/nokogiri/xml/document.rb +1 -1
- data/lib/nokogiri/xml/node.rb +2 -2
- data/lib/nokogiri/xml/node_set.rb +11 -0
- data/lib/nokogiri/xml/parse_options.rb +3 -3
- data/test_all +2 -4
- metadata +19 -20
- data/lib/nokogiri/2.0/nokogiri.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49eea6a866cff873e5d067d014a2be74ae6a92eb
|
4
|
+
data.tar.gz: 3bf0ecc255d915dcfb00f8e349311783a19c1dfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbad558d616844f64e515a07176d7fcfe8967c6ba1a922fb1e9a99bf39660f3b744423a21eda9796ada716bbc64853cfe7226acecfe7256d9eda11a05eabe24b
|
7
|
+
data.tar.gz: 913658658f72d8717c998a8c26ce723474b4a07d1fc7be5dcff713a846808861f3d3f92dd1f89664ddc73bac0d69733fb4ed0204e4a4beb489bb50a504152332
|
data/.autotest
CHANGED
data/.cross_rubies
CHANGED
data/.travis.yml
CHANGED
@@ -3,18 +3,14 @@ language: ruby
|
|
3
3
|
sudo: false
|
4
4
|
|
5
5
|
rvm:
|
6
|
-
- ruby-1.9.2
|
7
|
-
- 1.9.3
|
8
6
|
- 2.0
|
9
7
|
- 2.1
|
10
|
-
- 2.2.
|
11
|
-
- 2.3.
|
12
|
-
-
|
8
|
+
- 2.2.5
|
9
|
+
- 2.3.1
|
10
|
+
- 2.4.0
|
11
|
+
- jruby-1.7
|
13
12
|
- jruby
|
14
|
-
-
|
15
|
-
- jruby-head
|
16
|
-
- rbx-19mode
|
17
|
-
- rbx-2
|
13
|
+
- rbx
|
18
14
|
|
19
15
|
os:
|
20
16
|
- linux
|
@@ -24,21 +20,18 @@ matrix:
|
|
24
20
|
allow_failures:
|
25
21
|
# https://github.com/travis-ci/travis-ci/issues/5361
|
26
22
|
- os: osx
|
27
|
-
rvm: 2.
|
28
|
-
- rvm: jruby-head
|
29
|
-
exclude:
|
23
|
+
rvm: 2.2.5
|
30
24
|
- os: osx
|
31
|
-
rvm:
|
25
|
+
rvm: 2.3.1
|
26
|
+
- os: linux
|
27
|
+
rvm: rbx
|
28
|
+
exclude:
|
32
29
|
- os: osx
|
33
|
-
rvm: jruby-
|
30
|
+
rvm: jruby-1.7
|
34
31
|
- os: osx
|
35
32
|
rvm: jruby
|
36
33
|
- os: osx
|
37
|
-
rvm:
|
38
|
-
- os: osx
|
39
|
-
rvm: rbx-19mode
|
40
|
-
- os: osx
|
41
|
-
rvm: rbx-2
|
34
|
+
rvm: rbx
|
42
35
|
|
43
36
|
notifications:
|
44
37
|
irc:
|
@@ -1,6 +1,24 @@
|
|
1
|
-
|
1
|
+
# 1.7.0 / 2016-12-26
|
2
2
|
|
3
|
-
|
3
|
+
## Features
|
4
|
+
|
5
|
+
* Remove deprecation warnings in Ruby 2.4.0 (#1545) (Thanks, @matthewd!)
|
6
|
+
* Support egcc compiler on OpenBSD (#1543) (Thanks, @frenkel and @knu!)
|
7
|
+
|
8
|
+
|
9
|
+
## Backwards incompatibilities.
|
10
|
+
|
11
|
+
This release ends support for:
|
12
|
+
|
13
|
+
* Ruby 1.9.2, for which official support ended on 2014-07-31
|
14
|
+
* Ruby 1.9.3, for which official support ended on 2015-02-23
|
15
|
+
* Ruby 2.0.0, for which official support ended on 2016-02-24
|
16
|
+
* MacRuby, which hasn't been actively supported since 2015-01-13 (see https://github.com/MacRuby/MacRuby/commit/f76b9d6e99c18236db617e8aceb12c27d593a483)
|
17
|
+
|
18
|
+
|
19
|
+
# 1.6.8.1 / 2016-10-03
|
20
|
+
|
21
|
+
## Dependency License Notes
|
4
22
|
|
5
23
|
Removes required dependency on the `pkg-config` gem. This dependency
|
6
24
|
was introduced in v1.6.8 and, because it's distributed under LGPL, was
|
@@ -11,9 +29,9 @@ installed, it's used; but otherwise Nokogiri will attempt to work
|
|
11
29
|
around its absence.
|
12
30
|
|
13
31
|
|
14
|
-
|
32
|
+
# 1.6.8 / 2016-06-06
|
15
33
|
|
16
|
-
|
34
|
+
## Security Notes
|
17
35
|
|
18
36
|
[MRI] Bundled libxml2 is upgraded to 2.9.4, which fixes many security issues. Many of these had previously been patched in the vendored libxml 2.9.2 in the 1.6.7.x branch, but some are newer.
|
19
37
|
|
@@ -34,7 +52,7 @@ See this libxslt email post for more:
|
|
34
52
|
* https://mail.gnome.org/archives/xslt/2016-May/msg00004.html
|
35
53
|
|
36
54
|
|
37
|
-
|
55
|
+
## Features
|
38
56
|
|
39
57
|
Several changes were made to improve performance:
|
40
58
|
|
@@ -46,7 +64,7 @@ Several changes were made to improve performance:
|
|
46
64
|
* Set document encoding appropriately even on blank document. (#1043) (Thanks, @batter!)
|
47
65
|
|
48
66
|
|
49
|
-
|
67
|
+
## Bug Fixes
|
50
68
|
|
51
69
|
* [JRuby] fix slow add_child (#692)
|
52
70
|
* [JRuby] fix load errors when deploying to JRuby/Torquebox (#1114) (Thanks, @atambo and @jvshahid!)
|
@@ -73,7 +91,7 @@ Several changes were made to improve performance:
|
|
73
91
|
|
74
92
|
|
75
93
|
|
76
|
-
|
94
|
+
## Other Notes
|
77
95
|
|
78
96
|
* Removed legacy code remaining from Ruby 1.8.x support.
|
79
97
|
* Removed legacy code remaining from REE support.
|
@@ -81,7 +99,7 @@ Several changes were made to improve performance:
|
|
81
99
|
* Handling C strings in a forward-compatible manner, see https://github.com/ruby/ruby/blob/v2_2_0/NEWS#L319
|
82
100
|
|
83
101
|
|
84
|
-
|
102
|
+
# 1.6.7.2 / 2016-01-20
|
85
103
|
|
86
104
|
This version pulls in several upstream patches to the vendored libxml2 and libxslt to address:
|
87
105
|
|
@@ -92,7 +110,7 @@ Ubuntu classifies this as "Priority: Low", RedHat classifies this as "Impact: Mo
|
|
92
110
|
MITRE record is https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7499
|
93
111
|
|
94
112
|
|
95
|
-
|
113
|
+
# 1.6.7.1 / 2015-12-16
|
96
114
|
|
97
115
|
This version pulls in several upstream patches to the vendored libxml2 and libxslt to address:
|
98
116
|
|
@@ -108,9 +126,9 @@ This version pulls in several upstream patches to the vendored libxml2 and libxs
|
|
108
126
|
See also http://www.ubuntu.com/usn/usn-2834-1/
|
109
127
|
|
110
128
|
|
111
|
-
|
129
|
+
# 1.6.7 / 2015-11-29
|
112
130
|
|
113
|
-
|
131
|
+
## Notes
|
114
132
|
|
115
133
|
This version supports native builds on Windows using the RubyInstaller
|
116
134
|
DevKit. It also supports Ruby 2.2.x on Windows, as well as making
|
@@ -121,7 +139,7 @@ This version also includes the security patches already applied in
|
|
121
139
|
v1.6.6.3 and v1.6.6.4 to the vendored libxml2 and libxslt source.
|
122
140
|
See #1374 and #1376 for details.
|
123
141
|
|
124
|
-
|
142
|
+
## Features
|
125
143
|
|
126
144
|
* Cross-built gems now have a proper ruby version requirement. (#1266)
|
127
145
|
* Ruby 2.2.x is supported on Windows.
|
@@ -130,7 +148,7 @@ See #1374 and #1376 for details.
|
|
130
148
|
* [JRuby] fix error in validating files with jruby (#1355, #1361) (Thanks, @twalpole!)
|
131
149
|
* [MRI, OSX] Patch to handle nonstandard location of `iconv.h`. (#1206, #1210, #1218, #1345) (Thanks, @neonichu!)
|
132
150
|
|
133
|
-
|
151
|
+
## Bug Fixes
|
134
152
|
|
135
153
|
* [JRuby] reset the namespace cache when replacing the document's innerHtml (#1265) (Thanks, @mkristian!)
|
136
154
|
* [JRuby] Document#parse should support IO objects that respond to #read. (#1124) (Thanks, Jake Byman!)
|
@@ -139,7 +157,7 @@ See #1374 and #1376 for details.
|
|
139
157
|
* [JRuby] Namespaced attributes aren't removed by remove_attribute. (#1299)
|
140
158
|
|
141
159
|
|
142
|
-
|
160
|
+
# 1.6.6.4 / 2015-11-19
|
143
161
|
|
144
162
|
This version pulls in an upstream patch to the vendored libxml2 to address:
|
145
163
|
|
@@ -148,7 +166,7 @@ This version pulls in an upstream patch to the vendored libxml2 to address:
|
|
148
166
|
This issue was assigned CVE-2015-8710 after the fact. See http://seclists.org/oss-sec/2015/q4/616 for details.
|
149
167
|
|
150
168
|
|
151
|
-
|
169
|
+
# 1.6.6.3 / 2015-11-16
|
152
170
|
|
153
171
|
This version pulls in several upstream patches to the vendored libxml2 and libxslt to address:
|
154
172
|
|
@@ -163,19 +181,19 @@ This version pulls in several upstream patches to the vendored libxml2 and libxs
|
|
163
181
|
See #1374 for details.
|
164
182
|
|
165
183
|
|
166
|
-
|
184
|
+
# 1.6.6.2 / 2015-01-23
|
167
185
|
|
168
|
-
|
186
|
+
## Bug fixes
|
169
187
|
|
170
188
|
* Fixed installation issue affecting compiler arguments. (#1230)
|
171
189
|
|
172
190
|
|
173
|
-
|
191
|
+
# 1.6.6.1 / 2015-01-22
|
174
192
|
|
175
193
|
Note that 1.6.6.0 was not released.
|
176
194
|
|
177
195
|
|
178
|
-
|
196
|
+
## Features
|
179
197
|
|
180
198
|
* Unified Node and NodeSet implementations of #search, #xpath and #css.
|
181
199
|
* Added Node#lang and Node#lang=.
|
@@ -186,7 +204,7 @@ Note that 1.6.6.0 was not released.
|
|
186
204
|
* JRuby 9K support.
|
187
205
|
|
188
206
|
|
189
|
-
|
207
|
+
## Bug fixes
|
190
208
|
|
191
209
|
* DocumentFragment#search now matches against root nodes. (#1205)
|
192
210
|
* (MRI) More fixes related to handling libxml2 parse errors during DocumentFragment#dup. (#1196)
|
@@ -198,31 +216,31 @@ Note that 1.6.6.0 was not released.
|
|
198
216
|
* (JRuby) HtmlSaxPushParser now exists. (#1147) (Thanks, Piotr Szmielew!)
|
199
217
|
|
200
218
|
|
201
|
-
|
219
|
+
# 1.6.5 / 2014-11-26
|
202
220
|
|
203
|
-
|
221
|
+
## Features
|
204
222
|
|
205
223
|
* Implement Slop#respond_to_missing?. (#1176)
|
206
224
|
* Optimized the XPath query generated by an `an+b` CSS query.
|
207
225
|
|
208
226
|
|
209
|
-
|
227
|
+
## Bug fixes
|
210
228
|
|
211
229
|
* Capture non-parse errors from Document#dup in Document#errors. (#1196)
|
212
230
|
* (JRuby) Document#canonicalize parameters are now consistent with MRI. (#1189)
|
213
231
|
|
214
232
|
|
215
|
-
|
233
|
+
# 1.6.4.1 / 2014-11-05
|
216
234
|
|
217
|
-
|
235
|
+
## Bug fixes
|
218
236
|
|
219
237
|
* (MRI) Fix a bug where CFLAGS passed in are dropped. (#1188)
|
220
238
|
* Fix a bug where CSS selector :nth(n) did not work. (#1187)
|
221
239
|
|
222
240
|
|
223
|
-
|
241
|
+
# 1.6.4 / 2014-11-04
|
224
242
|
|
225
|
-
|
243
|
+
## Features
|
226
244
|
|
227
245
|
* (MRI) Bundled Libxml2 is upgraded to 2.9.2.
|
228
246
|
* (MRI) `nokogiri --version` will include a list of applied patches.
|
@@ -230,27 +248,27 @@ Note that 1.6.6.0 was not released.
|
|
230
248
|
* (MRI) Detect and help user fix a missing /usr/include/iconv.h on OS X. (#1111)
|
231
249
|
* (MRI) Improve the iconv detection for building libxml2.
|
232
250
|
|
233
|
-
|
251
|
+
## Bug fixes
|
234
252
|
|
235
253
|
* (MRI) Fix DocumentFragment#element_children (#1138).
|
236
254
|
* Fix a bug with CSS attribute selector without any prefix where "foo [bar]" was treated as "foo[bar]". (#1174)
|
237
255
|
|
238
256
|
|
239
|
-
|
257
|
+
# 1.6.3.1 / 2014-07-21
|
240
258
|
|
241
|
-
|
259
|
+
## Bug fixes
|
242
260
|
|
243
261
|
* Addressing an Apple Macintosh installation problem for GCC users. #1130 (Thanks, @zenspider!)
|
244
262
|
|
245
263
|
|
246
|
-
|
264
|
+
# 1.6.3 / 2014-07-20
|
247
265
|
|
248
|
-
|
266
|
+
## Features
|
249
267
|
|
250
268
|
* Added Node#document? and Node#processing_instruction?
|
251
269
|
|
252
270
|
|
253
|
-
|
271
|
+
## Bug fixes
|
254
272
|
|
255
273
|
* [JRuby] Fix Ruby memory exhaustion vulnerability. #1087 (Thanks, @ocher)
|
256
274
|
* [MRI] Fix segfault during GC when using `libxml-ruby` and `nokogiri` together in multi-threaded environment. #895 (Thanks, @ender672!)
|
@@ -259,18 +277,18 @@ Note that 1.6.6.0 was not released.
|
|
259
277
|
* Processing instructions can now be added via Node#add_next_sibling.
|
260
278
|
|
261
279
|
|
262
|
-
|
280
|
+
# 1.6.2.1 / 2014-05-13
|
263
281
|
|
264
|
-
|
282
|
+
## Bug fixes
|
265
283
|
|
266
284
|
* Fix statically-linked libxml2 installation when using universal builds of Ruby. #1104
|
267
285
|
* Patching `mini_portile` to address the git dependency detailed in #1102.
|
268
286
|
* Library load fix to address segfault reported on some systems. #1097
|
269
287
|
|
270
288
|
|
271
|
-
|
289
|
+
# 1.6.2 / 2014-05-12
|
272
290
|
|
273
|
-
|
291
|
+
## Security Note
|
274
292
|
|
275
293
|
A set of security and bugfix patches have been backported from the libxml2 and libxslt repositories onto the version of 2.8.0 packaged with Nokogiri, including these notable security fixes:
|
276
294
|
|
@@ -280,11 +298,11 @@ A set of security and bugfix patches have been backported from the libxml2 and l
|
|
280
298
|
|
281
299
|
It is recommended that you upgrade from 1.6.x to this version as soon as possible.
|
282
300
|
|
283
|
-
|
301
|
+
## Compatibility Note
|
284
302
|
|
285
303
|
Now requires libxml >= 2.6.21 (was previously >= 2.6.17).
|
286
304
|
|
287
|
-
|
305
|
+
## Features
|
288
306
|
|
289
307
|
* Add cross building of fat binary gems for 64-Bit Windows (x64-mingw32) and add support for native builds on Windows. #864, #989, #1072
|
290
308
|
* (MRI) Alias CP932 to Windows-31J if iconv does not support Windows-31J.
|
@@ -303,7 +321,7 @@ Now requires libxml >= 2.6.21 (was previously >= 2.6.17).
|
|
303
321
|
* Fix documentation for XML::Node#namespace. #803 #802 (Thanks, Hoylen Sue)
|
304
322
|
* Allow Nokogiri::XML::Node#parse from unparented non-element nodes. #407
|
305
323
|
|
306
|
-
|
324
|
+
## Bugfixes
|
307
325
|
|
308
326
|
* Ensure :only-child pseudo class works within :not pseudo class. #858 (Thanks, Yamagishi Kazutoshi!)
|
309
327
|
* Don't call pkg_config when using bundled libraries in extconf.rb #931 (Thanks, Shota Fukumori!)
|
@@ -323,7 +341,7 @@ Now requires libxml >= 2.6.21 (was previously >= 2.6.17).
|
|
323
341
|
* (JRuby) JRuby-Nokogiri has different comment node name #1080
|
324
342
|
* (JRuby) JAXPExtensionsProvider / Java 7 / Secure Processing #1070
|
325
343
|
|
326
|
-
|
344
|
+
# 1.6.1 / 2013-12-14
|
327
345
|
|
328
346
|
* Bugfixes
|
329
347
|
|
@@ -331,7 +349,7 @@ Now requires libxml >= 2.6.21 (was previously >= 2.6.17).
|
|
331
349
|
* (JRuby) Fix regression of billion-laughs vulnerability. #586
|
332
350
|
|
333
351
|
|
334
|
-
|
352
|
+
# 1.6.0 / 2013-06-08
|
335
353
|
|
336
354
|
This release was based on v1.5.10 and 1.6.0.rc1, and contains changes
|
337
355
|
mentioned in both.
|
@@ -341,7 +359,7 @@ mentioned in both.
|
|
341
359
|
* Remove pre 1.9 monitoring from Travis.
|
342
360
|
|
343
361
|
|
344
|
-
|
362
|
+
# 1.6.0.rc1 / 2013-04-14
|
345
363
|
|
346
364
|
This release was based on v1.5.9, and so does not contain any fixes
|
347
365
|
mentioned in the notes for v1.5.10.
|
@@ -367,7 +385,7 @@ mentioned in the notes for v1.5.10.
|
|
367
385
|
* Support for Ruby 1.8.7 and prior has been dropped
|
368
386
|
|
369
387
|
|
370
|
-
|
388
|
+
# 1.5.11 / 2013-12-14
|
371
389
|
|
372
390
|
* Bugfixes
|
373
391
|
|
@@ -375,7 +393,7 @@ mentioned in the notes for v1.5.10.
|
|
375
393
|
* (JRuby) Fix regression of billion-laughs vulnerability. #586
|
376
394
|
|
377
395
|
|
378
|
-
|
396
|
+
# 1.5.10 / 2013-06-07
|
379
397
|
|
380
398
|
* Bugfixes
|
381
399
|
|
@@ -390,7 +408,7 @@ mentioned in the notes for v1.5.10.
|
|
390
408
|
* Fix TypeError when running tests. #900 (Thanks, Cédric Boutillier!)
|
391
409
|
|
392
410
|
|
393
|
-
|
411
|
+
# 1.5.9 / 2013-03-21
|
394
412
|
|
395
413
|
* Bugfixes
|
396
414
|
|
@@ -399,7 +417,7 @@ mentioned in the notes for v1.5.10.
|
|
399
417
|
* (MRI) Fixed a memory leak in fragment parsing if nodes are not all subsequently reparented. #856
|
400
418
|
|
401
419
|
|
402
|
-
|
420
|
+
# 1.5.8 / 2013-03-19
|
403
421
|
|
404
422
|
* Bugfixes
|
405
423
|
|
@@ -408,7 +426,7 @@ mentioned in the notes for v1.5.10.
|
|
408
426
|
* Allow use of a prefixed namespace on a root node using Nokogiri::XML::Builder #868
|
409
427
|
|
410
428
|
|
411
|
-
|
429
|
+
# 1.5.7 / 2013-03-18
|
412
430
|
|
413
431
|
* Features
|
414
432
|
|
@@ -431,7 +449,7 @@ mentioned in the notes for v1.5.10.
|
|
431
449
|
* (MRI) SAX parser handles empty processing instructions. #845
|
432
450
|
|
433
451
|
|
434
|
-
|
452
|
+
# 1.5.6 / 2012-12-19
|
435
453
|
|
436
454
|
* Features
|
437
455
|
|
@@ -470,7 +488,7 @@ mentioned in the notes for v1.5.10.
|
|
470
488
|
* (JRuby) builder requires textwrappers for valid utf8 in jruby, not in mri. #784
|
471
489
|
|
472
490
|
|
473
|
-
|
491
|
+
# 1.5.5 / 2012-06-24
|
474
492
|
|
475
493
|
* Features
|
476
494
|
|
@@ -492,7 +510,7 @@ mentioned in the notes for v1.5.10.
|
|
492
510
|
* JRuby's Entity resolving should be consistent with C-Nokogiri #704, #647, #703
|
493
511
|
|
494
512
|
|
495
|
-
|
513
|
+
# 1.5.4 / 2012-06-12
|
496
514
|
|
497
515
|
* Features
|
498
516
|
|
@@ -518,7 +536,7 @@ mentioned in the notes for v1.5.10.
|
|
518
536
|
Insert your own joke about double-negatives here.
|
519
537
|
|
520
538
|
|
521
|
-
|
539
|
+
# 1.5.3 / 2012-06-01
|
522
540
|
|
523
541
|
* Features
|
524
542
|
|
@@ -548,12 +566,12 @@ mentioned in the notes for v1.5.10.
|
|
548
566
|
* (JRuby) Concurrency issue in XPath parsing. #682
|
549
567
|
|
550
568
|
|
551
|
-
|
569
|
+
# 1.5.2 / 2012-03-09
|
552
570
|
|
553
571
|
Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631, #632.
|
554
572
|
|
555
573
|
|
556
|
-
|
574
|
+
# 1.5.1 / 2012-03-09
|
557
575
|
|
558
576
|
* Features
|
559
577
|
|
@@ -598,7 +616,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
598
616
|
* C14n cleanup and Node#canonicalize (thanks, Ivan Pirlik!) #563
|
599
617
|
|
600
618
|
|
601
|
-
|
619
|
+
# 1.5.0 / 2011-07-01
|
602
620
|
|
603
621
|
* Notes
|
604
622
|
|
@@ -619,7 +637,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
619
637
|
* Add support for <meta charset="...">.
|
620
638
|
|
621
639
|
|
622
|
-
|
640
|
+
# 1.5.0 beta3 / 2010/12/02
|
623
641
|
|
624
642
|
* Notes
|
625
643
|
|
@@ -631,14 +649,14 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
631
649
|
* Node#inner_text no longer returns nil. (JRuby) #264
|
632
650
|
|
633
651
|
|
634
|
-
|
652
|
+
# 1.5.0 beta2 / 2010/07/30
|
635
653
|
|
636
654
|
* Notes
|
637
655
|
|
638
656
|
* See changelog from 1.4.3
|
639
657
|
|
640
658
|
|
641
|
-
|
659
|
+
# 1.5.0 beta1 / 2010/05/22
|
642
660
|
|
643
661
|
* Notes
|
644
662
|
|
@@ -651,7 +669,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
651
669
|
* FFI support is removed.
|
652
670
|
|
653
671
|
|
654
|
-
|
672
|
+
# 1.4.7 / 2011-07-01
|
655
673
|
|
656
674
|
* Bugfixes
|
657
675
|
|
@@ -660,7 +678,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
660
678
|
encoding. Thanks, Timothy Elliott (@ender672)! #478
|
661
679
|
|
662
680
|
|
663
|
-
|
681
|
+
# 1.4.6 / 2011-06-19
|
664
682
|
|
665
683
|
* Notes
|
666
684
|
|
@@ -668,7 +686,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
668
686
|
* Ruby 1.8.6 support has been restored.
|
669
687
|
|
670
688
|
|
671
|
-
|
689
|
+
# 1.4.5 / 2011-05-19
|
672
690
|
|
673
691
|
* New Features
|
674
692
|
|
@@ -691,7 +709,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
691
709
|
* XML::Reader no longer segfaults when under GC pressure. #439
|
692
710
|
|
693
711
|
|
694
|
-
|
712
|
+
# 1.4.4 / 2010-11-15
|
695
713
|
|
696
714
|
* New Features
|
697
715
|
|
@@ -718,7 +736,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
718
736
|
* Fixed NodeSet#wrap on nodes within a fragment. #331
|
719
737
|
|
720
738
|
|
721
|
-
|
739
|
+
# 1.4.3 / 2010/07/28
|
722
740
|
|
723
741
|
* New Features
|
724
742
|
|
@@ -742,7 +760,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
742
760
|
"//F//G[preceding-sibling::E]".
|
743
761
|
|
744
762
|
|
745
|
-
|
763
|
+
# 1.4.2 / 2010/05/22
|
746
764
|
|
747
765
|
* New Features
|
748
766
|
|
@@ -795,7 +813,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
795
813
|
were bundled.
|
796
814
|
|
797
815
|
|
798
|
-
|
816
|
+
# 1.4.1 / 2009/12/10
|
799
817
|
|
800
818
|
* New Features
|
801
819
|
|
@@ -827,7 +845,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
827
845
|
* Fragments containing leading text nodes with newlines now parse properly. GH #178.
|
828
846
|
|
829
847
|
|
830
|
-
|
848
|
+
# 1.4.0 / 2009/10/30
|
831
849
|
|
832
850
|
* Happy Birthday!
|
833
851
|
|
@@ -870,7 +888,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
870
888
|
* Hpricot compatibility layer removed
|
871
889
|
|
872
890
|
|
873
|
-
|
891
|
+
# 1.3.3 / 2009/07/26
|
874
892
|
|
875
893
|
* New Features
|
876
894
|
|
@@ -891,7 +909,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
891
909
|
* Hpricot compatibility layer will be removed in 1.4.0
|
892
910
|
|
893
911
|
|
894
|
-
|
912
|
+
# 1.3.2 / 2009-06-22
|
895
913
|
|
896
914
|
* New Features
|
897
915
|
|
@@ -915,7 +933,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
915
933
|
to Nokogiri::XML::SAX::Document#end_element_namespace
|
916
934
|
|
917
935
|
|
918
|
-
|
936
|
+
# 1.3.1 / 2009-06-07
|
919
937
|
|
920
938
|
* Bugfixes
|
921
939
|
|
@@ -923,7 +941,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
923
941
|
* Namespace nodes are added to the Document node cache
|
924
942
|
|
925
943
|
|
926
|
-
|
944
|
+
# 1.3.0 / 2009-05-30
|
927
945
|
|
928
946
|
* New Features
|
929
947
|
|
@@ -967,7 +985,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
967
985
|
* Fixed intolerance of HTML attributes without values in Node#before/after/inner_html=. (GH#35)
|
968
986
|
|
969
987
|
|
970
|
-
|
988
|
+
# 1.2.3 / 2009-03-22
|
971
989
|
|
972
990
|
* Bugfixes
|
973
991
|
|
@@ -979,7 +997,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
979
997
|
* Builder methods take a hash as a second argument
|
980
998
|
|
981
999
|
|
982
|
-
|
1000
|
+
# 1.2.2 / 2009-03-14
|
983
1001
|
|
984
1002
|
* New features
|
985
1003
|
|
@@ -1006,7 +1024,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1006
1024
|
* Document should not have a parent method (LH #64)
|
1007
1025
|
|
1008
1026
|
|
1009
|
-
|
1027
|
+
# 1.2.1 / 2009-02-23
|
1010
1028
|
|
1011
1029
|
* Bugfixes
|
1012
1030
|
|
@@ -1014,7 +1032,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1014
1032
|
* Fixed Ruby 1.9 String Encoding (Thanks 角谷さん!)
|
1015
1033
|
|
1016
1034
|
|
1017
|
-
|
1035
|
+
# 1.2.0 / 2009-02-22
|
1018
1036
|
|
1019
1037
|
* New features
|
1020
1038
|
|
@@ -1051,7 +1069,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1051
1069
|
* Nokogiri::HTML.fragment now returns an XML::DocumentFragment (LH #32)
|
1052
1070
|
|
1053
1071
|
|
1054
|
-
|
1072
|
+
# 1.1.1
|
1055
1073
|
|
1056
1074
|
* New features
|
1057
1075
|
|
@@ -1069,7 +1087,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1069
1087
|
* XML::NodeSet implements to_xml
|
1070
1088
|
|
1071
1089
|
|
1072
|
-
|
1090
|
+
# 1.1.0
|
1073
1091
|
|
1074
1092
|
* New Features
|
1075
1093
|
|
@@ -1086,7 +1104,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1086
1104
|
* XML::Node#add_previous_sibling returns new sibling node.
|
1087
1105
|
|
1088
1106
|
|
1089
|
-
|
1107
|
+
# 1.0.7
|
1090
1108
|
|
1091
1109
|
* Bugfixes
|
1092
1110
|
|
@@ -1098,7 +1116,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1098
1116
|
* Fixed a bug in complex CSS negation selectors
|
1099
1117
|
|
1100
1118
|
|
1101
|
-
|
1119
|
+
# 1.0.6
|
1102
1120
|
|
1103
1121
|
* 5 Bugfixes
|
1104
1122
|
|
@@ -1109,7 +1127,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1109
1127
|
* CSS to XPath conversion is now cached
|
1110
1128
|
|
1111
1129
|
|
1112
|
-
|
1130
|
+
# 1.0.5
|
1113
1131
|
|
1114
1132
|
* Bugfixes
|
1115
1133
|
|
@@ -1118,7 +1136,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1118
1136
|
* Caching results of NodeSet#[] on Document
|
1119
1137
|
|
1120
1138
|
|
1121
|
-
|
1139
|
+
# 1.0.4
|
1122
1140
|
|
1123
1141
|
* Bugfixes
|
1124
1142
|
|
@@ -1127,7 +1145,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1127
1145
|
* Builder blocks can call methods from surrounding contexts
|
1128
1146
|
|
1129
1147
|
|
1130
|
-
|
1148
|
+
# 1.0.3
|
1131
1149
|
|
1132
1150
|
* 5 Bugfixes
|
1133
1151
|
|
@@ -1138,14 +1156,14 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1138
1156
|
* inner_html fixed. (Thanks Yehuda!)
|
1139
1157
|
|
1140
1158
|
|
1141
|
-
|
1159
|
+
# 1.0.2
|
1142
1160
|
|
1143
1161
|
* 1 Bugfix
|
1144
1162
|
|
1145
1163
|
* extconf.rb should not check for frex and racc
|
1146
1164
|
|
1147
1165
|
|
1148
|
-
|
1166
|
+
# 1.0.1
|
1149
1167
|
|
1150
1168
|
* 1 Bugfix
|
1151
1169
|
|
@@ -1153,7 +1171,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
1153
1171
|
will link properly. Thanks lucsky!
|
1154
1172
|
|
1155
1173
|
|
1156
|
-
|
1174
|
+
# 1.0.0 / 2008-07-13
|
1157
1175
|
|
1158
1176
|
* 1 major enhancement
|
1159
1177
|
|
data/Gemfile
CHANGED
@@ -15,8 +15,8 @@ gem "minitest", "~>5.8.4", :group => [:development, :test]
|
|
15
15
|
gem "rake", "~>10.5.0", :group => [:development, :test]
|
16
16
|
gem "rake-compiler", "~>0.9.2", :group => [:development, :test]
|
17
17
|
gem "rake-compiler-dock", "~>0.5.1", :group => [:development, :test]
|
18
|
-
gem "racc", "~>1.4.14", :group => [:development, :test], :platform => :ruby
|
19
|
-
gem "rexical", "~>1.0.5", :group => [:development, :test], :platform => :ruby
|
18
|
+
gem "racc", "~>1.4.14", :group => [:development, :test], :platform => [:ruby, :mingw, :x64_mingw]
|
19
|
+
gem "rexical", "~>1.0.5", :group => [:development, :test], :platform => [:ruby, :mingw, :x64_mingw]
|
20
20
|
gem "hoe", "~>3.14", :group => [:development, :test]
|
21
21
|
|
22
22
|
# vim: syntax=ruby
|
data/Manifest.txt
CHANGED
data/README.md
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
[![Travis Build Status](https://travis-ci.org/sparklemotion/nokogiri.svg?branch=master)](https://travis-ci.org/sparklemotion/nokogiri)
|
14
14
|
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/sparklemotion/nokogiri?branch=master&svg=true)](https://ci.appveyor.com/project/flavorjones/nokogiri?branch=master)
|
15
|
-
[![Code Climate](https://codeclimate.com/github/sparklemotion/nokogiri.
|
15
|
+
[![Code Climate](https://codeclimate.com/github/sparklemotion/nokogiri.svg)](https://codeclimate.com/github/sparklemotion/nokogiri)
|
16
16
|
[![Version Eye](https://www.versioneye.com/ruby/nokogiri/badge.png)](https://www.versioneye.com/ruby/nokogiri)
|
17
17
|
|
18
18
|
|
@@ -110,13 +110,17 @@ end
|
|
110
110
|
|
111
111
|
## Requirements
|
112
112
|
|
113
|
-
* Ruby 1.
|
113
|
+
* Ruby 2.1.0 or higher, including any development packages necessary
|
114
114
|
to compile native extensions.
|
115
115
|
|
116
116
|
* In Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the
|
117
117
|
gem, but if you want to use the system versions:
|
118
118
|
|
119
|
-
*
|
119
|
+
* First, check out [the long list](http://www.xmlsoft.org/news.html)
|
120
|
+
of fixes and changes between releases before deciding to use any
|
121
|
+
version older than is bundled with Nokogiri.
|
122
|
+
|
123
|
+
* At install time, set the environment variable
|
120
124
|
`NOKOGIRI_USE_SYSTEM_LIBRARIES` or else use the
|
121
125
|
`--use-system-libraries` argument. (See
|
122
126
|
http://nokogiri.org/tutorials/installing_nokogiri.html#using_your_system_libraries
|
data/Rakefile
CHANGED
@@ -31,8 +31,6 @@ CrossRuby = Struct.new(:version, :host) {
|
|
31
31
|
case minor_ver
|
32
32
|
when nil
|
33
33
|
raise "unsupported version: #{ver}"
|
34
|
-
when '1.9'
|
35
|
-
'191'
|
36
34
|
else
|
37
35
|
minor_ver.delete('.') << '0'
|
38
36
|
end
|
@@ -113,7 +111,7 @@ HOE = Hoe.spec 'nokogiri' do
|
|
113
111
|
license "MIT"
|
114
112
|
|
115
113
|
self.readme_file = "README.md"
|
116
|
-
self.history_file =
|
114
|
+
self.history_file = "CHANGELOG.md"
|
117
115
|
|
118
116
|
self.extra_rdoc_files = FileList['*.rdoc','ext/nokogiri/*.c']
|
119
117
|
|
@@ -149,7 +147,7 @@ HOE = Hoe.spec 'nokogiri' do
|
|
149
147
|
else
|
150
148
|
self.spec_extras = {
|
151
149
|
:extensions => ["ext/nokogiri/extconf.rb"],
|
152
|
-
:required_ruby_version => '>= 1.
|
150
|
+
:required_ruby_version => '>= 2.1.0'
|
153
151
|
}
|
154
152
|
end
|
155
153
|
|
@@ -233,7 +231,7 @@ else
|
|
233
231
|
libs = dependencies.map { |name, dep| "#{name}-#{dep["version"]}" }.join(', ')
|
234
232
|
|
235
233
|
spec.required_ruby_version = [
|
236
|
-
'>= 1.
|
234
|
+
'>= 2.1.0',
|
237
235
|
"< #{CROSS_RUBIES.max_by(&:ver).minor_ver.succ}"
|
238
236
|
]
|
239
237
|
|
data/Y_U_NO_GEMSPEC.md
CHANGED
@@ -22,7 +22,7 @@ the historical record:
|
|
22
22
|
* [A nokogiri-talk thread](http://groups.google.com/group/nokogiri-talk/browse_thread/thread/4706b002e492d23f)
|
23
23
|
* [Another nokogiri-talk thread](http://groups.google.com/group/nokogiri-talk/browse_thread/thread/0b201bb80ea3eea0)
|
24
24
|
|
25
|
-
Sometimes people imply that we've forgotten, or that we don't how to
|
25
|
+
Sometimes people imply that we've forgotten, or that we don't know how to
|
26
26
|
properly manage our codebase. Those people are super fun to respond
|
27
27
|
to!
|
28
28
|
|
data/build_all
CHANGED
data/ext/nokogiri/extconf.rb
CHANGED
@@ -20,6 +20,10 @@ def darwin?
|
|
20
20
|
RbConfig::CONFIG['target_os'] =~ /darwin/
|
21
21
|
end
|
22
22
|
|
23
|
+
def openbsd?
|
24
|
+
RbConfig::CONFIG['target_os'] =~ /openbsd/
|
25
|
+
end
|
26
|
+
|
23
27
|
def nix?
|
24
28
|
! (windows? || solaris? || darwin?)
|
25
29
|
end
|
@@ -62,7 +66,7 @@ usage: ruby #{$0} [options]
|
|
62
66
|
Use the zlib library placed under DIR.
|
63
67
|
|
64
68
|
--use-system-libraries
|
65
|
-
Use system libraries
|
69
|
+
Use system libraries instead of building and using the bundled
|
66
70
|
libraries.
|
67
71
|
|
68
72
|
--with-xml2-dir=DIR / --with-xml2-config=CONFIG
|
@@ -131,12 +135,7 @@ def package_config pkg, options={}
|
|
131
135
|
end
|
132
136
|
|
133
137
|
def nokogiri_try_compile
|
134
|
-
|
135
|
-
["int main() {return 0;}"]
|
136
|
-
else
|
137
|
-
["int main() {return 0;}", "", {werror: true}]
|
138
|
-
end
|
139
|
-
try_compile(*args)
|
138
|
+
try_compile "int main() {return 0;}", "", {werror: true}
|
140
139
|
end
|
141
140
|
|
142
141
|
def check_libxml_version version=nil
|
@@ -381,14 +380,6 @@ def using_system_libraries?
|
|
381
380
|
arg_config('--use-system-libraries', !!ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'])
|
382
381
|
end
|
383
382
|
|
384
|
-
#
|
385
|
-
# monkey patches
|
386
|
-
#
|
387
|
-
|
388
|
-
# Workaround for Ruby bug #8074, introduced in Ruby 2.0.0, fixed in Ruby 2.1.0
|
389
|
-
# https://bugs.ruby-lang.org/issues/8074
|
390
|
-
@libdir_basename = "lib" if RUBY_VERSION < '2.1.0'
|
391
|
-
|
392
383
|
#
|
393
384
|
# main
|
394
385
|
#
|
@@ -400,15 +391,15 @@ when arg_config('--clean')
|
|
400
391
|
do_clean
|
401
392
|
end
|
402
393
|
|
394
|
+
if openbsd?
|
395
|
+
ENV['CC'] ||= find_executable('egcc')
|
396
|
+
abort "Please install gcc 4.9+ from ports using `pkg_add -v gcc`"
|
397
|
+
end
|
398
|
+
|
403
399
|
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
404
400
|
# use same c compiler for libxml and libxslt
|
405
401
|
ENV['CC'] = RbConfig::MAKEFILE_CONFIG['CC']
|
406
402
|
|
407
|
-
# TODO: deprecate MacRuby: https://github.com/sparklemotion/nokogiri/issues/1474
|
408
|
-
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'macruby'
|
409
|
-
$LIBRUBYARG_STATIC.gsub!(/-static/, '')
|
410
|
-
end
|
411
|
-
|
412
403
|
$LIBS << " #{ENV["LIBS"]}"
|
413
404
|
|
414
405
|
# Read CFLAGS from ENV and make sure compiling works.
|
data/ext/nokogiri/nokogiri.c
CHANGED
@@ -36,10 +36,8 @@ void vasprintf_free (void *p)
|
|
36
36
|
#ifdef HAVE_RUBY_UTIL_H
|
37
37
|
#include "ruby/util.h"
|
38
38
|
#else
|
39
|
-
#ifndef __MACRUBY__
|
40
39
|
#include "util.h"
|
41
40
|
#endif
|
42
|
-
#endif
|
43
41
|
|
44
42
|
void nokogiri_root_node(xmlNodePtr node)
|
45
43
|
{
|
@@ -63,14 +61,12 @@ void nokogiri_root_nsdef(xmlNsPtr ns, xmlDocPtr doc)
|
|
63
61
|
|
64
62
|
void Init_nokogiri()
|
65
63
|
{
|
66
|
-
#ifndef __MACRUBY__
|
67
64
|
xmlMemSetup(
|
68
65
|
(xmlFreeFunc)ruby_xfree,
|
69
66
|
(xmlMallocFunc)ruby_xmalloc,
|
70
67
|
(xmlReallocFunc)ruby_xrealloc,
|
71
68
|
ruby_strdup
|
72
69
|
);
|
73
|
-
#endif
|
74
70
|
|
75
71
|
mNokogiri = rb_define_module("Nokogiri");
|
76
72
|
mNokogiriXml = rb_define_module_under(mNokogiri, "XML");
|
data/lib/nokogiri.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
@@ -161,7 +161,7 @@ module Nokogiri
|
|
161
161
|
# Nokogiri::XML::ParseOptions.
|
162
162
|
def parse string_or_io, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML
|
163
163
|
|
164
|
-
options = Nokogiri::XML::ParseOptions.new(options) if
|
164
|
+
options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
|
165
165
|
# Give the options to the user
|
166
166
|
yield options if block_given?
|
167
167
|
|
data/lib/nokogiri/version.rb
CHANGED
data/lib/nokogiri/xml.rb
CHANGED
@@ -48,7 +48,7 @@ module Nokogiri
|
|
48
48
|
# Nokogiri::XML::Reader for mor information
|
49
49
|
def Reader string_or_io, url = nil, encoding = nil, options = ParseOptions::STRICT
|
50
50
|
|
51
|
-
options = Nokogiri::XML::ParseOptions.new(options) if
|
51
|
+
options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
|
52
52
|
# Give the options to the user
|
53
53
|
yield options if block_given?
|
54
54
|
|
@@ -41,7 +41,7 @@ module Nokogiri
|
|
41
41
|
# Nokogiri.XML() is a convenience method which will call this method.
|
42
42
|
#
|
43
43
|
def self.parse string_or_io, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block
|
44
|
-
options = Nokogiri::XML::ParseOptions.new(options) if
|
44
|
+
options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
|
45
45
|
# Give the options to the user
|
46
46
|
yield options if block_given?
|
47
47
|
|
data/lib/nokogiri/xml/node.rb
CHANGED
@@ -387,7 +387,7 @@ module Nokogiri
|
|
387
387
|
end
|
388
388
|
|
389
389
|
options ||= (document.html? ? ParseOptions::DEFAULT_HTML : ParseOptions::DEFAULT_XML)
|
390
|
-
if
|
390
|
+
if Integer === options
|
391
391
|
options = Nokogiri::XML::ParseOptions.new(options)
|
392
392
|
end
|
393
393
|
# Give the options to the user
|
@@ -739,7 +739,7 @@ module Nokogiri
|
|
739
739
|
# Nokogiri::XML::ParseOptions object initialized from +options+, will be
|
740
740
|
# passed to it, allowing more convenient modification of the parser options.
|
741
741
|
def do_xinclude options = XML::ParseOptions::DEFAULT_XML, &block
|
742
|
-
options = Nokogiri::XML::ParseOptions.new(options) if
|
742
|
+
options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
|
743
743
|
|
744
744
|
# give options to user
|
745
745
|
yield options if block_given?
|
@@ -190,6 +190,17 @@ module Nokogiri
|
|
190
190
|
|
191
191
|
###
|
192
192
|
# Get the inner text of all contained Node objects
|
193
|
+
#
|
194
|
+
# Note: This joins the text of all Node objects in the NodeSet:
|
195
|
+
#
|
196
|
+
# doc = Nokogiri::XML('<xml><a><d>foo</d><d>bar</d></a></xml>')
|
197
|
+
# doc.css('d').text # => "foobar"
|
198
|
+
#
|
199
|
+
# Instead, if you want to return the text of all nodes in the NodeSet:
|
200
|
+
#
|
201
|
+
# doc.css('d').map(&:text) # => ["foo", "bar"]
|
202
|
+
#
|
203
|
+
# See Nokogiri::XML::Node#content for more information.
|
193
204
|
def inner_text
|
194
205
|
collect(&:inner_text).join('')
|
195
206
|
end
|
@@ -7,11 +7,11 @@ module Nokogiri
|
|
7
7
|
# You can build your own combinations of these parse options by using any of the following methods:
|
8
8
|
# *Note*: All examples attempt to set the +RECOVER+ & +NOENT+ options. All examples use Ruby 2 optional parameter syntax.
|
9
9
|
# [Ruby's bitwise operators] You can use the Ruby bitwise operators to set various combinations.
|
10
|
-
#
|
10
|
+
# Nokogiri.XML('<content>Chapter 1</content', options: Nokogiri::XML::ParseOptions.new((1 << 0) | (1 << 1)))
|
11
11
|
# [Method chaining] Every option has an equivalent method in lowercase. You can chain these methods together to set various combinations.
|
12
|
-
#
|
12
|
+
# Nokogiri.XML('<content>Chapter 1</content', options: Nokogiri::XML::ParseOptions.new.recover.noent)
|
13
13
|
# [Using Ruby Blocks] You can also setup parse combinations in the block passed to Nokogiri.XML or Nokogiri.HTML
|
14
|
-
#
|
14
|
+
# Nokogiri.XML('<content>Chapter 1</content') {|config| config.recover.noent}
|
15
15
|
#
|
16
16
|
# == Removing particular parse options
|
17
17
|
# You can also remove options from an instance of +ParseOptions+ dynamically.
|
data/test_all
CHANGED
@@ -12,13 +12,11 @@
|
|
12
12
|
|
13
13
|
# I'd add rubinius, but rvm errors when building it on my machine. :(
|
14
14
|
RUBIES="\
|
15
|
+
ruby-2.4 \
|
15
16
|
ruby-2.3 \
|
16
17
|
ruby-2.2 \
|
17
18
|
ruby-2.1 \
|
18
|
-
|
19
|
-
ruby-1.9.3-p551 \
|
20
|
-
ruby-1.9.2-p330 \
|
21
|
-
jruby-9.0.4.0 \
|
19
|
+
jruby-9.1.6.0 \
|
22
20
|
jruby-1.7.19
|
23
21
|
"
|
24
22
|
|
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.7.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2016-
|
15
|
+
date: 2016-12-27 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: mini_portile2
|
@@ -28,20 +28,6 @@ dependencies:
|
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: 2.1.0
|
31
|
-
- !ruby/object:Gem::Dependency
|
32
|
-
name: rdoc
|
33
|
-
requirement: !ruby/object:Gem::Requirement
|
34
|
-
requirements:
|
35
|
-
- - "~>"
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '4.0'
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
requirements:
|
42
|
-
- - "~>"
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '4.0'
|
45
31
|
- !ruby/object:Gem::Dependency
|
46
32
|
name: hoe-bundler
|
47
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,6 +168,20 @@ dependencies:
|
|
182
168
|
- - "~>"
|
183
169
|
- !ruby/object:Gem::Version
|
184
170
|
version: 1.0.5
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: rdoc
|
173
|
+
requirement: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - "~>"
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '4.0'
|
178
|
+
type: :development
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - "~>"
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '4.0'
|
185
185
|
- !ruby/object:Gem::Dependency
|
186
186
|
name: hoe
|
187
187
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,7 +210,7 @@ executables:
|
|
210
210
|
- nokogiri
|
211
211
|
extensions: []
|
212
212
|
extra_rdoc_files:
|
213
|
-
- CHANGELOG.
|
213
|
+
- CHANGELOG.md
|
214
214
|
- CONTRIBUTING.md
|
215
215
|
- C_CODING_STYLE.rdoc
|
216
216
|
- LICENSE.txt
|
@@ -260,7 +260,7 @@ files:
|
|
260
260
|
- ".editorconfig"
|
261
261
|
- ".gemtest"
|
262
262
|
- ".travis.yml"
|
263
|
-
- CHANGELOG.
|
263
|
+
- CHANGELOG.md
|
264
264
|
- CONTRIBUTING.md
|
265
265
|
- C_CODING_STYLE.rdoc
|
266
266
|
- Gemfile
|
@@ -346,7 +346,6 @@ files:
|
|
346
346
|
- ext/nokogiri/xslt_stylesheet.c
|
347
347
|
- ext/nokogiri/xslt_stylesheet.h
|
348
348
|
- lib/nokogiri.rb
|
349
|
-
- lib/nokogiri/2.0/nokogiri.so
|
350
349
|
- lib/nokogiri/2.1/nokogiri.so
|
351
350
|
- lib/nokogiri/2.2/nokogiri.so
|
352
351
|
- lib/nokogiri/2.3/nokogiri.so
|
@@ -544,7 +543,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
544
543
|
requirements:
|
545
544
|
- - ">="
|
546
545
|
- !ruby/object:Gem::Version
|
547
|
-
version: 1.
|
546
|
+
version: 2.1.0
|
548
547
|
- - "<"
|
549
548
|
- !ruby/object:Gem::Version
|
550
549
|
version: '2.4'
|
Binary file
|