diff --git a/httpclient-2.8.0.gem b/httpclient-2.8.0.gem new file mode 100644 index 0000000..4079227 Binary files /dev/null and b/httpclient-2.8.0.gem differ diff --git a/rubygem-httpclient.spec b/rubygem-httpclient.spec new file mode 100644 index 0000000..6998022 --- /dev/null +++ b/rubygem-httpclient.spec @@ -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 - 2.8.0-1 +- package init diff --git a/rubygem-httpclient.yaml b/rubygem-httpclient.yaml new file mode 100644 index 0000000..c3e44d4 --- /dev/null +++ b/rubygem-httpclient.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: nahi/httpclient +tag_prefix: "httpclient-" +separator: "."