-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruby-rest-client.spec
More file actions
66 lines (58 loc) · 1.83 KB
/
ruby-rest-client.spec
File metadata and controls
66 lines (58 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Conditional build:
%bcond_with tests # build without tests
%define pkgname rest-client
Summary: Simple REST client for Ruby
Name: ruby-%{pkgname}
Version: 2.1.0
Release: 2
License: MIT
Group: Development/Languages
Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem
# Source0-md5: 75e3de74cdcd29e6c1179090723a0258
URL: https://github.com/rest-client/rest-client
Patch0: shebang.patch
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.665
%if %{with tests}
BuildRequires: ruby-mime-types >= 1.16
BuildRequires: ruby-rspec >= 3.0
BuildRequires: ruby-webmock >= 2.0
%endif
Requires: ruby-http-accept >= 1.7.0
Requires: ruby-http-cookie >= 1.0.2
Requires: ruby-mime-types >= 1.16
Requires: ruby-netrc >= 0.8
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%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 -n %{pkgname}-%{version}
%patch -P0 -p1
%build
# write .gemspec
%__gem_helper spec
%if %{with tests}
# TODO: According to comment in %%{PATCH0}, at least one test does not passes on
# R1.9.3. I gon't go to investigate further ATM.
rspec spec | grep -e "188 examples, [34] failures"
%endif
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS README.md history.md LICENSE
%attr(755,root,root) %{_bindir}/restclient
%{ruby_vendorlibdir}/rest-client.rb
%{ruby_vendorlibdir}/rest_client.rb
%{ruby_vendorlibdir}/restclient.rb
%{ruby_vendorlibdir}/restclient
%{ruby_specdir}/%{pkgname}-%{version}.gemspec