Skip to content
Browse files

Updated for paperclip 2.4

  • Loading branch information...
1 parent 6716cd0 commit 53791754863d855a8b373e85ef57e2b199179195 @dim dim committed
Showing with 119 additions and 48 deletions.
  1. +7 −0 .travis.yml
  2. +0 −9 Gemfile
  3. +33 −27 Gemfile.lock
  4. +4 −0 Gemfile.paperclip-2.3.x
  5. +61 −0 Gemfile.paperclip-2.3.x.lock
  6. +6 −2 paperclip-remote.gemspec
  7. BIN spec/:memory
  8. +8 −10 spec/spec_helper.rb
View
7 .travis.yml
@@ -0,0 +1,7 @@
+rvm:
+ - 1.9.2
+ - 1.9.3
+ - ree
+gemfiles:
+ - Gemfile
+ - Gemfile.rails-3.0.x
View
9 Gemfile
@@ -1,12 +1,3 @@
source 'http://rubygems.org'
gemspec
-
-group :development, :test do
- gem 'rake'
-end
-
-group :test do
- gem 'rspec'
- gem 'webmock'
-end
View
60 Gemfile.lock
@@ -1,46 +1,51 @@
PATH
remote: .
specs:
- paperclip-remote (0.1.0)
- paperclip (~> 2.3.0)
+ paperclip-remote (0.3.0)
+ paperclip (>= 2.3.0, < 2.5.0)
GEM
remote: http://rubygems.org/
specs:
- activemodel (3.0.10)
- activesupport (= 3.0.10)
- builder (~> 2.1.2)
- i18n (~> 0.5.0)
- activerecord (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
- arel (~> 2.0.10)
- tzinfo (~> 0.3.23)
- activesupport (3.0.10)
+ activemodel (3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activesupport (3.1.1)
+ multi_json (~> 1.0)
addressable (2.2.6)
- arel (2.0.10)
- builder (2.1.2)
+ arel (2.2.1)
+ builder (3.0.0)
cocaine (0.2.0)
- crack (0.1.8)
- diff-lcs (1.1.2)
- i18n (0.5.0)
+ crack (0.3.1)
+ diff-lcs (1.1.3)
+ i18n (0.6.0)
mime-types (1.16)
- paperclip (2.3.16)
+ multi_json (1.0.3)
+ paperclip (2.4.4)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
cocaine (>= 0.0.2)
mime-types
rake (0.9.2)
- rspec (2.6.0)
- rspec-core (~> 2.6.0)
- rspec-expectations (~> 2.6.0)
- rspec-mocks (~> 2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.6.0)
- tzinfo (0.3.29)
- webmock (1.7.4)
+ rspec-mocks (2.7.0)
+ sqlite3 (1.3.4)
+ sqlite3-ruby (1.3.3)
+ sqlite3 (>= 1.3.3)
+ tzinfo (0.3.30)
+ webmock (1.7.7)
addressable (~> 2.2, > 2.2.5)
crack (>= 0.1.7)
@@ -51,4 +56,5 @@ DEPENDENCIES
paperclip-remote!
rake
rspec
+ sqlite3-ruby
webmock
View
4 Gemfile.paperclip-2.3.x
@@ -0,0 +1,4 @@
+source 'http://rubygems.org'
+
+gemspec
+gem "paperclip", "~> 2.3.0"
View
61 Gemfile.paperclip-2.3.x.lock
@@ -0,0 +1,61 @@
+PATH
+ remote: .
+ specs:
+ paperclip-remote (0.3.0)
+ paperclip (>= 2.3.0, < 2.5.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activemodel (3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activesupport (3.1.1)
+ multi_json (~> 1.0)
+ addressable (2.2.6)
+ arel (2.2.1)
+ builder (3.0.0)
+ cocaine (0.2.0)
+ crack (0.3.1)
+ diff-lcs (1.1.3)
+ i18n (0.6.0)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ paperclip (2.3.16)
+ activerecord (>= 2.3.0)
+ activesupport (>= 2.3.2)
+ cocaine (>= 0.0.2)
+ mime-types
+ rake (0.9.2)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.7.0)
+ sqlite3 (1.3.4)
+ sqlite3-ruby (1.3.3)
+ sqlite3 (>= 1.3.3)
+ tzinfo (0.3.30)
+ webmock (1.7.7)
+ addressable (~> 2.2, > 2.2.5)
+ crack (>= 0.1.7)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ paperclip (~> 2.3.0)
+ paperclip-remote!
+ rake
+ rspec
+ sqlite3-ruby
+ webmock
View
8 paperclip-remote.gemspec
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
s.name = "paperclip-remote"
s.summary = "Plugin for Paperclip"
s.description = "Allows fetching attachments from remote locations"
- s.version = '0.2.0'
+ s.version = '0.3.0'
s.authors = ["Dimitrij Denissenko"]
s.email = "dimitrij@blacksquaremedia.com"
@@ -16,5 +16,9 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.files = Dir['LICENSE', 'README.rdoc', 'lib/**/*', 'rails/**/*']
- s.add_dependency "paperclip", "~> 2.3.0"
+ s.add_dependency "paperclip", ">= 2.3.0", "< 2.5.0"
+ s.add_development_dependency "rake"
+ s.add_development_dependency "rspec"
+ s.add_development_dependency "webmock"
+ s.add_development_dependency "sqlite3-ruby"
end
View
BIN spec/:memory
Binary file not shown.
View
18 spec/spec_helper.rb
@@ -3,8 +3,7 @@
$:.unshift File.expand_path('../../lib', __FILE__)
require 'rubygems'
-require 'bundler'
-Bundler.setup
+require 'bundler/setup'
module Rails
@@ -28,14 +27,13 @@ def self.env
require 'paperclip_remote'
-class User < ActiveRecord::Base
- def self.columns
- @columns ||= [
- ActiveRecord::ConnectionAdapters::Column.new('photo_file_name', nil, 'string'),
- ActiveRecord::ConnectionAdapters::Column.new('photo_file_size', nil, 'int'),
- ActiveRecord::ConnectionAdapters::Column.new('photo_content_type', nil, 'string'),
- ]
- end
+ActiveRecord::Base.establish_connection :adapter => "sqlite3", :database => ":memory:"
+ActiveRecord::Base.connection.create_table :users do |t|
+ t.string :photo_content_type
+ t.string :photo_file_name
+ t.integer :photo_file_size
+end
+class User < ActiveRecord::Base
has_attached_file :photo, :remote => true
end

0 comments on commit 5379175

Please sign in to comment.
Something went wrong with that request. Please try again.