nokogiri 1.5.1.rc1-x86-mswin32-60 → 1.5.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/CHANGELOG.ja.rdoc +23 -6
- data/CHANGELOG.rdoc +24 -7
- data/ext/nokogiri/extconf.rb +2 -2
- data/ext/nokogiri/xml_document.c +2 -2
- data/lib/nokogiri/1.8/nokogiri.so +0 -0
- data/lib/nokogiri/1.9/nokogiri.so +0 -0
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/node.rb +1 -1
- data/test/xml/test_unparented_node.rb +8 -0
- metadata +8 -12
data/CHANGELOG.ja.rdoc
CHANGED
@@ -4,27 +4,44 @@
|
|
4
4
|
|
5
5
|
* XML::Builder#comment はコメントノードを作れるようになった.
|
6
6
|
* CSS searches now support namespaced attributes. #593
|
7
|
+
* Java integration 機能が追加された. このバージョンから,
|
8
|
+
XML::Document.wrap と XML::Document#to_java メソッドが利用可能。
|
9
|
+
* RelaxNG validator support in the `nokogiri` cli utility. #591 (thanks, Dan Radez!)
|
7
10
|
|
8
11
|
* バグの修正
|
9
12
|
|
10
13
|
* エンコーディング自動認識において発生しうるメモリリークを修正.
|
11
|
-
|
12
|
-
|
14
|
+
Tim Elliottに感謝!
|
13
15
|
* homebrew はインストールしたら、extconf は homebrew のパスを読む。
|
14
|
-
|
16
|
+
* Inconsistent behavior of Nokogiri 1.5.0 Java #620
|
17
|
+
* Inheriting from Nokogiri::XML::Node on JRuby (1.6.4/5) fails #560
|
15
18
|
* XML::Attr nodes are not allowed to be added as node children, so an
|
16
19
|
exception is raised. #558
|
17
|
-
|
18
20
|
* No longer defensively "pickle" adjacent text nodes on
|
19
21
|
Node#add_next_sibling and Node#add_previous_sibling calls. #595.
|
20
|
-
|
22
|
+
* Java version inconsistency: it returns nil for empty attributes #589
|
23
|
+
* to_xhtml incorrectly generates <p /></p> when tag is empty #557
|
21
24
|
* Document#add_child now accepts a Node, NodeSet, DocumentFragment,
|
22
25
|
or String. #546.
|
23
|
-
|
24
26
|
* Document#create_element now recognizes namespaces containing
|
25
27
|
non-word characters (like "SOAP-ENV"). This is mostly relevant to
|
26
28
|
users of Builder, which calls Document#create_element for nearly
|
27
29
|
everything. #531.
|
30
|
+
* File encoding broken in 1.5.0 / jruby / windows #529
|
31
|
+
* Java version does not return namespace defs as attrs for ::HTML #542
|
32
|
+
* Bad file descriptor with Nokogiri 1.5.0 #495
|
33
|
+
* remove_namespace! doesn't work in pure java version #492
|
34
|
+
* The Nokogiri Java native build throws a null pointer exception when
|
35
|
+
ActiveSupport's .blank? method is called directly on a parsed object.
|
36
|
+
#489
|
37
|
+
* 1.5.0 Not using correct character encoding #488
|
38
|
+
* Raw XML string in XML Builder broken on JRuby #486
|
39
|
+
* Nokogiri 1.5.0 XML generation broken on JRuby #484
|
40
|
+
* Do not allow multiple root nodes. #550
|
41
|
+
* Fixes for custom XPath functions. #605, #606 (thanks, Juan Wajnerman!)
|
42
|
+
* Node#to_xml does not override :save_with if it is provided. #505
|
43
|
+
* Node#set is a private method [JRuby]. #564 (thanks, Nick Sieger!)
|
44
|
+
* C14n cleanup and Node#canonicalize (thanks, Ivan Pirlik!) #563
|
28
45
|
|
29
46
|
== 1.5.0 / 2011年7月1日
|
30
47
|
|
data/CHANGELOG.rdoc
CHANGED
@@ -4,27 +4,44 @@
|
|
4
4
|
|
5
5
|
* XML::Builder#comment allows creation of comment nodes.
|
6
6
|
* CSS searches now support namespaced attributes. #593
|
7
|
+
* Java integration feature is added. Now, XML::Document.wrap
|
8
|
+
and XML::Document#to_java methods are available.
|
9
|
+
* RelaxNG validator support in the `nokogiri` cli utility. #591 (thanks, Dan Radez!)
|
7
10
|
|
8
11
|
* Bugfixes
|
9
12
|
|
10
|
-
* Fix
|
11
|
-
out, @ender672!
|
12
|
-
|
13
|
+
* Fix many memory leaks and segfault opportunities. Thanks, Tim Elliott!
|
13
14
|
* extconf searches homebrew paths if homebrew is installed.
|
14
|
-
|
15
|
+
* Inconsistent behavior of Nokogiri 1.5.0 Java #620
|
16
|
+
* Inheriting from Nokogiri::XML::Node on JRuby (1.6.4/5) fails #560
|
15
17
|
* XML::Attr nodes are not allowed to be added as node children, so an
|
16
18
|
exception is raised. #558
|
17
|
-
|
18
19
|
* No longer defensively "pickle" adjacent text nodes on
|
19
20
|
Node#add_next_sibling and Node#add_previous_sibling calls. #595.
|
20
|
-
|
21
|
+
* Java version inconsistency: it returns nil for empty attributes #589
|
22
|
+
* to_xhtml incorrectly generates <p /></p> when tag is empty #557
|
21
23
|
* Document#add_child now accepts a Node, NodeSet, DocumentFragment,
|
22
24
|
or String. #546.
|
23
|
-
|
24
25
|
* Document#create_element now recognizes namespaces containing
|
25
26
|
non-word characters (like "SOAP-ENV"). This is mostly relevant to
|
26
27
|
users of Builder, which calls Document#create_element for nearly
|
27
28
|
everything. #531.
|
29
|
+
* File encoding broken in 1.5.0 / jruby / windows #529
|
30
|
+
* Java version does not return namespace defs as attrs for ::HTML #542
|
31
|
+
* Bad file descriptor with Nokogiri 1.5.0 #495
|
32
|
+
* remove_namespace! doesn't work in pure java version #492
|
33
|
+
* The Nokogiri Java native build throws a null pointer exception
|
34
|
+
when ActiveSupport's .blank? method is called directly on a parsed
|
35
|
+
object. #489
|
36
|
+
* 1.5.0 Not using correct character encoding #488
|
37
|
+
* Raw XML string in XML Builder broken on JRuby #486
|
38
|
+
* Nokogiri 1.5.0 XML generation broken on JRuby #484
|
39
|
+
* Do not allow multiple root nodes. #550
|
40
|
+
* Fixes for custom XPath functions. #605, #606 (thanks, Juan Wajnerman!)
|
41
|
+
* Node#to_xml does not override :save_with if it is provided. #505
|
42
|
+
* Node#set is a private method [JRuby]. #564 (thanks, Nick Sieger!)
|
43
|
+
* C14n cleanup and Node#canonicalize (thanks, Ivan Pirlik!) #563
|
44
|
+
|
28
45
|
|
29
46
|
== 1.5.0 / 2011-07-01
|
30
47
|
|
data/ext/nokogiri/extconf.rb
CHANGED
@@ -17,7 +17,7 @@ end
|
|
17
17
|
$CFLAGS << " #{ENV["CFLAGS"]}"
|
18
18
|
$LIBS << " #{ENV["LIBS"]}"
|
19
19
|
|
20
|
-
if RbConfig::CONFIG['target_os'] == 'mingw32' || RbConfig::CONFIG['target_os'] =~ /
|
20
|
+
if RbConfig::CONFIG['target_os'] == 'mingw32' || RbConfig::CONFIG['target_os'] =~ /mswin/
|
21
21
|
$CFLAGS << " -DXP_WIN -DXP_WIN32 -DUSE_INCLUDED_VASPRINTF"
|
22
22
|
elsif RbConfig::CONFIG['target_os'] =~ /solaris/
|
23
23
|
$CFLAGS << " -DUSE_INCLUDED_VASPRINTF"
|
@@ -34,7 +34,7 @@ if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
|
|
34
34
|
$CFLAGS << " -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline"
|
35
35
|
end
|
36
36
|
|
37
|
-
if RbConfig::CONFIG['target_os'] =~ /
|
37
|
+
if RbConfig::CONFIG['target_os'] =~ /mswin/
|
38
38
|
lib_prefix = 'lib'
|
39
39
|
|
40
40
|
# There's no default include/lib dir on Windows. Let's just add the Ruby ones
|
data/ext/nokogiri/xml_document.c
CHANGED
@@ -468,8 +468,6 @@ static VALUE canonicalize(int argc, VALUE* argv, VALUE self)
|
|
468
468
|
xmlChar **ns;
|
469
469
|
long ns_len, i;
|
470
470
|
|
471
|
-
rb_scan_args(argc, argv, "03", &mode, &incl_ns, &with_comments);
|
472
|
-
|
473
471
|
xmlDocPtr doc;
|
474
472
|
xmlOutputBufferPtr buf;
|
475
473
|
xmlC14NIsVisibleCallback cb = NULL;
|
@@ -478,6 +476,8 @@ static VALUE canonicalize(int argc, VALUE* argv, VALUE self)
|
|
478
476
|
VALUE rb_cStringIO;
|
479
477
|
VALUE io;
|
480
478
|
|
479
|
+
rb_scan_args(argc, argv, "03", &mode, &incl_ns, &with_comments);
|
480
|
+
|
481
481
|
Data_Get_Struct(self, xmlDoc, doc);
|
482
482
|
|
483
483
|
rb_cStringIO = rb_const_get_at(rb_cObject, rb_intern("StringIO"));
|
Binary file
|
Binary file
|
data/lib/nokogiri/version.rb
CHANGED
data/lib/nokogiri/xml/node.rb
CHANGED
@@ -297,7 +297,7 @@ module Nokogiri
|
|
297
297
|
#
|
298
298
|
# Also see related method +before+.
|
299
299
|
def add_previous_sibling node_or_tags
|
300
|
-
raise ArgumentError.new("A document may not have multiple root nodes.") if parent.is_a?(XML::Document)
|
300
|
+
raise ArgumentError.new("A document may not have multiple root nodes.") if parent.is_a?(XML::Document) && !node_or_tags.is_a?(XML::ProcessingInstruction)
|
301
301
|
|
302
302
|
node_or_tags = coerce(node_or_tags)
|
303
303
|
if node_or_tags.is_a?(XML::NodeSet)
|
@@ -248,6 +248,14 @@ module Nokogiri
|
|
248
248
|
end
|
249
249
|
end
|
250
250
|
|
251
|
+
def test_add_pi_as_previous_sibling_to_root_is_ok
|
252
|
+
doc = Nokogiri::XML "<root>foo</root>"
|
253
|
+
pi = Nokogiri::XML::ProcessingInstruction.new(doc, "xml-stylesheet", %q{type="text/xsl" href="foo.xsl"})
|
254
|
+
doc.root.add_previous_sibling pi
|
255
|
+
expected_doc = %Q{<?xml version="1.0"?>\n<?xml-stylesheet type="text/xsl" href="foo.xsl"?>\n<root>foo</root>\n}
|
256
|
+
assert_equal expected_doc, doc.to_xml
|
257
|
+
end
|
258
|
+
|
251
259
|
def test_find_by_css_with_tilde_eql
|
252
260
|
xml = Nokogiri::XML.parse(<<-eoxml)
|
253
261
|
<root>
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 1
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
9
|
- 1
|
10
|
-
|
11
|
-
- 1
|
12
|
-
version: 1.5.1.rc1
|
10
|
+
version: 1.5.1
|
13
11
|
platform: x86-mswin32-60
|
14
12
|
authors:
|
15
13
|
- Aaron Patterson
|
@@ -19,7 +17,7 @@ autorequire:
|
|
19
17
|
bindir: bin
|
20
18
|
cert_chain: []
|
21
19
|
|
22
|
-
date: 2012-
|
20
|
+
date: 2012-03-09 00:00:00 Z
|
23
21
|
dependencies:
|
24
22
|
- !ruby/object:Gem::Dependency
|
25
23
|
name: hoe-bundler
|
@@ -502,14 +500,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
502
500
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
503
501
|
none: false
|
504
502
|
requirements:
|
505
|
-
- - "
|
503
|
+
- - ">="
|
506
504
|
- !ruby/object:Gem::Version
|
507
|
-
hash:
|
505
|
+
hash: 3
|
508
506
|
segments:
|
509
|
-
-
|
510
|
-
|
511
|
-
- 1
|
512
|
-
version: 1.3.1
|
507
|
+
- 0
|
508
|
+
version: "0"
|
513
509
|
requirements: []
|
514
510
|
|
515
511
|
rubyforge_project: nokogiri
|