summaryrefslogtreecommitdiffstats
path: root/rubygem-paperclip.spec
blob: e167e0c03faae360947e80a37c0a2a74f657b46a (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
121
%global gem_name paperclip

Name: rubygem-%{gem_name}
Version: 3.5.0
Release: 1%{?dist}
Summary: File attachments as attributes for ActiveRecord
Group: Development/Languages
License: MIT
URL: https://github.com/thoughtbot/paperclip
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(release)
Requires: ruby(rubygems)
Requires: rubygem(activemodel) >= 3.0.0
Requires: rubygem(activesupport) >= 3.0.0
Requires: rubygem(cocaine) => 0.5.0
Requires: rubygem(cocaine) < 0.6
Requires: rubygem(mime-types)
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 1.9.2
BuildRequires: ImageMagick
# Minitest and deps
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(mocha)
BuildRequires: rubygem(bourne)
BuildRequires: rubygem(activerecord) >= 3.0.0
BuildRequires: rubygem(mime-types)
BuildRequires: rubygem(cocaine)
BuildRequires: rubygem(sqlite3)
BuildRequires: rubygem(fog)
BuildRequires: rubygem(aws-sdk)
# Cucumber and deps
BuildRequires: rubygem(cucumber)
BuildRequires: rubygem(cucumber-rails)
BuildRequires: rubygem(shoulda)
BuildRequires: rubygem(aruba)
BuildRequires: rubygem(capybara)
BuildRequires: rubygem(fakeweb)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}

%description
Easy upload management for ActiveRecord


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

%description doc
Documentation for %{name}

%prep
gem unpack %{SOURCE0}

%setup -q -D -T -n  %{gem_name}-%{version}

gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec

# Remove dependency on pry gem.
find test -name '*.rb' -print0 | xargs -0 \
  sed -e "/require 'pry'/d" -i

%build
# Create the gem as gem install only works on a gem file
gem build %{gem_name}.gemspec

# %%gem_install compiles any C extensions and installs the gem into ./%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install

# Remove extra gemspec file
rm .%{gem_instdir}/%{gem_name}.gemspec

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

%check
pushd .%{gem_instdir}
  testrb -Ilib test/*/*_test.rb
  # The cucumber tests fail because we're not using bundler
  # TODO: fix the tests to run without bundler
  #cucumber features/*.feature
popd

%files
%dir %{gem_instdir}
%doc %{gem_instdir}/LICENSE
%exclude %{gem_instdir}/.*
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/Appraisals
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/NEWS
%doc %{gem_instdir}/README.md
%doc %{gem_instdir}/RUNNING_TESTS.md
%doc %{gem_instdir}/UPGRADING
%{gem_instdir}/Gemfile
%{gem_instdir}/Rakefile
%{gem_instdir}/cucumber
%{gem_instdir}/gemfiles
%{gem_instdir}/features
%{gem_instdir}/shoulda_macros
%{gem_instdir}/test


%changelog
* Sat Jul 27 2013 ktdreyer@ktdreyer.com - 3.5.0-1
- Update to 3.5.0
- Move LICENSE to main package

* Fri Aug 03 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 3.1.4-1
- Initial package, created by gem2rpm 0.8.1