[rubygem-colored/f21] Fix FTBFS in Rawhide (rhbz#1107090).

Vít Ondruch vondruch at fedoraproject.org
Tue Jul 15 10:41:03 UTC 2014


commit 8a508892930a5eb89fa5b075e9502947f691a5ce
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Tue Jul 15 12:40:32 2014 +0200

    Fix FTBFS in Rawhide (rhbz#1107090).

 rubygem-colored.spec |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/rubygem-colored.spec b/rubygem-colored.spec
index a3c268a..c64f737 100644
--- a/rubygem-colored.spec
+++ b/rubygem-colored.spec
@@ -4,20 +4,16 @@
 Summary: Extends ruby string class in order to colorize terminal output
 Name: rubygem-%{gem_name}
 Version: 1.2
-Release: 8%{?dist}
+Release: 9%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://github.com/defunkt/colored
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
-Requires: ruby(release)
-Requires: ruby(rubygems)
-Requires: ruby
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: ruby
-BuildRequires: rubygem-minitest
+BuildRequires: rubygem(minitest)
 BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 Rubygem extending the ruby string class to include methods that generates
@@ -45,7 +41,21 @@ cp -a .%{gem_dir}/* \
 
 %check
 pushd ./%{gem_instdir}
-testrb -Ilib test/colored_test.rb
+# Run the tests using minitest 5.
+ruby -rminitest/autorun - << \EOF
+  module Kernel
+    alias orig_require require
+    remove_method :require
+
+    def require path
+      orig_require path unless path == 'test/unit'
+    end
+  end
+
+  Test = Minitest
+
+  Dir.glob "./test/**/*_test.rb", &method(:require)
+EOF
 popd
 
 
@@ -53,7 +63,7 @@ popd
 %dir %{gem_instdir}
 %{gem_libdir}
 %{gem_spec}
-%{gem_cache}
+%exclude %{gem_cache}
 %{gem_instdir}/LICENSE
 
 %files doc
@@ -63,6 +73,9 @@ popd
 %{gem_instdir}/test/
 
 %changelog
+* Tue Jul 15 2014 Vít Ondruch <vondruch at redhat.com> - 1.2-9
+- Fix FTBFS in Rawhide (rhbz#1107090).
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list