diff --git a/rubygem-i18n.spec b/rubygem-i18n.spec index 5a112ee..ad8f0bb 100644 --- a/rubygem-i18n.spec +++ b/rubygem-i18n.spec @@ -3,13 +3,14 @@ Summary: New wave Internationalization support for Ruby Name: rubygem-%{gem_name} Version: 0.6.9 -Release: 3%{?dist} +Release: 4%{?dist} Group: Development/Languages License: MIT and (BSD or Ruby) URL: http://github.com/svenfuchs/i18n Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -Requires: ruby(rubygems) -Requires: ruby(release) +# Upstream fix for Minitest 5 +# https://github.com/svenfuchs/i18n/commit/c6d95dafa30253c992047e699b26377669979af0 +Patch0: rubygem-i18n-0.6.10-minitest5.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: rubygem(minitest) @@ -33,10 +34,14 @@ Requires:%{name} = %{version}-%{release} Documentation for %{name} %prep -%setup -q -c -T -%gem_install -n %{SOURCE0} +gem unpack %{SOURCE0} +%setup -q -D -T -n %{gem_name}-%{version} +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +%patch0 -p1 %build +gem build %{gem_name}.gemspec +%gem_install %install mkdir -p %{buildroot}%{gem_dir} @@ -50,9 +55,11 @@ pushd .%{gem_instdir} # Bundler just complicates everything in our case, remove it. sed -i -e "s|require 'bundler/setup'||" test/test_helper.rb +# Fix all files to use I18n::TestCase from the patch +find ./test -name '*_test.rb' | xargs sed -i -e 's/Test::Unit::TestCase/I18n::TestCase/' # Tests are failing without LANG environment is set. # https://github.com/svenfuchs/i18n/issues/115 -LANG=en_US.utf8 testrb -Ilib test/all.rb +LANG=en_US.utf8 ruby -Ilib:test test/all.rb popd %files @@ -70,6 +77,9 @@ popd %changelog +* Wed Jun 18 2014 Josef Stribny - 0.6.9-4 +- Fix test suite compatibility with minitest 5 + * Sun Jun 08 2014 Fedora Release Engineering - 0.6.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild