|
|
|
@ -1,21 +1,11 @@
|
|
|
|
|
%global gem_name httpclient
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 18
|
|
|
|
|
%global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
|
|
|
|
%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
|
|
|
|
|
%global gem_libdir %{gem_instdir}/lib
|
|
|
|
|
%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
|
|
|
|
|
%global gem_spec %{gem_dir}/specifications/%%{gem_name}-%{version}.gemspec
|
|
|
|
|
%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
|
|
|
|
|
%global rubyabi 1.8
|
|
|
|
|
%else
|
|
|
|
|
%global rubyabi 1.9.1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Summary: HTTP Client interface for ruby
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 2.4.0
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Version: 2.5.1
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
License: (Ruby or BSD) and Public Domain
|
|
|
|
|
URL: https://github.com/nahi/httpclient
|
|
|
|
@ -32,7 +22,9 @@ BuildRequires: rubygem(minitest4)
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%if 0%{?fc19} || 0%{?fc20} || 0%{?el7} || 0%{?el6}
|
|
|
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
an interface to HTTP Client for the ruby language
|
|
|
|
@ -52,21 +44,9 @@ gem unpack %{SOURCE0}
|
|
|
|
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
mkdir -p ./%{gem_dir}
|
|
|
|
|
gem build %{gem_name}.gemspec
|
|
|
|
|
|
|
|
|
|
gem install -V \
|
|
|
|
|
--local \
|
|
|
|
|
--install-dir ./%{gem_dir} \
|
|
|
|
|
--bindir ./%{_bindir} \
|
|
|
|
|
--force \
|
|
|
|
|
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 18
|
|
|
|
|
--no-rdoc \
|
|
|
|
|
--no-ri \
|
|
|
|
|
%else
|
|
|
|
|
--rdoc \
|
|
|
|
|
%endif
|
|
|
|
|
%{gem_name}-%{version}.gem
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
@ -94,6 +74,10 @@ find %{buildroot}/%{gem_instdir} -type f ! -perm /go+r -exec chmod -v go+r {} \;
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd %{buildroot}%{gem_instdir}
|
|
|
|
|
# All the tests in test_auth.rb were being bypassed
|
|
|
|
|
# but on Ruby 1.8, the bypass didn't work and would fail.
|
|
|
|
|
# Just remove the file since it was being bypassed anyway.
|
|
|
|
|
rm -f test/test_auth.rb
|
|
|
|
|
testrb -Ilib test
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
@ -112,6 +96,12 @@ popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Oct 20 2014 Troy Dawson <tdawson@redhat.com> - 2.5.1-1
|
|
|
|
|
- Update to 2.5.1
|
|
|
|
|
|
|
|
|
|
* Mon Oct 20 2014 Troy Dawson <tdawson@redhat.com> - 2.4.0-3
|
|
|
|
|
- Update spec to follow latest guidelines
|
|
|
|
|
|
|
|
|
|
* Wed Oct 15 2014 Troy Dawson <tdawson@redhat.com> - 2.4.0-2
|
|
|
|
|
- Fix spec make it build and install on epel7 and older versions of fedora
|
|
|
|
|
|
|
|
|
|