%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} %global gem_name multi_test %{?_with_bootstrap: %global bootstrap 1} Name: %{?scl_prefix}rubygem-%{gem_name} Version: 0.1.2 Release: 3%{?dist} Summary: Wafter-thin gem to disable autorun of various testing libraries Group: Development/Languages License: MIT URL: http://cukes.info Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: %{?scl_prefix_ruby}ruby(release) Requires: %{?scl_prefix_ruby}ruby(rubygems) BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}rubygems-devel BuildRequires: %{?scl_prefix_ruby}ruby # Each unit tests depends on the condition of installed # of minitest, rspec and test-unit # Run tests for one condition (minitest only is installed). %if ! 0%{?bootstrap} BuildRequires: %{?scl_prefix}rubygem(activesupport) %endif BuildRequires: %{?scl_prefix_ruby}rubygem(minitest) BuildArch: noarch Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} # Explicitly require runtime subpackage, as long as older scl-utils do not generate it %{?scl:Requires: %{?scl_prefix}runtime} %description multi_test gives a uniform interface onto whatever testing library has been loaded into a running Ruby process. It can be used to clobber autorun behaviour from older versions of Test::Unit that automatically hook in when the user requires them. %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{pkg_name}. %prep %{?scl:scl enable %{scl} - << \EOF} set -e gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -e gem build %{gem_name}.gemspec %gem_install %{?scl:EOF} %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %if ! 0%{?bootstrap} %check pushd .%{gem_instdir} # Disable the test depends on bundler. mv test/scenarios/bundler_require.rb{,.disabled} # Disable the test for rspec mv test/scenarios/rspec_matchers.rb{,.disabled} mv test/scenarios/spec_matchers.rb{,.disabled} # Disable the test for test-unit mv test/scenarios/require_test_unit.rb{,.disabled} mv test/scenarios/test_unit_assertions.rb{,.disabled} %{?scl:scl enable %{scl} - << \EOF} ruby -Ilib -e 'Dir.glob "./test/scenarios/*.rb", &method(:require)' %{?scl:EOF} popd %endif %files # There is no %%license macro on RHEL6. # https://bugzilla.redhat.com/show_bug.cgi?id=1386246 %{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %exclude %{gem_instdir}/.travis.yml %license %{gem_instdir}/LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/History.md %doc %{gem_instdir}/README.md %{gem_instdir}/Makefile %{gem_instdir}/Rakefile # This is not the original file => makes no sense to ship it. %exclude %{gem_instdir}/%{gem_name}.gemspec %{gem_instdir}/test %changelog * Thu Feb 02 2017 Jun Aruga - 0.1.2-3 - Enable tests * Wed Apr 06 2016 Pavel Valena - 0.1.2-2 - Add scl macros * Wed Apr 06 2016 Vít Ondruch - 0.1.2-1 - Update to multi_test 0.1.2. * Thu Feb 04 2016 Fedora Release Engineering - 0.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Jun 18 2014 Josef Stribny - 0.1.1-1 - Initial package