[rubygem-test-spec] Rebuilt for Ruby 1.9.3. Introduced %check section.

Vít Ondruch vondruch at fedoraproject.org
Thu Feb 2 12:20:33 UTC 2012


commit 27ce0d4e60834f422c019cc9d361893e713e1fc9
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Feb 2 13:20:25 2012 +0100

    Rebuilt for Ruby 1.9.3.
    Introduced %check section.

 rubygem-test-spec.spec |   72 ++++++++++++++++++++++++++++--------------------
 1 files changed, 42 insertions(+), 30 deletions(-)
---
diff --git a/rubygem-test-spec.spec b/rubygem-test-spec.spec
index 45b3862..7cef132 100644
--- a/rubygem-test-spec.spec
+++ b/rubygem-test-spec.spec
@@ -1,22 +1,21 @@
-%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname test-spec
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global gem_name test-spec
 
 Summary:        Behaviour Driven Development interface for Test::Unit
-Name:           rubygem-%{gemname}
+Name:           rubygem-%{gem_name}
 Version:        0.10.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Group:          Development/Languages
 License:        Ruby or GPLv2
 URL:            http://test-spec.rubyforge.org
-Source0:        http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
+Source0:        http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:       ruby(abi) = 1.8
-Requires:       rubygems
-BuildRequires:  rubygems
+Requires:       ruby(abi) = 1.9.1
+Requires:       ruby(rubygems)
+Requires:       rubygem(test-unit)
+BuildRequires:  rubygems-devel
+BuildRequires:  rubygem(test-unit)
 BuildArch:      noarch
-Provides:       rubygem(%{gemname}) = %{version}
+Provides:       rubygem(%{gem_name}) = %{version}
 
 %description
 Test/spec layers an RSpec-inspired interface on top of Test::Unit, so you
@@ -33,39 +32,52 @@ should-like syntax.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{gemdir}
-gem install --local --install-dir $RPM_BUILD_ROOT%{gemdir} \
+mkdir -p $RPM_BUILD_ROOT%{gem_dir}
+gem install --local --install-dir $RPM_BUILD_ROOT%{gem_dir} \
             --force --rdoc %{SOURCE0}
 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
-mv $RPM_BUILD_ROOT%{gemdir}/bin/* $RPM_BUILD_ROOT/%{_bindir}
-rmdir $RPM_BUILD_ROOT%{gemdir}/bin
-find $RPM_BUILD_ROOT%{geminstdir}/bin -type f |xargs chmod a+x
+mv $RPM_BUILD_ROOT%{gem_dir}/bin/* $RPM_BUILD_ROOT/%{_bindir}
+rmdir $RPM_BUILD_ROOT%{gem_dir}/bin
+find $RPM_BUILD_ROOT%{gem_instdir}/bin -type f |xargs chmod a+x
+
+# Fix the failures of empty tests handling by allowing to run them.
+pushd %{buildroot}%{gem_instdir}
+sed -i '357d' lib/test/spec.rb
+popd
 
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%check
+pushd %{buildroot}%{gem_instdir}
+bin/specrb -a
+popd
 
 %files
 %defattr(-, root, root, -)
 %{_bindir}/specrb
-%dir %{geminstdir}
-%dir %{geminstdir}/bin
-%attr(0755,root,root) %{geminstdir}/bin/specrb
-%{geminstdir}/lib
-%{geminstdir}/Rakefile
-%doc %{geminstdir}/examples
-%doc %{geminstdir}/test
-%doc %{geminstdir}/README
-%doc %{geminstdir}/SPECS
-%doc %{geminstdir}/ROADMAP
-%doc %{geminstdir}/TODO
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%dir %{gem_instdir}
+%dir %{gem_instdir}/bin
+%attr(0755,root,root) %{gem_instdir}/bin/specrb
+%{gem_libdir}
+%{gem_instdir}/Rakefile
+%doc %{gem_instdir}/examples
+%doc %{gem_instdir}/test
+%doc %{gem_instdir}/README
+%doc %{gem_instdir}/SPECS
+%doc %{gem_instdir}/ROADMAP
+%doc %{gem_instdir}/TODO
+%doc %{gem_docdir}
+%{gem_cache}
+%{gem_spec}
 
 
 %changelog
+* Thu Feb 02 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 0.10.0-5
+- Rebuilt for Ruby 1.9.3.
+- Introduced %%check section.
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list