paperclip 2.3.15 → 2.3.16
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of paperclip might be problematic. Click here for more details.
- data/README.md +2 -0
- data/Rakefile +1 -1
- data/lib/paperclip.rb +2 -2
- data/lib/paperclip/attachment.rb +1 -1
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +20 -14
- data/lib/paperclip/processor.rb +1 -1
- data/lib/paperclip/storage/fog.rb +1 -1
- data/lib/paperclip/storage/s3.rb +8 -2
- data/lib/paperclip/style.rb +2 -2
- data/lib/paperclip/thumbnail.rb +4 -2
- data/lib/paperclip/version.rb +1 -1
- data/test/attachment_test.rb +13 -40
- data/test/fog_test.rb +0 -2
- data/test/matchers/validate_attachment_content_type_matcher_test.rb +40 -0
- data/test/storage_test.rb +44 -0
- data/test/thumbnail_test.rb +20 -2
- metadata +85 -92
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
|
|
10
10
|
require 'paperclip'
|
11
11
|
|
12
12
|
desc 'Default: run unit tests.'
|
13
|
-
task :default => [:clean, :all]
|
13
|
+
task :default => [:clean, 'appraisal:install', :all]
|
14
14
|
|
15
15
|
desc 'Test the paperclip plugin under all supported Rails versions.'
|
16
16
|
task :all do |t|
|
data/lib/paperclip.rb
CHANGED
@@ -179,8 +179,8 @@ module Paperclip
|
|
179
179
|
module Glue
|
180
180
|
def self.included base #:nodoc:
|
181
181
|
base.extend ClassMethods
|
182
|
-
base.class_attribute :attachment_definitions
|
183
|
-
if base.respond_to?(
|
182
|
+
base.class_attribute :attachment_definitions if base.respond_to?(:class_attribute)
|
183
|
+
if base.respond_to?(:set_callback)
|
184
184
|
base.send :include, Paperclip::CallbackCompatability::Rails3
|
185
185
|
else
|
186
186
|
base.send :include, Paperclip::CallbackCompatability::Rails21
|
data/lib/paperclip/attachment.rb
CHANGED
@@ -323,7 +323,7 @@ module Paperclip
|
|
323
323
|
end
|
324
324
|
|
325
325
|
def initialize_storage #:nodoc:
|
326
|
-
storage_class_name = @storage.to_s.
|
326
|
+
storage_class_name = @storage.to_s.downcase.camelize
|
327
327
|
begin
|
328
328
|
@storage_module = Paperclip::Storage.const_get(storage_class_name)
|
329
329
|
rescue NameError
|
@@ -17,6 +17,8 @@ module Paperclip
|
|
17
17
|
class ValidateAttachmentContentTypeMatcher
|
18
18
|
def initialize attachment_name
|
19
19
|
@attachment_name = attachment_name
|
20
|
+
@allowed_types = []
|
21
|
+
@rejected_types = []
|
20
22
|
end
|
21
23
|
|
22
24
|
def allowing *types
|
@@ -37,13 +39,19 @@ module Paperclip
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def failure_message
|
40
|
-
"
|
41
|
-
|
42
|
+
"".tap do |str|
|
43
|
+
str << "Content types #{@allowed_types.join(", ")} should be accepted" if @allowed_types.present?
|
44
|
+
str << "\n" if @allowed_types.present && @rejected_types.present?
|
45
|
+
str << "Content types #{@rejected_types.join(", ")} should be rejected by #{@attachment_name}" if @rejected_types.present?
|
46
|
+
end
|
42
47
|
end
|
43
48
|
|
44
49
|
def negative_failure_message
|
45
|
-
"
|
46
|
-
|
50
|
+
"".tap do |str|
|
51
|
+
str << "Content types #{@allowed_types.join(", ")} should be rejected" if @allowed_types.present?
|
52
|
+
str << "\n" if @allowed_types.present && @rejected_types.present?
|
53
|
+
str << "Content types #{@rejected_types.join(", ")} should be accepted by #{@attachment_name}" if @rejected_types.present?
|
54
|
+
end
|
47
55
|
end
|
48
56
|
|
49
57
|
def description
|
@@ -52,22 +60,20 @@ module Paperclip
|
|
52
60
|
|
53
61
|
protected
|
54
62
|
|
55
|
-
def
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
subject.errors[:"#{@attachment_name}_content_type"].blank?
|
62
|
-
end
|
63
|
+
def type_allowed?(type)
|
64
|
+
file = StringIO.new(".")
|
65
|
+
file.content_type = type
|
66
|
+
(subject = @subject.new).attachment_for(@attachment_name).assign(file)
|
67
|
+
subject.valid?
|
68
|
+
subject.errors[:"#{@attachment_name}_content_type"].blank?
|
63
69
|
end
|
64
70
|
|
65
71
|
def allowed_types_allowed?
|
66
|
-
|
72
|
+
@allowed_types.all? { |type| type_allowed?(type) }
|
67
73
|
end
|
68
74
|
|
69
75
|
def rejected_types_rejected?
|
70
|
-
|
76
|
+
!@rejected_types.any? { |type| type_allowed?(type) }
|
71
77
|
end
|
72
78
|
end
|
73
79
|
end
|
data/lib/paperclip/processor.rb
CHANGED
@@ -41,7 +41,7 @@ module Paperclip
|
|
41
41
|
# http://marsorange.com/archives/of-mogrify-ruby-tempfile-dynamic-class-definitions
|
42
42
|
class Tempfile < ::Tempfile
|
43
43
|
# This is Ruby 1.8.7's implementation.
|
44
|
-
if RUBY_VERSION <= "1.8.6"
|
44
|
+
if RUBY_VERSION <= "1.8.6" || RUBY_PLATFORM =~ /java/
|
45
45
|
def make_tmpname(basename, n)
|
46
46
|
case basename
|
47
47
|
when Array
|
@@ -44,7 +44,7 @@ module Paperclip
|
|
44
44
|
@fog_directory = @options[:fog_directory]
|
45
45
|
@fog_credentials = @options[:fog_credentials]
|
46
46
|
@fog_host = @options[:fog_host]
|
47
|
-
@fog_public = @options[:fog_public]
|
47
|
+
@fog_public = @options[:fog_public] || true
|
48
48
|
@fog_file = @options[:fog_file] || {}
|
49
49
|
|
50
50
|
@url = ':fog_public_url'
|
data/lib/paperclip/storage/s3.rb
CHANGED
@@ -66,6 +66,7 @@ module Paperclip
|
|
66
66
|
# to interpolate. Keys should be unique, like filenames, and despite the fact that
|
67
67
|
# S3 (strictly speaking) does not support directories, you can still use a / to
|
68
68
|
# separate parts of your file name.
|
69
|
+
# * +s3_host_name+: If you are using your bucket in Tokyo region etc, write host_name.
|
69
70
|
module S3
|
70
71
|
def self.extended base
|
71
72
|
begin
|
@@ -77,6 +78,7 @@ module Paperclip
|
|
77
78
|
|
78
79
|
base.instance_eval do
|
79
80
|
@s3_credentials = parse_credentials(@options[:s3_credentials])
|
81
|
+
@s3_host_name = @options[:s3_host_name] || @s3_credentials[:s3_host_name]
|
80
82
|
@bucket = @options[:bucket] || @s3_credentials[:bucket]
|
81
83
|
@bucket = @bucket.call(self) if @bucket.is_a?(Proc)
|
82
84
|
@s3_options = @options[:s3_options] || {}
|
@@ -102,10 +104,10 @@ module Paperclip
|
|
102
104
|
"#{attachment.s3_protocol(style)}://#{attachment.s3_host_alias}/#{attachment.path(style).gsub(%r{^/}, "")}"
|
103
105
|
end unless Paperclip::Interpolations.respond_to? :s3_alias_url
|
104
106
|
Paperclip.interpolates(:s3_path_url) do |attachment, style|
|
105
|
-
"#{attachment.s3_protocol(style)}
|
107
|
+
"#{attachment.s3_protocol(style)}://#{attachment.s3_host_name}/#{attachment.bucket_name}/#{attachment.path(style).gsub(%r{^/}, "")}"
|
106
108
|
end unless Paperclip::Interpolations.respond_to? :s3_path_url
|
107
109
|
Paperclip.interpolates(:s3_domain_url) do |attachment, style|
|
108
|
-
"#{attachment.s3_protocol(style)}://#{attachment.bucket_name}.
|
110
|
+
"#{attachment.s3_protocol(style)}://#{attachment.bucket_name}.#{attachment.s3_host_name}/#{attachment.path(style).gsub(%r{^/}, "")}"
|
109
111
|
end unless Paperclip::Interpolations.respond_to? :s3_domain_url
|
110
112
|
Paperclip.interpolates(:asset_host) do |attachment, style|
|
111
113
|
"#{attachment.path(style).gsub(%r{^/}, "")}"
|
@@ -120,6 +122,10 @@ module Paperclip
|
|
120
122
|
@bucket
|
121
123
|
end
|
122
124
|
|
125
|
+
def s3_host_name
|
126
|
+
@s3_host_name || "s3.amazonaws.com"
|
127
|
+
end
|
128
|
+
|
123
129
|
def set_permissions permissions
|
124
130
|
if permissions.is_a?(Hash)
|
125
131
|
permissions[:default] = permissions[:default] || :public_read
|
data/lib/paperclip/style.rb
CHANGED
@@ -72,7 +72,7 @@ module Paperclip
|
|
72
72
|
# Supports getting and setting style properties with hash notation to ensure backwards-compatibility
|
73
73
|
# eg. @attachment.styles[:large][:geometry]@ will still work
|
74
74
|
def [](key)
|
75
|
-
if [:name, :convert_options, :whiny, :processors, :geometry, :format].include?(key)
|
75
|
+
if [:name, :convert_options, :whiny, :processors, :geometry, :format, :animated].include?(key)
|
76
76
|
send(key)
|
77
77
|
elsif defined? @other_args[key]
|
78
78
|
@other_args[key]
|
@@ -80,7 +80,7 @@ module Paperclip
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def []=(key, value)
|
83
|
-
if [:name, :convert_options, :whiny, :processors, :geometry, :format].include?(key)
|
83
|
+
if [:name, :convert_options, :whiny, :processors, :geometry, :format, :animated].include?(key)
|
84
84
|
send("#{key}=".intern, value)
|
85
85
|
else
|
86
86
|
@other_args[key] = value
|
data/lib/paperclip/thumbnail.rb
CHANGED
@@ -2,7 +2,8 @@ module Paperclip
|
|
2
2
|
# Handles thumbnailing images that are uploaded.
|
3
3
|
class Thumbnail < Processor
|
4
4
|
|
5
|
-
attr_accessor :current_geometry, :target_geometry, :format, :whiny, :convert_options,
|
5
|
+
attr_accessor :current_geometry, :target_geometry, :format, :whiny, :convert_options,
|
6
|
+
:source_file_options, :animated
|
6
7
|
|
7
8
|
# List of formats that we need to preserve animation
|
8
9
|
ANIMATED_FORMATS = %w(gif)
|
@@ -25,6 +26,7 @@ module Paperclip
|
|
25
26
|
@convert_options = options[:convert_options]
|
26
27
|
@whiny = options[:whiny].nil? ? true : options[:whiny]
|
27
28
|
@format = options[:format]
|
29
|
+
@animated = options[:animated].nil? ? true : options[:animated]
|
28
30
|
|
29
31
|
@source_file_options = @source_file_options.split(/\s+/) if @source_file_options.respond_to?(:split)
|
30
32
|
@convert_options = @convert_options.split(/\s+/) if @convert_options.respond_to?(:split)
|
@@ -86,7 +88,7 @@ module Paperclip
|
|
86
88
|
|
87
89
|
# Return true if the format is animated
|
88
90
|
def animated?
|
89
|
-
ANIMATED_FORMATS.include?(@current_format[1..-1]) && (ANIMATED_FORMATS.include?(@format.to_s) || @format.blank?)
|
91
|
+
@animated && ANIMATED_FORMATS.include?(@current_format[1..-1]) && (ANIMATED_FORMATS.include?(@format.to_s) || @format.blank?)
|
90
92
|
end
|
91
93
|
end
|
92
94
|
end
|
data/lib/paperclip/version.rb
CHANGED
data/test/attachment_test.rb
CHANGED
@@ -496,6 +496,19 @@ class AttachmentTest < Test::Unit::TestCase
|
|
496
496
|
rebuild_model :storage => :FileSystem
|
497
497
|
@dummy = Dummy.new
|
498
498
|
assert @dummy.avatar.is_a?(Paperclip::Storage::Filesystem)
|
499
|
+
|
500
|
+
rebuild_model :storage => :Filesystem
|
501
|
+
@dummy = Dummy.new
|
502
|
+
assert @dummy.avatar.is_a?(Paperclip::Storage::Filesystem)
|
503
|
+
end
|
504
|
+
|
505
|
+
should "convert underscored storage name to camelcase" do
|
506
|
+
rebuild_model :storage => :not_here
|
507
|
+
@dummy = Dummy.new
|
508
|
+
exception = assert_raises(Paperclip::StorageMethodNotFound) do |e|
|
509
|
+
@dummy.avatar
|
510
|
+
end
|
511
|
+
assert exception.message.include?("NotHere")
|
499
512
|
end
|
500
513
|
|
501
514
|
should "raise an error if you try to include a storage module that doesn't exist" do
|
@@ -634,46 +647,6 @@ class AttachmentTest < Test::Unit::TestCase
|
|
634
647
|
assert_equal "sheep_say_bæ.png", @dummy.avatar.original_filename
|
635
648
|
end
|
636
649
|
end
|
637
|
-
|
638
|
-
context "Attachment with uppercase extension and a default style" do
|
639
|
-
setup do
|
640
|
-
@old_defaults = Paperclip::Attachment.default_options.dup
|
641
|
-
Paperclip::Attachment.default_options.merge!({
|
642
|
-
:path => ":rails_root/tmp/:attachment/:class/:style/:id/:basename.:extension"
|
643
|
-
})
|
644
|
-
FileUtils.rm_rf("tmp")
|
645
|
-
rebuild_model
|
646
|
-
@instance = Dummy.new
|
647
|
-
@instance.stubs(:id).returns 123
|
648
|
-
|
649
|
-
@file = File.new(File.join(File.dirname(__FILE__), "fixtures", "uppercase.PNG"), 'rb')
|
650
|
-
|
651
|
-
styles = {:styles => { :large => ["400x400", :jpg],
|
652
|
-
:medium => ["100x100", :jpg],
|
653
|
-
:small => ["32x32#", :jpg]},
|
654
|
-
:default_style => :small}
|
655
|
-
@attachment = Paperclip::Attachment.new(:avatar,
|
656
|
-
@instance,
|
657
|
-
styles)
|
658
|
-
now = Time.now
|
659
|
-
Time.stubs(:now).returns(now)
|
660
|
-
@attachment.assign(@file)
|
661
|
-
@attachment.save
|
662
|
-
end
|
663
|
-
|
664
|
-
teardown do
|
665
|
-
@file.close
|
666
|
-
Paperclip::Attachment.default_options.merge!(@old_defaults)
|
667
|
-
end
|
668
|
-
|
669
|
-
should "should have matching to_s and url methods" do
|
670
|
-
file = @attachment.to_file
|
671
|
-
assert file
|
672
|
-
assert_match @attachment.to_s, @attachment.url
|
673
|
-
assert_match @attachment.to_s(:small), @attachment.url(:small)
|
674
|
-
file.close
|
675
|
-
end
|
676
|
-
end
|
677
650
|
|
678
651
|
context "Attachment with uppercase extension and a default style" do
|
679
652
|
setup do
|
data/test/fog_test.rb
CHANGED
@@ -24,7 +24,6 @@ class FogTest < Test::Unit::TestCase
|
|
24
24
|
:fog_directory => @fog_directory,
|
25
25
|
:fog_credentials => @credentials,
|
26
26
|
:fog_host => nil,
|
27
|
-
:fog_public => true,
|
28
27
|
:fog_file => {:cache_control => 1234},
|
29
28
|
:path => ":attachment/:basename.:extension",
|
30
29
|
:storage => :fog
|
@@ -100,7 +99,6 @@ class FogTest < Test::Unit::TestCase
|
|
100
99
|
:fog_directory => @fog_directory,
|
101
100
|
:fog_credentials => @credentials,
|
102
101
|
:fog_host => 'http://img%d.example.com',
|
103
|
-
:fog_public => true,
|
104
102
|
:path => ":attachment/:basename.:extension",
|
105
103
|
:storage => :fog
|
106
104
|
)
|
@@ -43,5 +43,45 @@ class ValidateAttachmentContentTypeMatcherTest < Test::Unit::TestCase
|
|
43
43
|
|
44
44
|
should_accept_dummy_class
|
45
45
|
end
|
46
|
+
|
47
|
+
context "given a class that matches and a matcher that only specifies 'allowing'" do
|
48
|
+
setup do
|
49
|
+
@dummy_class.validates_attachment_content_type :avatar, :content_type => %r{image/.*}
|
50
|
+
@matcher = self.class.validate_attachment_content_type(:avatar).
|
51
|
+
allowing(%w(image/png image/jpeg))
|
52
|
+
end
|
53
|
+
|
54
|
+
should_accept_dummy_class
|
55
|
+
end
|
56
|
+
|
57
|
+
context "given a class that does not match and a matcher that only specifies 'allowing'" do
|
58
|
+
setup do
|
59
|
+
@dummy_class.validates_attachment_content_type :avatar, :content_type => %r{audio/.*}
|
60
|
+
@matcher = self.class.validate_attachment_content_type(:avatar).
|
61
|
+
allowing(%w(image/png image/jpeg))
|
62
|
+
end
|
63
|
+
|
64
|
+
should_reject_dummy_class
|
65
|
+
end
|
66
|
+
|
67
|
+
context "given a class that matches and a matcher that only specifies 'rejecting'" do
|
68
|
+
setup do
|
69
|
+
@dummy_class.validates_attachment_content_type :avatar, :content_type => %r{image/.*}
|
70
|
+
@matcher = self.class.validate_attachment_content_type(:avatar).
|
71
|
+
rejecting(%w(audio/mp3 application/octet-stream))
|
72
|
+
end
|
73
|
+
|
74
|
+
should_accept_dummy_class
|
75
|
+
end
|
76
|
+
|
77
|
+
context "given a class that does not match and a matcher that only specifies 'rejecting'" do
|
78
|
+
setup do
|
79
|
+
@dummy_class.validates_attachment_content_type :avatar, :content_type => %r{audio/.*}
|
80
|
+
@matcher = self.class.validate_attachment_content_type(:avatar).
|
81
|
+
rejecting(%w(audio/mp3 application/octet-stream))
|
82
|
+
end
|
83
|
+
|
84
|
+
should_reject_dummy_class
|
85
|
+
end
|
46
86
|
end
|
47
87
|
end
|
data/test/storage_test.rb
CHANGED
@@ -79,6 +79,23 @@ class StorageTest < Test::Unit::TestCase
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
+
context "s3_host_name" do
|
83
|
+
setup do
|
84
|
+
AWS::S3::Base.stubs(:establish_connection!)
|
85
|
+
rebuild_model :storage => :s3,
|
86
|
+
:s3_credentials => {},
|
87
|
+
:bucket => "bucket",
|
88
|
+
:path => ":attachment/:basename.:extension",
|
89
|
+
:s3_host_name => "s3-ap-northeast-1.amazonaws.com"
|
90
|
+
@dummy = Dummy.new
|
91
|
+
@dummy.avatar = StringIO.new(".")
|
92
|
+
end
|
93
|
+
|
94
|
+
should "return a url based on an :s3_host_name path" do
|
95
|
+
assert_match %r{^http://s3-ap-northeast-1.amazonaws.com/bucket/avatars/stringio.txt}, @dummy.avatar.url
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
82
99
|
context "An attachment that uses S3 for storage and has styles that return different file types" do
|
83
100
|
setup do
|
84
101
|
AWS::S3::Base.stubs(:establish_connection!)
|
@@ -260,6 +277,33 @@ class StorageTest < Test::Unit::TestCase
|
|
260
277
|
end
|
261
278
|
end
|
262
279
|
|
280
|
+
context "Parsing S3 credentials with a s3_host_name in them" do
|
281
|
+
setup do
|
282
|
+
AWS::S3::Base.stubs(:establish_connection!)
|
283
|
+
rebuild_model :storage => :s3,
|
284
|
+
:s3_credentials => {
|
285
|
+
:production => {:s3_host_name => "s3-world-end.amazonaws.com"},
|
286
|
+
:development => { :s3_host_name => "s3-ap-northeast-1.amazonaws.com" }
|
287
|
+
}
|
288
|
+
@dummy = Dummy.new
|
289
|
+
end
|
290
|
+
|
291
|
+
should "get the right s3_host_name in production" do
|
292
|
+
rails_env("production")
|
293
|
+
assert_match %r{^s3-world-end.amazonaws.com}, @dummy.avatar.s3_host_name
|
294
|
+
end
|
295
|
+
|
296
|
+
should "get the right s3_host_name in development" do
|
297
|
+
rails_env("development")
|
298
|
+
assert_match %r{^s3-ap-northeast-1.amazonaws.com}, @dummy.avatar.s3_host_name
|
299
|
+
end
|
300
|
+
|
301
|
+
should "get the right s3_host_name if the key does not exist" do
|
302
|
+
rails_env("test")
|
303
|
+
assert_match %r{^s3.amazonaws.com}, @dummy.avatar.s3_host_name
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
263
307
|
context "An attachment with S3 storage" do
|
264
308
|
setup do
|
265
309
|
rebuild_model :storage => :s3,
|
data/test/thumbnail_test.rb
CHANGED
@@ -291,7 +291,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
291
291
|
end
|
292
292
|
|
293
293
|
should "use the -coalesce option" do
|
294
|
-
|
294
|
+
assert_equal @thumb.transformation_command.first, "-coalesce"
|
295
295
|
end
|
296
296
|
end
|
297
297
|
|
@@ -307,7 +307,25 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
307
307
|
end
|
308
308
|
|
309
309
|
should "use the -coalesce option" do
|
310
|
-
|
310
|
+
assert_equal @thumb.transformation_command.first, "-coalesce"
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
context "with animated option set to false" do
|
315
|
+
setup do
|
316
|
+
@thumb = Paperclip::Thumbnail.new(@file, :geometry => "50x50", :animated => false)
|
317
|
+
end
|
318
|
+
|
319
|
+
should "output the gif format" do
|
320
|
+
dst = @thumb.make
|
321
|
+
cmd = %Q[identify "#{dst.path}"]
|
322
|
+
assert_match /GIF/, `#{cmd}`.chomp
|
323
|
+
end
|
324
|
+
|
325
|
+
should "create the single frame thumbnail when sent #make" do
|
326
|
+
dst = @thumb.make
|
327
|
+
cmd = %Q[identify -format "%wx%h" "#{dst.path}"]
|
328
|
+
assert_equal "50x50", `#{cmd}`.chomp
|
311
329
|
end
|
312
330
|
end
|
313
331
|
end
|
metadata
CHANGED
@@ -1,126 +1,122 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.3.16
|
4
5
|
prerelease:
|
5
|
-
version: 2.3.15
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Jon Yurek
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-07-29 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: activerecord
|
18
|
-
requirement: &
|
16
|
+
requirement: &2154149360 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
23
21
|
version: 2.3.0
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
|
-
version_requirements: *
|
27
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *2154149360
|
25
|
+
- !ruby/object:Gem::Dependency
|
28
26
|
name: activesupport
|
29
|
-
requirement: &
|
27
|
+
requirement: &2154148840 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
34
32
|
version: 2.3.2
|
35
33
|
type: :runtime
|
36
34
|
prerelease: false
|
37
|
-
version_requirements: *
|
38
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *2154148840
|
36
|
+
- !ruby/object:Gem::Dependency
|
39
37
|
name: cocaine
|
40
|
-
requirement: &
|
38
|
+
requirement: &2154148160 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
45
43
|
version: 0.0.2
|
46
44
|
type: :runtime
|
47
45
|
prerelease: false
|
48
|
-
version_requirements: *
|
49
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *2154148160
|
47
|
+
- !ruby/object:Gem::Dependency
|
50
48
|
name: mime-types
|
51
|
-
requirement: &
|
49
|
+
requirement: &2154143920 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
57
55
|
type: :runtime
|
58
56
|
prerelease: false
|
59
|
-
version_requirements: *
|
60
|
-
- !ruby/object:Gem::Dependency
|
57
|
+
version_requirements: *2154143920
|
58
|
+
- !ruby/object:Gem::Dependency
|
61
59
|
name: shoulda
|
62
|
-
requirement: &
|
60
|
+
requirement: &2154139460 !ruby/object:Gem::Requirement
|
63
61
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
68
66
|
type: :development
|
69
67
|
prerelease: false
|
70
|
-
version_requirements: *
|
71
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: *2154139460
|
69
|
+
- !ruby/object:Gem::Dependency
|
72
70
|
name: appraisal
|
73
|
-
requirement: &
|
71
|
+
requirement: &2154138980 !ruby/object:Gem::Requirement
|
74
72
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version:
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
79
77
|
type: :development
|
80
78
|
prerelease: false
|
81
|
-
version_requirements: *
|
82
|
-
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: *2154138980
|
80
|
+
- !ruby/object:Gem::Dependency
|
83
81
|
name: mocha
|
84
|
-
requirement: &
|
82
|
+
requirement: &2154138200 !ruby/object:Gem::Requirement
|
85
83
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
90
88
|
type: :development
|
91
89
|
prerelease: false
|
92
|
-
version_requirements: *
|
93
|
-
- !ruby/object:Gem::Dependency
|
90
|
+
version_requirements: *2154138200
|
91
|
+
- !ruby/object:Gem::Dependency
|
94
92
|
name: aws-s3
|
95
|
-
requirement: &
|
93
|
+
requirement: &2154137060 !ruby/object:Gem::Requirement
|
96
94
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version:
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
101
99
|
type: :development
|
102
100
|
prerelease: false
|
103
|
-
version_requirements: *
|
104
|
-
- !ruby/object:Gem::Dependency
|
105
|
-
name: sqlite3
|
106
|
-
requirement: &
|
101
|
+
version_requirements: *2154137060
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: sqlite3
|
104
|
+
requirement: &2154136260 !ruby/object:Gem::Requirement
|
107
105
|
none: false
|
108
|
-
requirements:
|
109
|
-
- -
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version:
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
112
110
|
type: :development
|
113
111
|
prerelease: false
|
114
|
-
version_requirements: *
|
112
|
+
version_requirements: *2154136260
|
115
113
|
description: Easy upload management for ActiveRecord
|
116
114
|
email: jyurek@thoughtbot.com
|
117
115
|
executables: []
|
118
|
-
|
119
116
|
extensions: []
|
120
|
-
|
121
|
-
extra_rdoc_files:
|
117
|
+
extra_rdoc_files:
|
122
118
|
- README.md
|
123
|
-
files:
|
119
|
+
files:
|
124
120
|
- README.md
|
125
121
|
- LICENSE
|
126
122
|
- Rakefile
|
@@ -182,37 +178,34 @@ files:
|
|
182
178
|
- generators/paperclip/templates/paperclip_migration.rb.erb
|
183
179
|
- generators/paperclip/USAGE
|
184
180
|
- shoulda_macros/paperclip.rb
|
185
|
-
has_rdoc: true
|
186
181
|
homepage: https://github.com/thoughtbot/paperclip
|
187
182
|
licenses: []
|
188
|
-
|
189
183
|
post_install_message:
|
190
|
-
rdoc_options:
|
184
|
+
rdoc_options:
|
191
185
|
- --line-numbers
|
192
186
|
- --inline-source
|
193
|
-
require_paths:
|
187
|
+
require_paths:
|
194
188
|
- lib
|
195
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
189
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
196
190
|
none: false
|
197
|
-
requirements:
|
198
|
-
- -
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
|
201
|
-
segments:
|
191
|
+
requirements:
|
192
|
+
- - ! '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
segments:
|
202
196
|
- 0
|
203
|
-
|
204
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
|
+
hash: -2764173214089552631
|
198
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
199
|
none: false
|
206
|
-
requirements:
|
207
|
-
- -
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
version:
|
210
|
-
requirements:
|
200
|
+
requirements:
|
201
|
+
- - ! '>='
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '0'
|
204
|
+
requirements:
|
211
205
|
- ImageMagick
|
212
206
|
rubyforge_project: paperclip
|
213
|
-
rubygems_version: 1.
|
207
|
+
rubygems_version: 1.8.5
|
214
208
|
signing_key:
|
215
209
|
specification_version: 3
|
216
210
|
summary: File attachments as attributes for ActiveRecord
|
217
211
|
test_files: []
|
218
|
-
|