nokogiri 1.5.1.rc1-java → 1.5.2-java

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.

@@ -1,30 +1,47 @@
1
- == 1.5.1 / 未リリース
1
+ == 1.5.1 / 2012年3月9日
2
2
 
3
3
  * 新機能
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
- @ender672に感謝!
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
 
@@ -1,30 +1,47 @@
1
- == 1.5.1 / unreleased
1
+ == 1.5.1 / 2012-03-09
2
2
 
3
3
  * Features
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 a memory leak in encoding detection. Thanks for pointing this
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
 
@@ -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'] =~ /mswin32/
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'] =~ /mswin32/
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
@@ -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
@@ -1,6 +1,6 @@
1
1
  module Nokogiri
2
2
  # The version of Nokogiri you are using
3
- VERSION = '1.5.1.rc1'
3
+ VERSION = '1.5.2'
4
4
 
5
5
  class VersionInfo # :nodoc:
6
6
  def jruby?
@@ -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,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 1.5.1.rc1
4
+ prerelease:
5
+ version: 1.5.2
6
6
  platform: java
7
7
  authors:
8
8
  - Aaron Patterson
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2012-02-28 00:00:00 Z
15
+ date: 2012-03-09 00:00:00 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: hoe-bundler
@@ -501,9 +501,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
501
501
  required_rubygems_version: !ruby/object:Gem::Requirement
502
502
  none: false
503
503
  requirements:
504
- - - ">"
504
+ - - ">="
505
505
  - !ruby/object:Gem::Version
506
- version: 1.3.1
506
+ version: "0"
507
507
  requirements: []
508
508
 
509
509
  rubyforge_project: nokogiri