diff --git a/rubygem-rdiscount.spec b/rubygem-rdiscount.spec index 8889cfe..1dd52ae 100644 --- a/rubygem-rdiscount.spec +++ b/rubygem-rdiscount.spec @@ -3,17 +3,14 @@ Summary: Fast Implementation of Gruber's Markdown in C Name: rubygem-%{gem_name} Version: 2.1.7 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Languages License: ASL 1.1 URL: http://github.com/rtomayko/rdiscount Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -Requires: ruby(release) -Requires: ruby(rubygems) BuildRequires: rubygems-devel BuildRequires: ruby-devel BuildRequires: rubygem(minitest) -Provides: rubygem(%{gem_name}) = %{version} %package doc @@ -46,12 +43,12 @@ rm -rf %{buildroot} mkdir -p %{buildroot}%{gem_dir} mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_mandir}/man7 -mkdir -p %{buildroot}%{gem_extdir_mri}/lib/ +mkdir -p %{buildroot}%{gem_extdir_mri} mv .%{gem_instdir}/man/rdiscount.1 %{buildroot}%{_mandir}/man1 mv .%{gem_instdir}/man/markdown.7 %{buildroot}%{_mandir}/man7 cp -a .%{gem_dir}/* %{buildroot}%{gem_dir} rm -rf %{buildroot}%{gem_instdir}/ext -mv %{buildroot}%{gem_libdir}/rdiscount.so %{buildroot}%{gem_extdir_mri}/lib/ +cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/ mkdir -p %{buildroot}/%{_bindir} mv .%{_bindir}/* %{buildroot}/%{_bindir} @@ -61,11 +58,20 @@ rm -rf %{buildroot} %check pushd .%{gem_instdir} -testrb test/*_test.rb + +# Run test suite against Minitest 5.x needs some hacks. +# TODO: Upstream these changes if possible. +sed -i "/test\/unit/ s/^/#/" test/*.rb +# assert_nothing_raised is not supported by minitest. +sed -i "/assert_nothing_raised/ s/^/#/" test/*.rb +ruby -rminitest/autorun -I$(dirs +1)%{gem_extdir_mri} - << \EOF + Test = Minitest + Minitest::Test.send :alias_method, :assert_not_equal, :refute_equal + Dir.glob "./test/*_test.rb", &method(:require) +EOF popd %files -%defattr(-, root, root, -) %{_bindir}/rdiscount %dir %{gem_instdir} %{gem_instdir}/bin/ @@ -73,7 +79,7 @@ popd %doc %{gem_instdir}/BUILDING %doc %{gem_instdir}/COPYING %doc %{gem_instdir}/README.markdown -%{gem_cache} +%exclude %{gem_cache} %{gem_spec} %{gem_extdir_mri}/ %{_mandir}/man1/rdiscount.1.gz @@ -82,7 +88,6 @@ popd #-- %files doc -%defattr(-, root, root, -) %doc %{gem_instdir}/Rakefile %{gem_docdir} %{gem_instdir}/man @@ -91,6 +96,9 @@ popd %changelog +* Thu Apr 17 2014 Vít Ondruch - 2.1.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 + * Thu Feb 20 2014 Gerd Pokorra - 2.1.7-1 - Update to 2.1.7