[DRE-commits] [SCM] ruby-builder.git branch, master, updated. debian/3.0.0-2-14-g65b8f41
Antonio Terceiro
terceiro at debian.org
Sat May 18 00:43:02 UTC 2013
The following commit has been merged in the master branch:
commit 1257740ce3394fa72cd1c6ec66039b62b8839a39
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri May 17 21:26:29 2013 -0300
refresh patches
diff --git a/debian/patches/ruby-builder_dummy_encodings_973b558 b/debian/patches/ruby-builder_dummy_encodings_973b558
deleted file mode 100644
index 338764b..0000000
--- a/debian/patches/ruby-builder_dummy_encodings_973b558
+++ /dev/null
@@ -1,51 +0,0 @@
-commit 973b558e48a5af79a7239ff53f0ef2d913d8e64f
-Author: Diego Elio Pettenò <flameeyes at flameeyes.eu>
-Date: Wed Jan 25 03:04:23 2012 +0100
-
- Fix tests with Ruby 1.9.3, where UTF-16 is a supported encoding.
-
- While the UTF-16 encoding is supported, it's a dummy encoding, so regexp
- matching is not properly implemented, so there is not much we can do but
- reject dummy encodings altogether.
-
-diff --git a/lib/builder/xmlbase.rb b/lib/builder/xmlbase.rb
-index 1a1e5f9..0c9798f 100644
---- a/lib/builder/xmlbase.rb
-+++ b/lib/builder/xmlbase.rb
-@@ -122,7 +122,9 @@ module Builder
- def _escape(text)
- result = XChar.encode(text)
- begin
-- result.encode(@encoding)
-+ encoding = ::Encoding::find(@encoding)
-+ raise Exception if encoding.dummy?
-+ result.encode(encoding)
- rescue
- # if the encoding can't be supported, use numeric character references
- result.
-diff --git a/test/test_markupbuilder.rb b/test/test_markupbuilder.rb
-index 63864ad..2d9b853 100644
---- a/test/test_markupbuilder.rb
-+++ b/test/test_markupbuilder.rb
-@@ -446,13 +446,20 @@ class TestIndentedXmlMarkup < Test::Unit::TestCase
- end
- end
-
-- def test_use_entities_if_kcode_is_utf_but_encoding_is_something_else
-+ def test_use_entities_if_kcode_is_utf_but_encoding_is_dummy_encoding
- xml = Builder::XmlMarkup.new
- xml.instruct!(:xml, :encoding => 'UTF-16')
- xml.p(encode("\xE2\x80\x99", 'UTF8'))
- assert_match(%r(<p>’</p>), xml.target!) #
- end
-
-+ def test_use_entities_if_kcode_is_utf_but_encoding_is_unsupported_encoding
-+ xml = Builder::XmlMarkup.new
-+ xml.instruct!(:xml, :encoding => 'UCS-2')
-+ xml.p(encode("\xE2\x80\x99", 'UTF8'))
-+ assert_match(%r(<p>’</p>), xml.target!) #
-+ end
-+
- def test_use_utf8_if_encoding_defaults_and_kcode_is_utf8
- xml = Builder::XmlMarkup.new
- xml.p(encode("\xE2\x80\x99",'UTF8'))
diff --git a/debian/patches/ruby-builder_fast_xs_rails_workaround_a24436e b/debian/patches/ruby-builder_fast_xs_rails_workaround_a24436e
deleted file mode 100644
index b761c9c..0000000
--- a/debian/patches/ruby-builder_fast_xs_rails_workaround_a24436e
+++ /dev/null
@@ -1,28 +0,0 @@
-commit a24436e68baff6cccda8f4f259375f14d2bd0f4c (HEAD, refs/remotes/origin/master, refs/remotes/origin/HEAD, refs/heads/master)
-Author: Diego Elio Pettenò <flameeyes at flameeyes.eu>
-Date: Wed Jan 25 03:07:26 2012 +0100
-
- Fix _escape when activesupport and fast_xs/hpricot are loaded.
-
- The to_xs method implemented by fast_xs (which is also used by hpricot)
- does not accept an encoding parameter, so rely on the original_xs in that
- context.
-
-diff --git a/lib/builder/xmlbase.rb b/lib/builder/xmlbase.rb
-index 0c9798f..06f8807 100644
---- a/lib/builder/xmlbase.rb
-+++ b/lib/builder/xmlbase.rb
-@@ -134,7 +134,12 @@ module Builder
- end
- else
- def _escape(text)
-- text.to_xs((@encoding != 'utf-8' or $KCODE != 'UTF8'))
-+ # original_xs is defined by activesupport when fast_xs is
-+ # loaded; since fast_xs (as of version 0.8.0) does not accept
-+ # the encode parameter, use the original function if present.
-+ toxs_method = ::String.method_defined?(:original_xs) ? :original_xs : :to_xs
-+
-+ text.send(toxs_method, (@encoding != 'utf-8' or $KCODE != 'UTF8'))
- end
- end
-
diff --git a/debian/patches/series b/debian/patches/series
index b879d52..e3aaa49 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1 @@
test_blankslate_fix_ruby_1.9
-ruby-builder_dummy_encodings_973b558
-ruby-builder_fast_xs_rails_workaround_a24436e
diff --git a/debian/patches/test_blankslate_fix_ruby_1.9 b/debian/patches/test_blankslate_fix_ruby_1.9
index b192129..4844101 100644
--- a/debian/patches/test_blankslate_fix_ruby_1.9
+++ b/debian/patches/test_blankslate_fix_ruby_1.9
@@ -7,13 +7,11 @@
# not going to be enough to skip over these tests; instead use the skip
# method if it's available.
#
-Index: ruby-builder/test/test_blankslate.rb
-===================================================================
---- ruby-builder.orig/test/test_blankslate.rb 2011-08-13 12:52:35.942452600 +0200
-+++ ruby-builder/test/test_blankslate.rb 2011-08-13 12:53:05.796408262 +0200
-@@ -89,6 +89,10 @@
- end
-
+--- a/test/test_blankslate.rb
++++ b/test/test_blankslate.rb
+@@ -82,6 +82,10 @@ end
+ #
+ class TestBlankSlate < Test::Unit::TestCase
def setup
+ if Object::const_defined?(:BasicObject) and respond_to?(:skip)
+ skip "BlankSlate is not used in this environment"
--
ruby-builder.git
More information about the Pkg-ruby-extras-commits
mailing list