summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2013-02-14 01:01:38 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2013-02-14 08:39:49 -0700
commit16528d757fa6f2fe600759fcfa45e35acc29e33e (patch)
tree490177d91ad29900250faa00f1f0c06c41c69294
parentd387ecac916020f57d3df0c5aacbbc462052d748 (diff)
downloadrubygem-paperclip-gitorious.zip
rubygem-paperclip-gitorious.tar.gz
rubygem-paperclip-gitorious.tar.xz
Downgrade to paperclip 2.7.4, and add RHEL 6 compatgitorious
- Downgrade to paperclip 2.7.4 - RHEL 6 compatibility
-rw-r--r--.gitignore1
-rw-r--r--rubygem-paperclip-3.1.4-skip-broken-fog-tests.patch18
-rw-r--r--rubygem-paperclip.spec59
-rw-r--r--sources1
4 files changed, 46 insertions, 33 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a8fdbca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/paperclip-2.7.4.gem
diff --git a/rubygem-paperclip-3.1.4-skip-broken-fog-tests.patch b/rubygem-paperclip-3.1.4-skip-broken-fog-tests.patch
deleted file mode 100644
index 8ae8ec1..0000000
--- a/rubygem-paperclip-3.1.4-skip-broken-fog-tests.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/test/storage/fog_test.rb
-+++ b/test/storage/fog_test.rb
-@@ -238,6 +238,7 @@ class FogTest < Test::Unit::TestCase
- end
-
- should "provide an url that expires in subdomain style" do
-+ skip('failing fog test on Fedora')
- assert_match /^http:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png\?AWSAccessKeyId=.+$/, @dummy.avatar.expiring_url
- end
- end
-@@ -311,6 +312,7 @@ class FogTest < Test::Unit::TestCase
- end
-
- should "provide an expiring url" do
-+ skip('failing fog test on Fedora')
- assert_match /http:\/\/dynamicfoghost\.com/, @dummy.avatar.expiring_url
- end
-
diff --git a/rubygem-paperclip.spec b/rubygem-paperclip.spec
index 03fb2b0..8949c9f 100644
--- a/rubygem-paperclip.spec
+++ b/rubygem-paperclip.spec
@@ -1,47 +1,69 @@
# Generated from paperclip-3.1.4.gem by gem2rpm -*- rpm-spec -*-
%global gem_name paperclip
+%if 0%{?el6}
+%global rubyabi 1.8
+%else
%global rubyabi 1.9.1
+%endif
Summary: File attachments as attributes for ActiveRecord
Name: rubygem-%{gem_name}
-Version: 3.1.4
+Version: 2.7.4
Release: 1%{?dist}
Group: Development/Languages
License: MIT
URL: https://github.com/thoughtbot/paperclip
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
-Patch0: rubygem-paperclip-3.1.4-skip-broken-fog-tests.patch
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
-Requires: rubygem(activerecord) >= 3.0.0
-Requires: rubygem(activemodel) >= 3.0.0
-Requires: rubygem(activesupport) >= 3.0.0
-Requires: rubygem(cocaine) >= 0.0.2
+Requires: rubygem(activerecord) >= 2.3.0
+Requires: rubygem(activesupport) >= 2.3.0
+Requires: rubygem(cocaine) >= 0.3.0
Requires: rubygem(mime-types)
Requires: ImageMagick
BuildRequires: ruby(abi) = %{rubyabi}
+%if 0%{?fedora}
BuildRequires: rubygems-devel
+%else
+BuildRequires: ruby(rubygems)
+%endif
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(cocaine) >= 0.3.0
BuildRequires: rubygem(shoulda)
+%if 0%{?el6}
+BuildRequires: rubygem(activerecord) >= 2.3.0
+# Not sure if this will work, or if we need to patch more.
+BuildRequires: rubygem(sqlite3-ruby)
+%else
BuildRequires: rubygem(sqlite3)
+# These are not available on EL6:
BuildRequires: rubygem(fog)
BuildRequires: rubygem(aws-sdk)
+%endif
# Cucumber and deps
+%if 0%{?fedora}
BuildRequires: rubygem(cucumber)
BuildRequires: rubygem(cucumber-rails)
BuildRequires: rubygem(aruba)
BuildRequires: rubygem(capybara)
BuildRequires: rubygem(fakeweb)
+%endif
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
+# macros for RHEL6 compatibility:
+%{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)}
+%{!?gem_instdir: %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}}
+%{!?gem_libdir: %global gem_libdir %{gem_instdir}/lib}
+%{!?gem_cache: %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem}
+%{!?gem_spec: %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec}
+%{!?gem_docdir: %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}}
+%{!?gem_extdir: %global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}}
+
%description
Easy upload management for ActiveRecord
@@ -61,11 +83,13 @@ mkdir -p .%{gem_dir}
gem install --local --install-dir .%{gem_dir} \
--force %{SOURCE0}
-# Skip two tests that fail with old versions of rubygem(fog).
-# https://github.com/thoughtbot/paperclip/pull/837
-pushd .%{gem_instdir}
-%patch0 -p1
+%if 0%{?el6}
+pushd .%{gem_instdir}/
+ # We don't have gems to support these tests.
+ rm test/storage/fog_test.rb
+ rm test/storage/s3_live_test.rb test/storage/s3_test.rb
popd
+%endif
# Remove developer files
rm -rf .%{gem_instdir}/.gitignore
@@ -94,6 +118,9 @@ popd
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
+%{gem_instdir}/generators
+%{gem_instdir}/init.rb
+%{gem_instdir}/rails
%files doc
%doc %{gem_docdir}
@@ -102,8 +129,6 @@ popd
%doc %{gem_instdir}/LICENSE
%doc %{gem_instdir}/NEWS
%doc %{gem_instdir}/README.md
-%doc %{gem_instdir}/RUNNING_TESTS.md
-%doc %{gem_instdir}/UPGRADING
%{gem_instdir}/Gemfile
%{gem_instdir}/Gemfile.lock
%{gem_instdir}/Rakefile
@@ -115,5 +140,9 @@ popd
%changelog
+* Wed Feb 13 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.7.4-1
+- Downgrade to paperclip 2.7.4
+- RHEL 6 compatibility
+
* Fri Aug 03 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 3.1.4-1
- Initial package, created by gem2rpm 0.8.1
diff --git a/sources b/sources
new file mode 100644
index 0000000..a1cec13
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+6c83dbfeafaecfa6adc67bb1e0f743ff paperclip-2.7.4.gem