2020-08-25 15:03:37 +08:00
|
|
|
%global gem_name contracts
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 0.16.0
|
2022-02-22 09:37:48 +08:00
|
|
|
Release: 2
|
2020-08-25 15:03:37 +08:00
|
|
|
Summary: Contracts for Ruby
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://egonschiele.github.io/contracts.ruby/
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
2022-02-22 09:37:48 +08:00
|
|
|
Patch1: rubygem-contracts-0.16.0-0001-Don-t-use-exceptions-for-control-flow.patch
|
|
|
|
|
Patch2: rubygem-contracts-0.16.0-0002-Update-spec-to-specify-error-class-to-suppress-RSpec.patch
|
|
|
|
|
Patch3: rubygem-contracts-0.16.0-0003-Fix-misspellings-in-comments.patch
|
|
|
|
|
Patch4: rubygem-contracts-0.16.0-0004-Wrapping-blocks-only-when-there-is-a-Func-check.-bug.patch
|
|
|
|
|
Patch5: rubygem-contracts-0.16.0-0005-Update-implementation-spec-to-be-3.0-compatible.patch
|
2020-08-25 15:03:37 +08:00
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) >= 3
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
This library provides contracts for Ruby. Contracts let you clearly express
|
|
|
|
|
how your code behaves, and free you from writing tons of boilerplate,
|
|
|
|
|
defensive code.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
gem unpack %{SOURCE0}
|
|
|
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
2022-02-22 09:37:48 +08:00
|
|
|
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
%patch4 -p1
|
|
|
|
|
%patch5 -p1
|
|
|
|
|
|
2020-08-25 15:03:37 +08:00
|
|
|
gem spec %{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_cache}
|
|
|
|
|
pushd %{buildroot}%{gem_instdir}
|
|
|
|
|
rm -rf \
|
|
|
|
|
.[^.]* \
|
|
|
|
|
Gemfile \
|
|
|
|
|
Rakefile \
|
|
|
|
|
*gemspec \
|
|
|
|
|
*yml \
|
|
|
|
|
features/ \
|
|
|
|
|
script/ \
|
|
|
|
|
spec/ \
|
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
rspec spec/
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%license %{gem_instdir}/LICENSE
|
|
|
|
|
%doc %{gem_instdir}/CHANGELOG.markdown
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%doc %{gem_instdir}/TODO.markdown
|
|
|
|
|
%doc %{gem_instdir}/TUTORIAL.md
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%{gem_instdir}/benchmarks/
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-02-22 09:37:48 +08:00
|
|
|
* Tue Feb 22 2022 chenchen <chen_aka_jan@163.com> - 0.16.0-2
|
|
|
|
|
- fix build error by upgrading to ruby3
|
|
|
|
|
|
2020-08-25 15:03:37 +08:00
|
|
|
* Tue Aug 18 2020 wanglin <wanglin175@huawei.com> - 0.16.0-1
|
|
|
|
|
- package init
|