Blob Blame History Raw
# Generated from rest-client-1.3.1.gem by gem2rpm -*- rpm-spec -*-
%global gem_name rest-client

# rubygem-addressable is not yet in Fedora
# https://bugzilla.redhat.com/show_bug.cgi?id=588428
%{!?enable_test: %global enable_test 0}

Summary: Simple REST client for Ruby
Name: rubygem-%{gem_name}
Version: 1.6.1
Release: 4%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/archiloque/rest-client
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(abi) = 1.9.1
Requires: ruby(rubygems)
Requires: rubygem(mime-types) >= 1.16
BuildRequires: rubygems-devel
%if 0%{enable_test} > 0
# Use rspec-core until rspec are not migrated to RSpec 2.x
BuildRequires: rubygem(rspec-core)
BuildRequires: rubygem(mime-types) >= 1.16
BuildRequires: rubygem(webmock) >= 1.16
%endif
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}

%description
A simple Simple HTTP and REST client for Ruby, inspired by the Sinatra
microframework style of specifying actions: get, put, post, delete.


%prep
%setup -q -c -T
mkdir -p .%{gem_dir}
gem install --local --install-dir .%{gem_dir} \
            --bindir .%{_bindir} \
            --force %{SOURCE0}

%build

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/


mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
        %{buildroot}%{_bindir}/

find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

%if 0%{enable_test} > 0
%check
pushd .%{gem_instdir}
sed -i -e "s|require 'spec'|require 'rspec'|" spec/base.rb
rspec spec
popd
%endif

%files
%defattr(-, root, root, -)
%{_bindir}/restclient
%dir %{gem_instdir}
%{gem_instdir}/bin
%{gem_libdir}
%doc %{gem_instdir}/README.rdoc
%doc %{gem_instdir}/Rakefile
%doc %{gem_instdir}/history.md
%doc %{gem_instdir}/VERSION
%doc %{gem_instdir}/spec
%doc %{gem_docdir}
%{gem_cache}
%{gem_spec}


%changelog
* Wed Feb 01 2012 Vít Ondruch <vondruch@redhat.com> - 1.6.1-4
- Rebuilt for Ruby 1.9.3.

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Sep 08 2010 Michal Fojtik <mfojtik@redhat.com> - 1.6.1-1
- New version release

* Wed Mar 03 2010 Michal Fojtik <mfojtik@redhat.com> - 1.4.0-6
- New version release

* Mon Feb 17 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.1-5
- Added %dir %{geminstdir} into spec file

* Mon Feb 17 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.1-4
- Marked README.rdoc, history.md and spec/ as %doc

* Mon Feb 16 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.1-3
- Fixed licence (MIT)
- Fixed duplicated files in spec
- Replaced %define with %global

* Mon Feb 16 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.1-2
- Fixed spec filename
- Added Ruby dependency

* Mon Feb 16 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.1-1
- Initial package