summaryrefslogtreecommitdiffstats
path: root/rubygem-oauth.spec
blob: f701b51860f6cb07ea31f8a936977d993d58916e (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Generated from oauth-0.4.4.gem by gem2rpm -*- rpm-spec -*-
%global gem_name oauth

%global rubyabi 1.9.1

# Can be enabled if build system has connectivity into internet.
# Unfortunatelly this is not the case of Koji atm.
%global has_network_connectivity 0

Summary: OAuth Core Ruby implementation
Name: rubygem-%{gem_name}
Version: 0.4.4
Release: 3%{?dist}
Group: Development/Languages
License: MIT
URL: https://github.com/oauth/oauth-ruby
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
Requires: ruby
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(mocha)
BuildRequires: rubygem(typhoeus)
BuildRequires: rubygem(curb)
BuildRequires: rubygem(actionpack)
BuildRequires: rubygem(minitest)
# Enable when available in Fedora.
# BuildRequires: rubygem(em-http-request)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}

%description
This is a RubyGem for implementing both OAuth clients and servers
in Ruby applications.

See the OAuth specs http://oauth.net/core/1.0/

%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}


%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

rm %{buildroot}%{gem_instdir}/.gitignore
chmod a-x %{buildroot}%{gem_instdir}/examples/yql.rb

%check
pushd .%{gem_instdir}
# The following test fails due to Rails 3 incompatibility. Oauth my fail also,
# but it seems that Rails 3 users don't care.
# https://github.com/oauth/oauth-ruby/issues/13
mv test/test_action_controller_request_proxy.rb test/test_action_controller_request_proxy.rb.disabled

# Disable test which needs internet connectivity."
%if 0%{?has_network_connectivity} < 1
sed -i '207,+24d' test/test_net_http_client.rb
%endif
# one test fails because of lowercase/uppercase d/D
# reported: https://github.com/oauth/oauth-ruby/issues/45
ruby -Ilib -e "Dir.glob('./test/**/test_*.rb').each {|t| require t}" | \
	grep "115 tests, 299 assertions, 1 failures, 0 errors, 0 skips"
popd

%files
%dir %{gem_instdir}
%doc %{gem_instdir}/LICENSE
%{_bindir}/oauth
%{gem_instdir}/bin
%{gem_libdir}
%{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/HISTORY
%doc %{gem_instdir}/README.rdoc
%doc %{gem_instdir}/TODO
%{gem_instdir}/Gemfile*
%{gem_instdir}/oauth.gemspec
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/examples
%{gem_instdir}/tasks
%{gem_instdir}/test


%changelog
* Mon Feb 06 2012 Vít Ondruch <vondruch@redhat.com> - 0.4.4-3
- Rebuilt for Ruby 1.9.3.

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

* Wed Jun 15 2011 Vít Ondruch <vondruch@redhat.com> - 0.4.4-1
- Initial package