%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} %global majorver 3.5.4 #%%global preminorver .rc6 %global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||') %global fullver %{majorver}%{?preminorver} %global fedorarel 4 %global gem_name rspec-core # %%check section needs rspec-core, however rspec-core depends on rspec-mocks # runtime part of rspec-mocks does not depend on rspec-core %global need_bootstrap_set 0 Summary: RSpec runner and formatters Name: %{?scl_prefix}rubygem-%{gem_name} Version: %{majorver} Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist} Group: Development/Languages License: MIT URL: http://github.com/rspec/rspec-mocks Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem Source1: rubygem-%{gem_name}-%{version}-full.tar.gz Source2: rspec-related-create-full-tarball.sh # Fix Ruby 2.4 compatibility. # https://github.com/rspec/rspec-core/pull/2363 Patch0: rspec-core-3.5.4-Fixes-for-Ruby-2.4.patch Requires: %{?scl_prefix_ruby}ruby(rubygems) Requires: %{?scl_prefix}rubygem(rspec-support) => 3.5.0 Requires: %{?scl_prefix}rubygem(rspec-support) < 3.6 BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}rubygems-devel %if 0%{?need_bootstrap_set} < 1 BuildRequires: %{?scl_prefix_ruby}rubygem(minitest) BuildRequires: %{?scl_prefix}rubygem(nokogiri) BuildRequires: %{?scl_prefix_ruby}rubygem(rake) BuildRequires: %{?scl_prefix}rubygem(rspec) BuildRequires: %{?scl_prefix}rubygem(aruba) BuildRequires: %{?scl_prefix}rubygem(flexmock) BuildRequires: %{?scl_prefix}rubygem(mocha) BuildRequires: %{?scl_prefix}rubygem(rr) BuildRequires: %{?scl_prefix}rubygem(coderay) BuildRequires: %{?scl_prefix}rubygem(thread_order) BuildRequires: %{?scl_prefix}rubygem(builder) BuildRequires: %{?scl_prefix}rubygem(gherkin) BuildRequires: %{?scl_prefix}rubygem(multi_test) BuildRequires: %{?scl_prefix}rubygem(ffi) BuildRequires: git %endif # Make the following installed by default # lib/rspec/core/rake_task Requires: %{?scl_prefix_ruby}rubygem(rake) # Optional #Requires: %{?scl_prefix}rubygem(ZenTest) Requires: %{?scl_prefix}rubygem(flexmock) Requires: %{?scl_prefix}rubygem(mocha) Requires: %{?scl_prefix}rubygem(rr) BuildArch: noarch Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}-%{release} # Explicitly require runtime subpackage, as long as older scl-utils do not generate it %{?scl:Requires: %{?scl_prefix}runtime} %description Behaviour Driven Development for Ruby. %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} %description doc This package contains documentation for %{pkg_name}. %prep %setup -q -T -n %{gem_name}-%{version} -b 1 %{?scl:scl enable %{scl} - << \EOF} gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec %{?scl:EOF} %patch0 -p1 %build %{?scl:scl enable %{scl} - << \EOF} set -e gem build %{gem_name}.gemspec %gem_install %{?scl:EOF} %install mkdir -p %{buildroot}%{_prefix} cp -a .%{_prefix}/* %{buildroot}%{_prefix}/ # cleanups rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts} %if 0%{?need_bootstrap_set} < 1 %check %{?scl:scl enable %{scl} - << \EOF} set -e LANG=en_US.UTF-8 # Test failure needs investigation... # perhaps due to some incompatibility between libxml2 2.9.x # and rubygem-nokogiri FAILFILE=() FAILTEST=() FAILFILE+=("spec/rspec/core/formatters/progress_formatter_spec.rb") FAILTEST+=("produces the expected full output") FAILFILE+=("spec/rspec/core/formatters/documentation_formatter_spec.rb") FAILTEST+=("produces the expected full output") FAILFILE+=("spec/rspec/core/source/syntax_highlighter_spec.rb") FAILTEST+=("when CodeRay is available") FAILFILE+=("spec/integration/suite_hooks_errors_spec.rb") FAILTEST+=("nicely formats errors") FAILFILE+=("spec/rspec/core/runner_spec.rb") FAILTEST+=("if drb server is started with 127.0.0.1") FAILFILE+=("spec/rspec/core/runner_spec.rb") FAILTEST+=("if drb server is started with localhost") for ((i = 0; i < ${#FAILFILE[@]}; i++)) { sed -i \ -e "\@${FAILTEST[$i]}@s|do$|, :broken => true do|" \ ${FAILFILE[$i]} } ruby -rubygems -Ilib/ -S exe/rspec --tag ~broken %{?scl:EOF} %endif %files %dir %{gem_instdir} %{gem_instdir}/LICENSE.md %doc %{gem_instdir}/Changelog.md %doc %{gem_instdir}/README.md %{_bindir}/rspec %{gem_instdir}/exe/ %{gem_instdir}/lib/ %exclude %{gem_cache} %{gem_spec} %files doc %{gem_docdir} %changelog * Tue Feb 21 2017 Jun Aruga - 3.5.4-4 - Always use full tar.gz for installed files and keep using gem file for gem spec (ref: bug 1425220) * Wed Feb 15 2017 Jun Aruga - 3.5.4-3 - Add "set -e". * Wed Jan 18 2017 Vít Ondruch - 3.5.4-2 - Fix Ruby 2.4 compatibility. * Wed Nov 02 2016 Jun Aruga - 3.5.4-1 - Update to 3.5.4 * Thu Apr 07 2016 Pavel Valena - 3.4.2-6 - Add rubygem-builder to BuildRequires - Add rubygem-gherkin to BuildRequires - Add rubygem-multi_test to BuildRequires - Add rubygem-ffi to BuildRequires * Mon Feb 22 2016 Pavel Valena - 3.4.2-5 - Add missing Requires * Mon Feb 22 2016 Pavel Valena - 3.4.2-4 - Fix rubygem-rake Require prefix * Mon Feb 22 2016 Pavel Valena - 3.4.2-2 - Update to 3.4.2 * Fri Jan 16 2015 Josef Stribny - 2.14.5-1 - Update to 2.14.5 * Fri Mar 21 2014 Vít Ondruch - 2.11.1-4 - Rebuid against new scl-utils to depend on -runtime package. Resolves: rhbz#1069109 * Tue Nov 19 2013 Josef Stribny - 2.11.1-3 - Add missing dist tag. - Resolves: rhbz#967006 * Mon May 20 2013 Josef Stribny - 2.11.1-2 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Tue Jul 24 2012 Bohuslav Kabrda - 2.11.1-1 - Update to Rspec-Core 2.11.1. - Specfile cleanup * Fri Mar 30 2012 Bohuslav Kabrda - 2.8.0-2 - Rebuilt for scl. * Sun Jan 22 2012 Mamoru Tasaka - 2.8.0-1 - 2.8.0 * Sat Jan 14 2012 Fedora Release Engineering - 2.6.4-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Jun 7 2011 Mamoru Tasaka - 2.6.4-1 - 2.6.4 * Wed May 25 2011 Mamoru Tasaka - 2.6.3-1 - 2.6.3 * Tue May 24 2011 Mamoru Tasaka - 2.6.2-2 - Workaround for invalid date format in gemspec file (bug 706914) * Mon May 23 2011 Mamoru Tasaka - 2.6.2-1 - 2.6.2 * Mon May 16 2011 Mamoru Tasaka - 2.6.0-1 - 2.6.0 * Tue May 10 2011 Mamoru Tasaka - 2.6.0-0.2.rc6 - 2.6.0 rc6 * Tue May 3 2011 Mamoru Tasaka - 2.6.0-0.1.rc4 - 2.6.0 rc4 * Sat Feb 26 2011 Mamoru Tasaka - And enable check on rawhide * Sat Feb 26 2011 Mamoru Tasaka - 2.5.1-3 - More cleanups * Tue Feb 22 2011 Mamoru Tasaka - 2.5.1-2 - Some misc fixes * Thu Feb 17 2011 Mamoru Tasaka - 2.5.1-1 - 2.5.1 * Fri Nov 05 2010 Mamoru Tasaka - 2.0.1-1 - Initial package