]> git.pld-linux.org Git - packages/ruby-rest-client.git/blame - ruby-rest-client.spec
package gemspec
[packages/ruby-rest-client.git] / ruby-rest-client.spec
CommitLineData
74ff2d9a
ER
1#
2# Conditional build:
3%bcond_with tests # build without tests
4
5%define gem_name rest-client
6Summary: Simple REST client for Ruby
7Name: ruby-%{gem_name}
8Version: 1.6.7
4412d15b 9Release: 3
74ff2d9a
ER
10License: MIT
11Group: Development/Languages
12Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
13# Source0-md5: 1f2d6b3b6ceb88e3ee2b327f5e508c22
4412d15b 14URL: https://github.com/rest-client/rest-client
74ff2d9a
ER
15BuildRequires: rpm-rubyprov
16BuildRequires: rpmbuild(macros) >= 1.656
6ed29f9e 17BuildRequires: sed >= 4.0
74ff2d9a
ER
18%if %{with tests}
19BuildRequires: ruby-mime-types >= 1.16
20BuildRequires: ruby-netrc
21BuildRequires: ruby-rspec
22BuildRequires: ruby-webmock >= 0.9.1
23%endif
24Requires: ruby-mime-types >= 1.16
25Requires: ruby-netrc
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30A simple Simple HTTP and REST client for Ruby, inspired by the Sinatra
31microframework style of specifying actions: get, put, post, delete.
32
33%prep
34%setup -q -n %{gem_name}-%{version}
6ed29f9e 35%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
74ff2d9a
ER
36
37%build
4412d15b
ER
38# write .gemspec
39%__gem_helper spec
40
74ff2d9a
ER
41%if %{with tests}
42# TODO: According to comment in %%{PATCH0}, at least one test does not passes on
43# R1.9.3. I gon't go to investigate further ATM.
44rspec spec | grep -e "188 examples, [34] failures"
45%endif
46
47%install
48rm -rf $RPM_BUILD_ROOT
4412d15b 49install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
74ff2d9a
ER
50cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
51cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
4412d15b 52cp -p %{gem_name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
74ff2d9a
ER
53
54%clean
55rm -rf $RPM_BUILD_ROOT
56
57%files
58%defattr(644,root,root,755)
59%doc README.rdoc history.md
60%attr(755,root,root) %{_bindir}/restclient
61%{ruby_vendorlibdir}/rest-client.rb
62%{ruby_vendorlibdir}/rest_client.rb
63%{ruby_vendorlibdir}/restclient.rb
64%{ruby_vendorlibdir}/restclient
4412d15b 65%{ruby_specdir}/%{gem_name}-%{version}.gemspec
This page took 0.038042 seconds and 4 git commands to generate.