[rubygem-abstract] Include patch updating to minitest 5
Mo Morsi
mmorsi at fedoraproject.org
Mon Jun 16 17:00:36 UTC 2014
commit 89449d0b7609891d5088032afcc229f4f78c57b0
Author: Mo Morsi <mmorsi at redhat.com>
Date: Mon Jun 16 13:00:04 2014 -0400
Include patch updating to minitest 5
rubygem-abstract.spec | 35 +++++++++++++++++++++++------------
update-minitest.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 12 deletions(-)
---
diff --git a/rubygem-abstract.spec b/rubygem-abstract.spec
index 4886895..71c08dd 100644
--- a/rubygem-abstract.spec
+++ b/rubygem-abstract.spec
@@ -5,11 +5,14 @@
Summary: Allows you to define an abstract method in Ruby
Name: rubygem-%{gem_name}
Version: 1.0.0
-Release: 10%{?dist}
+Release: 11%{?dist}
Group: Development/Languages
License: GPLv2 or Ruby
URL: http://rubyforge.org/projects/abstract
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
+
+Patch0: update-minitest.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(rubygems)
Requires: ruby(release)
@@ -32,13 +35,25 @@ Requires: %{name} = %{version}-%{release}
This package contains documentation for %{name}.
%prep
-%setup -q -c -T
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n %{gem_name}-%{version}
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+%patch0
%build
-%gem_install -n %{SOURCE0}
+gem build %{gem_name}.gemspec
+
+%gem_install
+
+%check
+pushd .%{gem_instdir}
+ruby -Ilib test/test.rb
+popd
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
@@ -48,14 +63,6 @@ rm -f %{buildroot}%{gem_instdir}/abstract.gemspec
# And we install via gem
rm -f %{buildroot}%{gem_instdir}/setup.rb
-%clean
-rm -rf %{buildroot}
-
-%check
-pushd .%{gem_instdir}
-ruby test/test.rb
-popd
-
%files
%defattr(-,root,root,-)
%doc %{gem_instdir}/README.txt
@@ -71,6 +78,10 @@ popd
%{gem_docdir}
%changelog
+* Mon Jun 16 2014 Mo Morsi <mmorsi at redhat.com>- 1.0.0-11
+- Incorporate patch updating test suite to minitest 5
+- Update spec to comply w/ latest guidelines
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/update-minitest.patch b/update-minitest.patch
new file mode 100644
index 0000000..ab46000
--- /dev/null
+++ b/update-minitest.patch
@@ -0,0 +1,45 @@
+--- test/test.rb.orig 2014-06-16 12:46:38.416531306 -0400
++++ test/test.rb 2014-06-16 12:47:22.070717084 -0400
+@@ -9,7 +9,7 @@ libdir = File.dirname(testdir) + "/lib"
+ $: << libdir
+
+
+-require 'test/unit'
++require 'minitest/autorun'
+ require 'abstract'
+
+
+@@ -26,11 +26,11 @@ end
+
+
+
+-class AbstractTest < Test::Unit::TestCase
++class AbstractTest < MiniTest::Test
+
+
+ def _test(obj)
+- assert_raise(NotImplementedError) do
++ assert_raises(NotImplementedError) do
+ begin
+ obj = Foo.new
+ obj.m1 'a'
+@@ -44,8 +44,8 @@ class AbstractTest < Test::Unit::TestCas
+
+ def test_abstract_method1
+ obj = Foo.new
+- assert_raise(NotImplementedError) { obj.m1 'a' }
+- assert_raise(NotImplementedError) { obj.m2 'a', 'b' }
++ assert_raises(NotImplementedError) { obj.m1 'a' }
++ assert_raises(NotImplementedError) { obj.m2 'a', 'b' }
+ end
+
+
+@@ -62,7 +62,7 @@ class AbstractTest < Test::Unit::TestCas
+
+ def test_not_implemented1
+ obj = Bar.new
+- assert_raise(NotImplementedError) { obj.m1 123 }
++ assert_raises(NotImplementedError) { obj.m1 123 }
+ end
+
+
More information about the scm-commits
mailing list