rubygem-webmock/rubygem-webmock.spec

78 lines
2.2 KiB
RPMSpec
Raw Permalink Normal View History

2020-09-05 18:47:37 +08:00
%bcond_with bootstrap
2020-08-20 15:36:47 +08:00
%global gem_name webmock
Name: rubygem-%{gem_name}
2023-11-14 14:30:43 +08:00
Version: 3.18.1
Release: 1
2020-08-20 15:36:47 +08:00
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.
2020-08-24 15:34:40 +08:00
%package help
2020-08-20 15:36:47 +08:00
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
2020-08-24 15:34:40 +08:00
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
%description help
2020-08-20 15:36:47 +08:00
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
2020-09-05 18:47:37 +08:00
%if %{with bootstrap}
2020-08-20 15:36:47 +08:00
%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
2023-11-14 14:30:43 +08:00
rspec spec --exclude-pattern 'spec/{quality_spec.rb,acceptance/{async_http_client,patron,http_rb}/*}'
2020-08-20 15:36:47 +08:00
popd
2020-09-05 18:47:37 +08:00
%endif
2020-08-20 15:36:47 +08:00
%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
2020-08-24 15:34:40 +08:00
%files help
2020-08-20 15:36:47 +08:00
%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
2023-11-14 14:30:43 +08:00
* Tue Nov 14 2023 liyanan <liyanan61@h-partners.com> - 3.18.1-1
- Update to 3.18.1
2020-09-05 18:47:37 +08:00
* Sat Sep 5 2020 liyanan <liyanan32@huawei.com> - 3.5.1-2
- fix build fail
2020-08-24 15:34:40 +08:00
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 3.5.1-1
- package init