diff --git a/.gitignore b/.gitignore index f932bbd..6baa908 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ builder-2.1.2.gem /builder-3.0.0.gem +/builder-3.1.3.gem diff --git a/builder-3.0.0-fix-tests-with-Ruby-1.9.3-where-UTF-16-is-a-supporte.patch b/builder-3.0.0-fix-tests-with-Ruby-1.9.3-where-UTF-16-is-a-supporte.patch deleted file mode 100644 index 1d67454..0000000 --- a/builder-3.0.0-fix-tests-with-Ruby-1.9.3-where-UTF-16-is-a-supporte.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 973b558e48a5af79a7239ff53f0ef2d913d8e64f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= -Date: Wed, 25 Jan 2012 03:04:23 +0100 -Subject: [PATCH] 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. ---- - lib/builder/xmlbase.rb | 4 +++- - test/test_markupbuilder.rb | 9 ++++++++- - 2 files changed, 11 insertions(+), 2 deletions(-) - -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(

), 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(

), 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')) --- -1.7.10.4 - diff --git a/rubygem-builder.spec b/rubygem-builder.spec index 0b92ee5..0e93a0b 100644 --- a/rubygem-builder.spec +++ b/rubygem-builder.spec @@ -3,14 +3,12 @@ Summary: Builders for MarkUp Name: rubygem-%{gem_name} -Version: 3.0.0 +Version: 3.1.3 Release: 1%{?dist} Group: Development/Languages License: MIT URL: http://onestepback.org Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -# https://github.com/jimweirich/builder/pull/15 -Patch0: builder-3.0.0-fix-tests-with-Ruby-1.9.3-where-UTF-16-is-a-supporte.patch Requires: ruby(abi) = %{rubyabi} Requires: ruby(rubygems) # Builder carries copy of Blankslate, which was in the meantime extracted into @@ -24,7 +22,7 @@ Requires: ruby(rubygems) BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: rubygems-devel BuildRequires: ruby -BuildRequires: rubygem(test-unit) +BuildRequires: rubygem(minitest) BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} @@ -49,17 +47,9 @@ mkdir -p .%{gem_dir} gem install --local --install-dir .%{gem_dir} \ --force %{SOURCE0} -pushd .%{gem_instdir} -%patch0 -p1 -popd - %build %install -# test_cssbuilder.rb is part of the package just by mistake it seems. -# https://github.com/jimweirich/builder/pull/25 -rm .%{gem_instdir}/test/test_cssbuilder.rb - mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ @@ -71,29 +61,15 @@ done chmod -x %{buildroot}%{gem_instdir}/doc/releases/builder-2.1.1.rdoc -# Convert README.rdoc to utf8 -strings %{buildroot}/%{gem_instdir}/README.rdoc > %{buildroot}/%{gem_instdir}/README.rdoc.strings -mv -f %{buildroot}/%{gem_instdir}/README.rdoc.strings %{buildroot}/%{gem_instdir}/README.rdoc - -# Convert README to utf8 -strings %{buildroot}/%{gem_instdir}/README > %{buildroot}/%{gem_instdir}/README.strings -mv -f %{buildroot}/%{gem_instdir}/README.strings %{buildroot}/%{gem_instdir}/README - %check pushd .%{gem_instdir} -testrb2 -I.:lib test +testrb -I.:lib test popd %files %dir %{gem_instdir} -# Two inconsitent readmes? -# https://github.com/jimweirich/builder/issues/22 -%doc %{gem_instdir}/README -%doc %{gem_instdir}/README.rdoc -# Seems to be in package just by accident. -# https://github.com/jimweirich/builder/issues/10 -%exclude %{gem_instdir}/TAGS +%doc %{gem_instdir}/MIT-LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} @@ -101,14 +77,16 @@ popd %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGES +%doc %{gem_instdir}/README.rdoc %doc %{gem_instdir}/Rakefile -%doc %{gem_instdir}/doc/releases/builder-1.2.4.rdoc -%doc %{gem_instdir}/doc/releases/builder-2.0.0.rdoc -%doc %{gem_instdir}/doc/releases/builder-2.1.1.rdoc -%{gem_instdir}/test +%doc %{gem_instdir}/doc/ +%{gem_instdir}/test/ %changelog +* Thu Oct 11 2012 Vít Ondruch - 3.1.3-1 +- Update to Builder 3.1.3. + * Wed Jul 18 2012 Vít Ondruch - 3.0.0-1 - Update to Builder 3.0.0. diff --git a/sources b/sources index 96492f3..3271a32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf9d2693d684a749e35dda886c4dc23c builder-3.0.0.gem +63eb8d481b7f5bf6975f462d8a030cf8 builder-3.1.3.gem