From a5ebc1cb892a6194542f874d3cb8c9c098aedc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 24 Jan 2012 09:30:15 +0100 Subject: [PATCH] Rebuilt for Ruby 1.9.3. Enabled test suite. --- rubygem-i18n.spec | 77 ++++++++++++++++++++++++----------------------- sources | 1 - 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/rubygem-i18n.spec b/rubygem-i18n.spec index 6d4820c..e284c71 100644 --- a/rubygem-i18n.spec +++ b/rubygem-i18n.spec @@ -1,28 +1,24 @@ -%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) -%global gemname i18n -%global geminstdir %{gemdir}/gems/%{gemname}-%{version} - -%global enable_check 0 +%global gem_name i18n Summary: New wave Internationalization support for Ruby -Name: rubygem-%{gemname} +Name: rubygem-%{gem_name} Version: 0.5.0 -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/Languages License: MIT and (GPLv2 or Ruby) URL: http://github.com/svenfuchs/i18n -Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem -Requires: rubygems -Requires: ruby(abi) = 1.8 -BuildRequires: ruby(abi) = 1.8 -BuildRequires: rubygems -%if %{enable_check} > 0 +Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +Requires: ruby(rubygems) +Requires: ruby(abi) = 1.9.1 +BuildRequires: ruby(abi) = 1.9.1 +BuildRequires: rubygems-devel +BuildRequires: rubygem(minitest) BuildRequires: rubygem(mocha) -# test_declarative is not available in Fedora yet. BuildRequires: rubygem(test_declarative) -%endif +# TODO: Circular dependency with active support. +#BuildRequires: rubygem(activesupport) BuildArch: noarch -Provides: rubygem(%{gemname}) = %{version} +Provides: rubygem(%{gem_name}) = %{version} %description Ruby Internationalization and localization solution. @@ -38,49 +34,56 @@ Documentation for %{name} %prep %setup -q -c -T -mkdir -p .%{gemdir} -gem install --local --install-dir .%{gemdir} \ +mkdir -p .%{gem_dir} +gem install --local --install-dir .%{gem_dir} \ --force --rdoc %{SOURCE0} %build %install -mkdir -p %{buildroot}%{gemdir} -cp -a .%{gemdir}/* \ - %{buildroot}%{gemdir}/ -chmod -x %{buildroot}%{geminstdir}/MIT-LICENSE -chmod -x %{buildroot}%{geminstdir}/lib/i18n.rb +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ +chmod -x %{buildroot}%{gem_instdir}/MIT-LICENSE +chmod -x %{buildroot}%{gem_libdir}/i18n.rb -%if %{enable_check} > 0 %check -pushd .%{geminstdir} +pushd .%{gem_instdir} # Bundler just complicates everything in our case, remove it. sed -i -e "s|require 'bundler/setup'||" test/test_helper.rb -RUBYOPT="rubygems I%{buildroot}%{geminstdir}/lib" testrb test/all.rb +# Tests are failing without LANG environment is set. +# https://github.com/svenfuchs/i18n/issues/115 +# The test failure is due to change of default YAML engine in Ruby 1.9.3. +# https://github.com/svenfuchs/i18n/issues/114 +LANG=en_US.utf8 testrb -Ilib test/all.rb | \ + grep "1021 tests, 1500 assertions, 1 failures, 0 errors, 0 skips" popd -%endif %files %defattr(-, root, root, -) -%dir %{geminstdir} -%{geminstdir}/lib -%doc %{geminstdir}/README.textile -%doc %{geminstdir}/MIT-LICENSE -%doc %{geminstdir}/CHANGELOG.textile -%{gemdir}/cache/%{gemname}-%{version}.gem -%{gemdir}/specifications/%{gemname}-%{version}.gemspec +%dir %{gem_instdir} +%{gem_libdir} +%doc %{gem_instdir}/README.textile +%doc %{gem_instdir}/MIT-LICENSE +%doc %{gem_instdir}/CHANGELOG.textile +%{gem_cache} +%{gem_spec} %files doc %defattr(-, root, root, -) -%{geminstdir}/ci -%{geminstdir}/test -%doc %{gemdir}/doc/%{gemname}-%{version} +%{gem_instdir}/ci +%{gem_instdir}/test +%doc %{gem_docdir} %changelog +* Thu Jan 19 2012 Vít Ondruch - 0.5.0-3 +- Rebuilt for Ruby 1.9.3. +- Enabled test suite. + * Sat Jan 14 2012 Fedora Release Engineering - 0.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 8c84e6c..de64bc4 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -be9b3a47b16d0bf29256ff55d6babe09 i18n-0.4.2.gem 761d743478dfbdc4f2c1743d5241c009 i18n-0.5.0.gem