diff options
author | Ken Dreyer <ktdreyer@ktdreyer.com> | 2015-03-28 10:47:58 -0600 |
---|---|---|
committer | Ken Dreyer <ktdreyer@ktdreyer.com> | 2015-03-28 10:48:15 -0600 |
commit | f8c7a14be428b1c77c517fe1b3d906e4473f7144 (patch) | |
tree | 0401671f66921f8355f45a43981739126423624c | |
parent | 3b7c43c62eaebfc0fd0fcc11b788891497a4a1a8 (diff) | |
download | rubygem-rinku-f8c7a14be428b1c77c517fe1b3d906e4473f7144.tar.gz rubygem-rinku-f8c7a14be428b1c77c517fe1b3d906e4473f7144.tar.xz rubygem-rinku-f8c7a14be428b1c77c517fe1b3d906e4473f7144.zip |
misc pkg updates (RHBZ #1062049)
- Drop Fedora 19 conditionals
- Remove extraneous BR: ruby. This is covered by BR: ruby-devel.
- Patch for Minitest 5
- Use %license macro
-rw-r--r-- | rinku-1.7.3-minitest.patch | 45 | ||||
-rw-r--r-- | rubygem-rinku.spec | 31 |
2 files changed, 69 insertions, 7 deletions
diff --git a/rinku-1.7.3-minitest.patch b/rinku-1.7.3-minitest.patch new file mode 100644 index 0000000..7aaaa50 --- /dev/null +++ b/rinku-1.7.3-minitest.patch @@ -0,0 +1,45 @@ +From b073cde3218bcb03ad9af804dafe8730101f743d Mon Sep 17 00:00:00 2001 +From: Ken Dreyer <ktdreyer@ktdreyer.com> +Date: Sat, 28 Mar 2015 09:33:12 -0600 +Subject: [PATCH] fedora: tests: switch to minitest 5 + +Ruby 1.9+ uses Minitest as the backend for Test::Unit, so we might as +well update to the Minitest 5 API. + +This is a Fedora-only patch; the patch for upstream alters the gemspec +as well: https://github.com/vmg/rinku/pull/48 +--- + test/autolink_test.rb | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/autolink_test.rb b/test/autolink_test.rb +index 27c9a52..7eca6d0 100644 +--- a/test/autolink_test.rb ++++ b/test/autolink_test.rb +@@ -2,12 +2,12 @@ + rootdir = File.dirname(File.dirname(__FILE__)) + $LOAD_PATH.unshift "#{rootdir}/lib" + +-require 'test/unit' ++require 'minitest/autorun' + require 'cgi' + require 'uri' + require 'rinku' + +-class RedcarpetAutolinkTest < Test::Unit::TestCase ++class RedcarpetAutolinkTest < Minitest::Test + + SAFE_CHARS = "{}[]~'" + +@@ -34,7 +34,7 @@ class RedcarpetAutolinkTest < Test::Unit::TestCase + assert_equal Rinku.auto_link(url), url + + Rinku.skip_tags = nil +- assert_not_equal Rinku.auto_link(url), url ++ refute_equal Rinku.auto_link(url), url + end + + def test_auto_link_with_single_trailing_punctuation_and_space +-- +1.9.3 + diff --git a/rubygem-rinku.spec b/rubygem-rinku.spec index d75551d..66b98d5 100644 --- a/rubygem-rinku.spec +++ b/rubygem-rinku.spec @@ -2,19 +2,25 @@ Name: rubygem-%{gem_name} Version: 1.7.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Autolinking for Ruby Group: Development/Languages License: ISC URL: https://github.com/vmg/rinku Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# Minitest 5 compat +# https://github.com/vmg/rinku/pull/48 +Patch0: rinku-1.7.3-minitest.patch +%if 0%{?fc20} || 0%{?el7} Requires: ruby Requires: ruby(rubygems) -BuildRequires: ruby +%endif BuildRequires: rubygems-devel BuildRequires: ruby-devel BuildRequires: rubygem(minitest) +%if 0%{?fc20} || 0%{?el7} Provides: rubygem(%{gem_name}) = %{version} +%endif %description A fast and very smart autolinking library that acts as a drop-in replacement @@ -28,7 +34,7 @@ Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc -Documentation for %{name} +Documentation for %{name}. %prep gem unpack %{SOURCE0} @@ -37,6 +43,10 @@ gem unpack %{SOURCE0} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +# Minitest 5 compat +# https://github.com/vmg/rinku/pull/48 +%patch0 -p1 + # Remove unnecessary Rakefile rm Rakefile sed -i "s|\"Rakefile\",||g" %{gem_name}.gemspec @@ -52,14 +62,14 @@ rm .%{gem_instdir}/%{gem_name}.gemspec %install mkdir -p %{buildroot}%{gem_dir} -cp -pa .%{gem_dir}/* \ - %{buildroot}%{gem_dir}/ +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ # Remove deprecated "ext" directory rm -r %{buildroot}%{gem_instdir}/ext # Move the binary extension -%if 0%{?fc19} || 0%{?fc20} +%if 0%{?fc20} install -d -m0755 %{buildroot}%{gem_extdir_mri}/lib # move the extension to gem_extdir_mri mv %{buildroot}%{gem_libdir}/rinku.so %{buildroot}%{gem_extdir_mri}/lib/ @@ -75,8 +85,9 @@ pushd .%{gem_instdir} popd %files +%{!?_licensedir:%global license %%doc} %dir %{gem_instdir} -%doc %{gem_instdir}/COPYING +%license %{gem_instdir}/COPYING %doc %{gem_instdir}/README.markdown %{gem_libdir} %{gem_extdir_mri} @@ -88,6 +99,12 @@ popd %exclude %{gem_instdir}/test %changelog +* Sat Mar 28 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.7.3-3 +- Drop Fedora 19 conditionals +- Remove extraneous BR: ruby. This is covered by BR: ruby-devel. +- Patch for Minitest 5 +- Use %%license macro + * Thu Jul 10 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.7.3-2 - Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1 |