2020-08-25 14:43:59 +08:00
|
|
|
%global majorver 2.14.5
|
|
|
|
|
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
|
|
|
|
%global fullver %{majorver}%{?preminorver}
|
|
|
|
|
%global gem_name rspec-expectations
|
|
|
|
|
%global rpmgem_name rspec2-expectations
|
|
|
|
|
%global gem_minitest rubygem(minitest4)
|
|
|
|
|
%global need_bootstrap_set 0
|
|
|
|
|
%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
|
|
|
|
|
Summary: Rspec 2 expectations (should and matchers)
|
|
|
|
|
Name: rubygem-%{rpmgem_name}
|
|
|
|
|
Version: %{majorver}
|
2023-01-17 10:48:45 +08:00
|
|
|
Release: 2
|
2020-08-25 14:43:59 +08:00
|
|
|
License: MIT
|
|
|
|
|
URL: http://github.com/rspec/rspec-expectations
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
|
|
|
|
# Backport temporarily be_truthy matchers and so on
|
|
|
|
|
Patch0: rubygem-rspec-expectations-2.14.5-be_truthy-alias.patch
|
|
|
|
|
# Test suite fix for ruby24 wrt integer unification
|
|
|
|
|
Patch1: rubygem-rspec-expectations-2.14.5-ruby24.patch
|
2023-01-17 10:48:45 +08:00
|
|
|
Patch2: 0001-fix-NameError-compare-failure.patch
|
2020-08-26 14:36:19 +08:00
|
|
|
BuildRequires: ruby(release) rubygems-devel
|
2020-08-25 14:43:59 +08:00
|
|
|
%if 0%{?need_bootstrap} < 1
|
2020-08-26 14:36:19 +08:00
|
|
|
BuildRequires: rubygem(rspec2) %gem_minitest rubygem(test-unit)
|
2020-08-25 14:43:59 +08:00
|
|
|
%endif
|
2020-08-26 14:36:19 +08:00
|
|
|
Provides: rubygem(%{rpmgem_name}) = %{version}-%{release}
|
|
|
|
|
Obsoletes: rubygem-rspec-expectations < 2.14.5-1
|
|
|
|
|
BuildArch: noarch
|
2020-08-25 14:43:59 +08:00
|
|
|
%description
|
|
|
|
|
rspec-expectations adds `should` and `should_not` to every object and includes
|
|
|
|
|
RSpec::Matchers, a library of standard matchers.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
2020-08-26 14:36:19 +08:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Obsoletes: rubygem-rspec-expectations-doc < %{version}-%{release}
|
2020-08-25 14:43:59 +08:00
|
|
|
%description doc
|
|
|
|
|
This package contains documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
gem unpack %{SOURCE0}
|
|
|
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
|
|
%patch0 -p2
|
|
|
|
|
%patch1 -p1
|
2023-01-17 10:48:45 +08:00
|
|
|
%patch2 -p1
|
2020-08-25 14:43:59 +08:00
|
|
|
sed -i -e "s@\(require 'test/unit'\)@gem 'minitest', '~> 4' ;\1@" \
|
|
|
|
|
spec/spec_helper.rb
|
|
|
|
|
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build %{gem_name}.gemspec
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
rm -f %{buildroot}%{gem_instdir}/{.document,.gitignore,.travis.yml,.yardopts}
|
|
|
|
|
%if 0%{?need_bootstrap} < 1
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
LANG=C.UTF-8
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
ruby -rrubygems -Ilib/ -S rspec2 spec/
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%license %{gem_instdir}/License.txt
|
|
|
|
|
%doc %{gem_instdir}/*.md
|
|
|
|
|
%{gem_instdir}/lib/
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%{gem_docdir}
|
|
|
|
|
%{gem_instdir}/features/
|
|
|
|
|
%exclude %{gem_instdir}/spec/
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-01-17 10:48:45 +08:00
|
|
|
* Tue Jan 17 2023 Ge Wang <wangge20@h-partners.com> - %{majorver}-2
|
|
|
|
|
- fix NameError compare failure
|
|
|
|
|
|
2020-08-25 14:43:59 +08:00
|
|
|
* Wed Aug 19 2020 huangyangke <huangyangke@huawei.com> - %{majorver}-1
|
|
|
|
|
- package init
|