commit
d7b3765b70
BIN
httpclient-2.8.0.gem
Normal file
BIN
httpclient-2.8.0.gem
Normal file
Binary file not shown.
72
rubygem-httpclient.spec
Normal file
72
rubygem-httpclient.spec
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
%global gem_name httpclient
|
||||||
|
%global rubyabi 1.8
|
||||||
|
Summary: HTTP Client interface for ruby
|
||||||
|
Name: rubygem-%{gem_name}
|
||||||
|
Version: 2.8.0
|
||||||
|
Release: 1
|
||||||
|
License: (Ruby or BSD) and Public Domain
|
||||||
|
URL: https://github.com/nahi/httpclient
|
||||||
|
Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem
|
||||||
|
Requires: ruby(release)
|
||||||
|
BuildRequires: rubygem(minitest)
|
||||||
|
BuildRequires: rubygems-devel rubygem(http-cookie)
|
||||||
|
BuildArch: noarch
|
||||||
|
%if 0%{?el7} || 0%{?el6}
|
||||||
|
Provides: rubygem(%{gem_name}) = %{version}
|
||||||
|
%endif
|
||||||
|
%description
|
||||||
|
an interface to HTTP Client for the ruby language
|
||||||
|
|
||||||
|
%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}
|
||||||
|
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}/
|
||||||
|
find %{buildroot}/%{gem_instdir} -type f -name "*~" -delete
|
||||||
|
rm -rf %{buildroot}%{gem_instdir}/.yardoc
|
||||||
|
for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do
|
||||||
|
[ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file
|
||||||
|
done
|
||||||
|
for file in `find %{buildroot}/%{gem_instdir} -type f ! -perm /a+x -name "*.rb"`; do
|
||||||
|
[ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file
|
||||||
|
done
|
||||||
|
find %{buildroot}/%{gem_instdir} -type f -perm /g+wx -exec chmod -v g-w {} \;
|
||||||
|
find %{buildroot}/%{gem_instdir} -type f ! -perm /go+r -exec chmod -v go+r {} \;
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd %{buildroot}%{gem_instdir}
|
||||||
|
rm -f test/test_auth.rb
|
||||||
|
ruby -Ilib -e 'Dir.glob "./test/test_*.rb", &method(:require)'
|
||||||
|
popd
|
||||||
|
|
||||||
|
%files
|
||||||
|
%dir %{gem_instdir}
|
||||||
|
%{gem_instdir}/bin/
|
||||||
|
%{gem_instdir}/lib/
|
||||||
|
%doc %{gem_instdir}/sample
|
||||||
|
%exclude %{gem_cache}
|
||||||
|
%{gem_spec}
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc %{gem_docdir}
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
%doc %{gem_instdir}/test
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 20 2020 tuShenmei <tushenmei@huawei.com> - 2.8.0-1
|
||||||
|
- package init
|
||||||
4
rubygem-httpclient.yaml
Normal file
4
rubygem-httpclient.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: nahi/httpclient
|
||||||
|
tag_prefix: "httpclient-"
|
||||||
|
separator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user