71 lines
1.8 KiB
RPMSpec
71 lines
1.8 KiB
RPMSpec
|
|
%global gem_name typhoeus
|
||
|
|
Name: rubygem-%{gem_name}
|
||
|
|
Version: 1.0.2
|
||
|
|
Release: 1
|
||
|
|
Summary: Parallel HTTP library on top of libcurl multi
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/typhoeus/typhoeus
|
||
|
|
Source0: https://rubygems.org/gems/typhoeus-%{version}.gem
|
||
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(ethon) >= 0.7.0 rubygem(faraday)
|
||
|
|
BuildRequires: rubygem(rack) rubygem(rspec) rubygem(sinatra)
|
||
|
|
BuildArch: noarch
|
||
|
|
%description
|
||
|
|
Like a modern code version of the mythical beast with 100 serpent heads,
|
||
|
|
Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
|
||
|
|
logic.
|
||
|
|
|
||
|
|
%package doc
|
||
|
|
Summary: Documentation for %{name}
|
||
|
|
Requires: %{name} = %{version}-%{release}
|
||
|
|
BuildArch: noarch
|
||
|
|
%description doc
|
||
|
|
Documentation for %{name}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -c -T
|
||
|
|
%gem_install -n %{SOURCE0}
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{gem_dir}
|
||
|
|
cp -a .%{gem_dir}/* \
|
||
|
|
%{buildroot}%{gem_dir}/
|
||
|
|
for f in $(find %{buildroot}%{gem_instdir} -name \*.rb)
|
||
|
|
do
|
||
|
|
sed -i -e '/^#!/d' $f
|
||
|
|
chmod 0644 $f
|
||
|
|
done
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{gem_instdir}
|
||
|
|
sed -i -e '/require "bundler"/ s/^/#/' \
|
||
|
|
-e '/Bundler\.setup/ s/^/#/' spec/spec_helper.rb
|
||
|
|
rspec spec
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%dir %{gem_instdir}
|
||
|
|
%{gem_libdir}
|
||
|
|
%exclude %{gem_instdir}/.*
|
||
|
|
%license %{gem_instdir}/LICENSE
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%{gem_spec}
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
||
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
||
|
|
%{gem_instdir}/Gemfile
|
||
|
|
%doc %{gem_instdir}/README.md
|
||
|
|
%{gem_instdir}/Guardfile
|
||
|
|
%{gem_instdir}/Rakefile
|
||
|
|
%doc %{gem_instdir}/UPGRADE.md
|
||
|
|
%{gem_instdir}/perf
|
||
|
|
%{gem_instdir}/spec
|
||
|
|
%{gem_instdir}/typhoeus.gemspec
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Sat Aug 8 2020 yanan li <liyanan032@huawei.com> - 1.0.2-1
|
||
|
|
- Package init
|