78 lines
2.2 KiB
RPMSpec
78 lines
2.2 KiB
RPMSpec
%bcond_with bootstrap
|
|
%global gem_name webmock
|
|
Name: rubygem-%{gem_name}
|
|
Version: 3.5.1
|
|
Release: 2
|
|
Summary: Library for stubbing HTTP requests in Ruby
|
|
License: MIT
|
|
URL: http://github.com/bblimke/webmock
|
|
Source0: https://rubygems.org/gems/webmock-%{version}.gem
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(addressable) rubygem(crack)
|
|
BuildRequires: rubygem(curb) rubygem(excon) rubygem(hashdiff) rubygem(httpclient)
|
|
BuildRequires: rubygem(minitest) rubygem(rack) rubygem(rspec) rubygem(test-unit)
|
|
BuildRequires: rubygem(typhoeus)
|
|
BuildArch: noarch
|
|
%description
|
|
WebMock allows stubbing HTTP requests and setting expectations on HTTP
|
|
requests.
|
|
|
|
%package help
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
Provides: %{name}-doc = %{version}-%{release}
|
|
Obsoletes: %{name}-doc < %{version}-%{release}
|
|
%description help
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{gem_name}-%{version}
|
|
sed -i '/^#!\/usr\/bin\/env\ rake/ d' Rakefile
|
|
chmod -x Rakefile
|
|
|
|
%build
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
%gem_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
cp -a .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
%if %{with bootstrap}
|
|
%check
|
|
pushd .%{gem_instdir}
|
|
ruby -e 'Dir.glob "./minitest/**/*.rb", &method(:require)'
|
|
ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
|
|
sed -i '/patron/ s/^/#/' spec/spec_helper.rb
|
|
sed -i '/em-http/ s/^/#/' spec/spec_helper.rb
|
|
rspec spec --exclude-pattern 'spec/{quality_spec.rb,acceptance/{patron,http_rb,em_http_request}/*}'
|
|
popd
|
|
%endif
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%exclude %{gem_instdir}/.*
|
|
%license %{gem_instdir}/LICENSE
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
|
|
%files help
|
|
%doc %{gem_docdir}
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
|
%{gem_instdir}/Gemfile
|
|
%doc %{gem_instdir}/README.md
|
|
%{gem_instdir}/Rakefile
|
|
%{gem_instdir}/minitest
|
|
%{gem_instdir}/spec
|
|
%{gem_instdir}/test
|
|
%{gem_instdir}/webmock.gemspec
|
|
|
|
%changelog
|
|
* Sat Sep 5 2020 liyanan <liyanan32@huawei.com> - 3.5.1-2
|
|
- fix build fail
|
|
|
|
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 3.5.1-1
|
|
- package init
|