[rubygem-rubypants] Patch for Minitest 5 (RHBZ #1107230)

Ken Dreyer ktdreyer at fedoraproject.org
Wed Jul 2 22:59:23 UTC 2014


commit e5686b96b7eee26d4217860e972df18c23002f53
Author: Ken Dreyer <ktdreyer at ktdreyer.com>
Date:   Wed Jul 2 16:57:32 2014 -0600

    Patch for Minitest 5 (RHBZ #1107230)
    
    - Update upstream gem's primary author name when writing gemspec

 rubygem-rubypants-0.2.0-minitest.patch |   15 +++++++++++++++
 rubygem-rubypants.spec                 |   19 ++++++++++++++++---
 2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/rubygem-rubypants-0.2.0-minitest.patch b/rubygem-rubypants-0.2.0-minitest.patch
new file mode 100644
index 0000000..f47115f
--- /dev/null
+++ b/rubygem-rubypants-0.2.0-minitest.patch
@@ -0,0 +1,15 @@
+--- a/test_rubypants.rb	2014-07-02 16:53:43.404930638 -0600
++++ b/test_rubypants.rb	2014-07-02 16:54:03.586897041 -0600
+@@ -1,10 +1,10 @@
+-require 'test/unit'
++require 'minitest/autorun'
+ require 'rubypants'
+ 
+ # Test EVERYTHING against SmartyPants.pl output!
+ 
+ 
+-class TestRubyPants < Test::Unit::TestCase
++class TestRubyPants < Minitest::Test
+   def assert_rp_equal(str, orig, options=[2])
+     assert_equal orig, RubyPants.new(str, options).to_html
+   end
diff --git a/rubygem-rubypants.spec b/rubygem-rubypants.spec
index 2b3b97c..120358d 100644
--- a/rubygem-rubypants.spec
+++ b/rubygem-rubypants.spec
@@ -2,19 +2,26 @@
 
 Name: rubygem-%{gem_name}
 Version: 0.2.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Ruby port of the smart-quotes library SmartyPants
 Group: Development/Languages
 License: BSD
 URL: https://github.com/jmcnevin/rubypants
 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Minitest 5 support
+# https://github.com/jmcnevin/rubypants/pull/3
+Patch0: rubygem-rubypants-0.2.0-minitest.patch
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
 Requires: ruby(release)
 Requires: ruby(rubygems)
+%endif
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(minitest)
 BuildArch: noarch
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
 Provides: rubygem(%{gem_name}) = %{version}
+%endif
 
 %description
 RubyPants is a Ruby port of the smart-quotes library SmartyPants.  The
@@ -41,9 +48,11 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 
 # New versions of rubygems make the "author" field mandatory
 sed '/s.email/ i\
-  s.author = "Christian Neukirchen"' -i %{gem_name}.gemspec
+  s.author = "Jeremy McNevin"' -i %{gem_name}.gemspec
 
-cat %{gem_name}.gemspec
+# Minitest 5 support
+# https://github.com/jmcnevin/rubypants/pull/3
+%patch0 -p1
 
 %build
 # Create the gem as gem install only works on a gem file
@@ -80,6 +89,10 @@ popd
 %exclude %{gem_instdir}/test_rubypants.rb
 
 %changelog
+* Wed Jul 02 2014 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.2.0-3
+- Patch for Minitest 5 (RHBZ #1107230)
+- Update upstream gem's primary author name when writing gemspec
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list