!1 init rubygem-rspec2-mocks packsge
Merge pull request !1 from PokeHuang/master
This commit is contained in:
commit
3f8b0d0cb2
BIN
rspec-mocks-2.14.6.gem
Normal file
BIN
rspec-mocks-2.14.6.gem
Normal file
Binary file not shown.
72
rubygem-rspec2-mocks.spec
Normal file
72
rubygem-rspec2-mocks.spec
Normal file
@ -0,0 +1,72 @@
|
||||
%global majorver 2.14.6
|
||||
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
||||
%global fullver %{majorver}%{?preminorver}
|
||||
%global gem_name rspec-mocks
|
||||
%global rpmgem_name rspec2-mocks
|
||||
%global need_bootstrap_set 0
|
||||
Summary: Rspec 2 doubles (mocks and stubs)
|
||||
Name: rubygem-%{rpmgem_name}
|
||||
Version: %{majorver}
|
||||
Release: 1
|
||||
License: MIT
|
||||
URL: http://github.com/rspec/rspec-mocks
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
||||
BuildRequires: ruby(release) rubygems-devel
|
||||
%if 0%{?need_bootstrap_set} < 1
|
||||
BuildRequires: rubygem(rspec2)
|
||||
%endif
|
||||
Provides: rubygem(%{rpmgem_name}) = %{version}-%{release}
|
||||
Obsoletes: rubygem-rspec-mocks < 2.14.6-1
|
||||
BuildArch: noarch
|
||||
%description
|
||||
rspec-mocks provides a test-double framework for Rspec including support
|
||||
for method stubs, fakes, and message expectations.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Obsoletes: rubygem-rspec-mocks-doc < %{version}-{release}
|
||||
%description doc
|
||||
This package contains documentation for %{name}.
|
||||
|
||||
%prep
|
||||
gem unpack %{SOURCE0}
|
||||
%setup -q -D -T -n %{gem_name}-%{version}
|
||||
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_set} < 1
|
||||
|
||||
%check
|
||||
pushd .%{gem_instdir}
|
||||
sed -i.yaml spec/rspec/mocks/serialization_spec.rb \
|
||||
-e '\@::YAML::ENGINE.yamler@d'
|
||||
sed -i.toplevel spec/rspec/mocks/mutate_const_spec.rb \
|
||||
-e '\@expect.TestClass::Hash.@d'
|
||||
ruby -rrubygems -Ilib/ -S rspec2 spec/
|
||||
%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
|
||||
* Wed Aug 19 2020 huangyangke <huangyangke@huawei.com> - %{majorver}-1
|
||||
- package init
|
||||
4
rubygem-rspec2-mocks.yaml
Normal file
4
rubygem-rspec2-mocks.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: rspec/rspec-mocks
|
||||
tag_prefix: "^v"
|
||||
separator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user