Rebuilt for Ruby 1.9.3.

Enabled test suite.
f38
Vít Ondruch 13 years ago
parent ae7ca0037c
commit a5ebc1cb89

@ -1,28 +1,24 @@
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gem_name i18n
%global gemname i18n
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%global enable_check 0
Summary: New wave Internationalization support for Ruby Summary: New wave Internationalization support for Ruby
Name: rubygem-%{gemname} Name: rubygem-%{gem_name}
Version: 0.5.0 Version: 0.5.0
Release: 2%{?dist} Release: 3%{?dist}
Group: Development/Languages Group: Development/Languages
License: MIT and (GPLv2 or Ruby) License: MIT and (GPLv2 or Ruby)
URL: http://github.com/svenfuchs/i18n URL: http://github.com/svenfuchs/i18n
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Requires: rubygems Requires: ruby(rubygems)
Requires: ruby(abi) = 1.8 Requires: ruby(abi) = 1.9.1
BuildRequires: ruby(abi) = 1.8 BuildRequires: ruby(abi) = 1.9.1
BuildRequires: rubygems BuildRequires: rubygems-devel
%if %{enable_check} > 0 BuildRequires: rubygem(minitest)
BuildRequires: rubygem(mocha) BuildRequires: rubygem(mocha)
# test_declarative is not available in Fedora yet.
BuildRequires: rubygem(test_declarative) BuildRequires: rubygem(test_declarative)
%endif # TODO: Circular dependency with active support.
#BuildRequires: rubygem(activesupport)
BuildArch: noarch BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version} Provides: rubygem(%{gem_name}) = %{version}
%description %description
Ruby Internationalization and localization solution. Ruby Internationalization and localization solution.
@ -38,49 +34,56 @@ Documentation for %{name}
%prep %prep
%setup -q -c -T %setup -q -c -T
mkdir -p .%{gemdir} mkdir -p .%{gem_dir}
gem install --local --install-dir .%{gemdir} \ gem install --local --install-dir .%{gem_dir} \
--force --rdoc %{SOURCE0} --force --rdoc %{SOURCE0}
%build %build
%install %install
mkdir -p %{buildroot}%{gemdir} mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gemdir}/* \ cp -a .%{gem_dir}/* \
%{buildroot}%{gemdir}/ %{buildroot}%{gem_dir}/
chmod -x %{buildroot}%{geminstdir}/MIT-LICENSE chmod -x %{buildroot}%{gem_instdir}/MIT-LICENSE
chmod -x %{buildroot}%{geminstdir}/lib/i18n.rb chmod -x %{buildroot}%{gem_libdir}/i18n.rb
%if %{enable_check} > 0
%check %check
pushd .%{geminstdir} pushd .%{gem_instdir}
# Bundler just complicates everything in our case, remove it. # Bundler just complicates everything in our case, remove it.
sed -i -e "s|require 'bundler/setup'||" test/test_helper.rb 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 popd
%endif
%files %files
%defattr(-, root, root, -) %defattr(-, root, root, -)
%dir %{geminstdir} %dir %{gem_instdir}
%{geminstdir}/lib %{gem_libdir}
%doc %{geminstdir}/README.textile %doc %{gem_instdir}/README.textile
%doc %{geminstdir}/MIT-LICENSE %doc %{gem_instdir}/MIT-LICENSE
%doc %{geminstdir}/CHANGELOG.textile %doc %{gem_instdir}/CHANGELOG.textile
%{gemdir}/cache/%{gemname}-%{version}.gem %{gem_cache}
%{gemdir}/specifications/%{gemname}-%{version}.gemspec %{gem_spec}
%files doc %files doc
%defattr(-, root, root, -) %defattr(-, root, root, -)
%{geminstdir}/ci %{gem_instdir}/ci
%{geminstdir}/test %{gem_instdir}/test
%doc %{gemdir}/doc/%{gemname}-%{version} %doc %{gem_docdir}
%changelog %changelog
* Thu Jan 19 2012 Vít Ondruch <vondruch@redhat.com> - 0.5.0-3
- Rebuilt for Ruby 1.9.3.
- Enabled test suite.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

@ -1,2 +1 @@
be9b3a47b16d0bf29256ff55d6babe09 i18n-0.4.2.gem
761d743478dfbdc4f2c1743d5241c009 i18n-0.5.0.gem 761d743478dfbdc4f2c1743d5241c009 i18n-0.5.0.gem

Loading…
Cancel
Save