paperclip 2.3.16 → 2.4.0
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 +140 -4
- data/lib/paperclip.rb +46 -12
- data/lib/paperclip/attachment.rb +46 -5
- data/lib/paperclip/interpolations.rb +30 -1
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +2 -2
- data/lib/paperclip/missing_attachment_styles.rb +86 -0
- data/lib/paperclip/storage/filesystem.rb +3 -0
- data/lib/paperclip/storage/fog.rb +28 -5
- data/lib/paperclip/storage/s3.rb +3 -0
- data/lib/paperclip/style.rb +7 -3
- data/lib/paperclip/thumbnail.rb +15 -4
- data/lib/paperclip/version.rb +1 -1
- data/lib/tasks/paperclip.rake +16 -0
- data/test/attachment_test.rb +82 -8
- data/test/fixtures/fog.yml +8 -0
- data/test/fog_test.rb +74 -0
- data/test/helper.rb +1 -1
- data/test/integration_test.rb +32 -0
- data/test/interpolations_test.rb +32 -1
- data/test/paperclip_missing_attachment_styles_test.rb +80 -0
- data/test/paperclip_test.rb +22 -4
- data/test/storage_test.rb +17 -0
- data/test/style_test.rb +20 -0
- data/test/thumbnail_test.rb +51 -0
- data/test/upfile_test.rb +8 -0
- metadata +191 -140
data/test/helper.rb
CHANGED
data/test/integration_test.rb
CHANGED
@@ -283,6 +283,38 @@ class IntegrationTest < Test::Unit::TestCase
|
|
283
283
|
end
|
284
284
|
end
|
285
285
|
|
286
|
+
context "A model with no source_file_options setting" do
|
287
|
+
setup do
|
288
|
+
rebuild_model :styles => { :large => "300x300>",
|
289
|
+
:medium => "100x100",
|
290
|
+
:thumb => ["32x32#", :gif] },
|
291
|
+
:default_style => :medium,
|
292
|
+
:url => "/:attachment/:class/:style/:id/:basename.:extension",
|
293
|
+
:path => ":rails_root/tmp/:attachment/:class/:style/:id/:basename.:extension"
|
294
|
+
@dummy = Dummy.new
|
295
|
+
end
|
296
|
+
|
297
|
+
should "have its definition return nil when asked about source_file_options" do
|
298
|
+
assert ! Dummy.attachment_definitions[:avatar][:source_file_options]
|
299
|
+
end
|
300
|
+
|
301
|
+
context "redefined to have source_file_options setting" do
|
302
|
+
setup do
|
303
|
+
rebuild_model :styles => { :large => "300x300>",
|
304
|
+
:medium => "100x100",
|
305
|
+
:thumb => ["32x32#", :gif] },
|
306
|
+
:source_file_options => "-density 400",
|
307
|
+
:default_style => :medium,
|
308
|
+
:url => "/:attachment/:class/:style/:id/:basename.:extension",
|
309
|
+
:path => ":rails_root/tmp/:attachment/:class/:style/:id/:basename.:extension"
|
310
|
+
end
|
311
|
+
|
312
|
+
should "have its definition return source_file_options value when asked about source_file_options" do
|
313
|
+
assert_equal "-density 400", Dummy.attachment_definitions[:avatar][:source_file_options]
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
317
|
+
|
286
318
|
context "A model with a filesystem attachment" do
|
287
319
|
setup do
|
288
320
|
rebuild_model :styles => { :large => "300x300>",
|
data/test/interpolations_test.rb
CHANGED
@@ -50,6 +50,30 @@ class InterpolationsTest < Test::Unit::TestCase
|
|
50
50
|
assert_equal "png", Paperclip::Interpolations.extension(attachment, :style)
|
51
51
|
end
|
52
52
|
|
53
|
+
should "return the extension of the file based on the content type" do
|
54
|
+
attachment = mock
|
55
|
+
attachment.expects(:content_type).returns('image/jpeg')
|
56
|
+
interpolations = Paperclip::Interpolations
|
57
|
+
interpolations.expects(:extension).returns('random')
|
58
|
+
assert_equal "jpeg", interpolations.content_type_extension(attachment, :style)
|
59
|
+
end
|
60
|
+
|
61
|
+
should "return the original extension of the file if it matches a content type extension" do
|
62
|
+
attachment = mock
|
63
|
+
attachment.expects(:content_type).returns('image/jpeg')
|
64
|
+
interpolations = Paperclip::Interpolations
|
65
|
+
interpolations.expects(:extension).returns('jpe')
|
66
|
+
assert_equal "jpe", interpolations.content_type_extension(attachment, :style)
|
67
|
+
end
|
68
|
+
|
69
|
+
should "return the latter half of the content type of the extension if no match found" do
|
70
|
+
attachment = mock
|
71
|
+
attachment.expects(:content_type).at_least_once().returns('not/found')
|
72
|
+
interpolations = Paperclip::Interpolations
|
73
|
+
interpolations.expects(:extension).returns('random')
|
74
|
+
assert_equal "found", interpolations.content_type_extension(attachment, :style)
|
75
|
+
end
|
76
|
+
|
53
77
|
should "return the #to_param of the attachment" do
|
54
78
|
attachment = mock
|
55
79
|
attachment.expects(:to_param).returns("23-awesome")
|
@@ -64,13 +88,20 @@ class InterpolationsTest < Test::Unit::TestCase
|
|
64
88
|
assert_equal 23, Paperclip::Interpolations.id(attachment, :style)
|
65
89
|
end
|
66
90
|
|
67
|
-
should "return the partitioned id of the attachment" do
|
91
|
+
should "return the partitioned id of the attachment when the id is an integer" do
|
68
92
|
attachment = mock
|
69
93
|
attachment.expects(:id).returns(23)
|
70
94
|
attachment.expects(:instance).returns(attachment)
|
71
95
|
assert_equal "000/000/023", Paperclip::Interpolations.id_partition(attachment, :style)
|
72
96
|
end
|
73
97
|
|
98
|
+
should "return the partitioned id of the attachment when the id is a string" do
|
99
|
+
attachment = mock
|
100
|
+
attachment.expects(:id).returns("32fnj23oio2f")
|
101
|
+
attachment.expects(:instance).returns(attachment)
|
102
|
+
assert_equal "32f/nj2/3oi", Paperclip::Interpolations.id_partition(attachment, :style)
|
103
|
+
end
|
104
|
+
|
74
105
|
should "return the name of the attachment" do
|
75
106
|
attachment = mock
|
76
107
|
attachment.expects(:name).returns("file")
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require './test/helper'
|
2
|
+
|
3
|
+
class PaperclipMissingAttachmentStylesTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
context "Paperclip" do
|
6
|
+
setup do
|
7
|
+
Paperclip.classes_with_attachments = Set.new
|
8
|
+
end
|
9
|
+
|
10
|
+
teardown do
|
11
|
+
File.unlink(Paperclip.registered_attachments_styles_path) rescue nil
|
12
|
+
end
|
13
|
+
|
14
|
+
should "be able to keep list of models using it" do
|
15
|
+
assert_kind_of Set, Paperclip.classes_with_attachments
|
16
|
+
assert Paperclip.classes_with_attachments.empty?, 'list should be empty'
|
17
|
+
rebuild_model
|
18
|
+
assert_equal [Dummy].to_set, Paperclip.classes_with_attachments
|
19
|
+
end
|
20
|
+
|
21
|
+
should "enable to get and set path to registered styles file" do
|
22
|
+
assert_equal ROOT.join('public/system/paperclip_attachments.yml').to_s, Paperclip.registered_attachments_styles_path
|
23
|
+
Paperclip.registered_attachments_styles_path = '/tmp/config/paperclip_attachments.yml'
|
24
|
+
assert_equal '/tmp/config/paperclip_attachments.yml', Paperclip.registered_attachments_styles_path
|
25
|
+
Paperclip.registered_attachments_styles_path = nil
|
26
|
+
assert_equal ROOT.join('public/system/paperclip_attachments.yml').to_s, Paperclip.registered_attachments_styles_path
|
27
|
+
end
|
28
|
+
|
29
|
+
should "be able to get current attachment styles" do
|
30
|
+
assert_equal Hash.new, Paperclip.send(:current_attachments_styles)
|
31
|
+
rebuild_model :styles => {:croppable => '600x600>', :big => '1000x1000>'}
|
32
|
+
expected_hash = { :Dummy => {:avatar => [:big, :croppable]}}
|
33
|
+
assert_equal expected_hash, Paperclip.send(:current_attachments_styles)
|
34
|
+
end
|
35
|
+
|
36
|
+
should "be able to save current attachment styles for further comparison" do
|
37
|
+
rebuild_model :styles => {:croppable => '600x600>', :big => '1000x1000>'}
|
38
|
+
Paperclip.save_current_attachments_styles!
|
39
|
+
expected_hash = { :Dummy => {:avatar => [:big, :croppable]}}
|
40
|
+
assert_equal expected_hash, YAML.load_file(Paperclip.registered_attachments_styles_path)
|
41
|
+
end
|
42
|
+
|
43
|
+
should "be able to read registered attachment styles from file" do
|
44
|
+
rebuild_model :styles => {:croppable => '600x600>', :big => '1000x1000>'}
|
45
|
+
Paperclip.save_current_attachments_styles!
|
46
|
+
expected_hash = { :Dummy => {:avatar => [:big, :croppable]}}
|
47
|
+
assert_equal expected_hash, Paperclip.send(:get_registered_attachments_styles)
|
48
|
+
end
|
49
|
+
|
50
|
+
should "be able to calculate differences between registered styles and current styles" do
|
51
|
+
rebuild_model :styles => {:croppable => '600x600>', :big => '1000x1000>'}
|
52
|
+
Paperclip.save_current_attachments_styles!
|
53
|
+
rebuild_model :styles => {:thumb => 'x100', :export => 'x400>', :croppable => '600x600>', :big => '1000x1000>'}
|
54
|
+
expected_hash = { :Dummy => {:avatar => [:export, :thumb]} }
|
55
|
+
assert_equal expected_hash, Paperclip.missing_attachments_styles
|
56
|
+
|
57
|
+
ActiveRecord::Base.connection.create_table :books, :force => true
|
58
|
+
class ::Book < ActiveRecord::Base
|
59
|
+
has_attached_file :cover, :styles => {:small => 'x100', :large => '1000x1000>'}
|
60
|
+
has_attached_file :sample, :styles => {:thumb => 'x100'}
|
61
|
+
end
|
62
|
+
|
63
|
+
expected_hash = {
|
64
|
+
:Dummy => {:avatar => [:export, :thumb]},
|
65
|
+
:Book => {:sample => [:thumb], :cover => [:large, :small]}
|
66
|
+
}
|
67
|
+
assert_equal expected_hash, Paperclip.missing_attachments_styles
|
68
|
+
Paperclip.save_current_attachments_styles!
|
69
|
+
assert_equal Hash.new, Paperclip.missing_attachments_styles
|
70
|
+
end
|
71
|
+
|
72
|
+
# It's impossible to build styles hash without loading from database whole bunch of records
|
73
|
+
should "skip lambda-styles" do
|
74
|
+
rebuild_model :styles => lambda{ |attachment| attachment.instance.other == 'a' ? {:thumb => "50x50#"} : {:large => "400x400"} }
|
75
|
+
assert_equal Hash.new, Paperclip.send(:current_attachments_styles)
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
data/test/paperclip_test.rb
CHANGED
@@ -25,10 +25,6 @@ class PaperclipTest < Test::Unit::TestCase
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
should "raise when sent #processor and the name of a class that exists but isn't a subclass of Processor" do
|
29
|
-
assert_raises(Paperclip::PaperclipError){ Paperclip.processor(:attachment) }
|
30
|
-
end
|
31
|
-
|
32
28
|
should "raise when sent #processor and the name of a class that doesn't exist" do
|
33
29
|
assert_raises(NameError){ Paperclip.processor(:boogey_man) }
|
34
30
|
end
|
@@ -276,4 +272,26 @@ class PaperclipTest < Test::Unit::TestCase
|
|
276
272
|
end
|
277
273
|
|
278
274
|
end
|
275
|
+
|
276
|
+
context "configuring a custom processor" do
|
277
|
+
setup do
|
278
|
+
@freedom_processor = Class.new do
|
279
|
+
def make(file, options = {}, attachment = nil)
|
280
|
+
file
|
281
|
+
end
|
282
|
+
end.new
|
283
|
+
|
284
|
+
Paperclip.configure do |config|
|
285
|
+
config.register_processor(:freedom, @freedom_processor)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
should "be able to find the custom processor" do
|
290
|
+
assert_equal @freedom_processor, Paperclip.processor(:freedom)
|
291
|
+
end
|
292
|
+
|
293
|
+
teardown do
|
294
|
+
Paperclip.clear_processors!
|
295
|
+
end
|
296
|
+
end
|
279
297
|
end
|
data/test/storage_test.rb
CHANGED
@@ -29,6 +29,14 @@ class StorageTest < Test::Unit::TestCase
|
|
29
29
|
@dummy.save
|
30
30
|
assert File.exists?(@dummy.avatar.path(:thumbnail))
|
31
31
|
end
|
32
|
+
|
33
|
+
should "clean up file objects" do
|
34
|
+
File.stubs(:exist?).returns(true)
|
35
|
+
Paperclip::Tempfile.any_instance.expects(:close).at_least_once()
|
36
|
+
Paperclip::Tempfile.any_instance.expects(:unlink).at_least_once()
|
37
|
+
|
38
|
+
@dummy.save!
|
39
|
+
end
|
32
40
|
end
|
33
41
|
|
34
42
|
context "Parsing S3 credentials" do
|
@@ -349,6 +357,15 @@ class StorageTest < Test::Unit::TestCase
|
|
349
357
|
end
|
350
358
|
end
|
351
359
|
|
360
|
+
should "delete tempfiles" do
|
361
|
+
AWS::S3::S3Object.stubs(:store).with(@dummy.avatar.path, anything, 'testing', :content_type => 'image/png', :access => :public_read)
|
362
|
+
File.stubs(:exist?).returns(true)
|
363
|
+
Paperclip::Tempfile.any_instance.expects(:close).at_least_once()
|
364
|
+
Paperclip::Tempfile.any_instance.expects(:unlink).at_least_once()
|
365
|
+
|
366
|
+
@dummy.save!
|
367
|
+
end
|
368
|
+
|
352
369
|
context "and saved without a bucket" do
|
353
370
|
setup do
|
354
371
|
class AWS::S3::NoSuchBucket < AWS::S3::ResponseError
|
data/test/style_test.rb
CHANGED
@@ -117,6 +117,26 @@ class StyleTest < Test::Unit::TestCase
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
context "An attachment with :source_file_options" do
|
121
|
+
setup do
|
122
|
+
@attachment = attachment :path => ":basename.:extension",
|
123
|
+
:styles => {:thumb => "100x100", :large => "400x400"},
|
124
|
+
:source_file_options => {:all => "-density 400", :thumb => "-depth 8"}
|
125
|
+
@style = @attachment.styles[:thumb]
|
126
|
+
@file = StringIO.new("...")
|
127
|
+
@file.stubs(:original_filename).returns("file.jpg")
|
128
|
+
end
|
129
|
+
|
130
|
+
before_should "not have called extra_source_file_options_for(:thumb/:large) on initialization" do
|
131
|
+
@attachment.expects(:extra_source_file_options_for).never
|
132
|
+
end
|
133
|
+
|
134
|
+
should "call extra_options_for(:thumb/:large) when convert options are requested" do
|
135
|
+
@attachment.expects(:extra_source_file_options_for).with(:thumb)
|
136
|
+
@attachment.styles[:thumb].source_file_options
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
120
140
|
context "A style rule with its own :processors" do
|
121
141
|
setup do
|
122
142
|
@attachment = attachment :path => ":basename.:extension",
|
data/test/thumbnail_test.rb
CHANGED
@@ -102,6 +102,10 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
102
102
|
assert_equal nil, @thumb.convert_options
|
103
103
|
end
|
104
104
|
|
105
|
+
should "have source_file_options set to nil by default" do
|
106
|
+
assert_equal nil, @thumb.source_file_options
|
107
|
+
end
|
108
|
+
|
105
109
|
should "send the right command to convert when sent #make" do
|
106
110
|
Paperclip.expects(:run).with do |*arg|
|
107
111
|
arg[0] == 'convert' &&
|
@@ -220,6 +224,53 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
220
224
|
assert !@thumb.transformation_command.include?("-resize")
|
221
225
|
end
|
222
226
|
end
|
227
|
+
|
228
|
+
context "passing a custom file geometry parser" do
|
229
|
+
should "produce the appropriate transformation_command" do
|
230
|
+
GeoParser = Class.new do
|
231
|
+
def self.from_file(file)
|
232
|
+
new
|
233
|
+
end
|
234
|
+
def transformation_to(target, should_crop)
|
235
|
+
["SCALE", "CROP"]
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
thumb = Paperclip::Thumbnail.new(@file, :geometry => '50x50', :file_geometry_parser => GeoParser)
|
240
|
+
|
241
|
+
transformation_command = thumb.transformation_command
|
242
|
+
|
243
|
+
assert transformation_command.include?('-crop'),
|
244
|
+
%{expected #{transformation_command.inspect} to include '-crop'}
|
245
|
+
assert transformation_command.include?('"CROP"'),
|
246
|
+
%{expected #{transformation_command.inspect} to include '"CROP"'}
|
247
|
+
assert transformation_command.include?('-resize'),
|
248
|
+
%{expected #{transformation_command.inspect} to include '-resize'}
|
249
|
+
assert transformation_command.include?('"SCALE"'),
|
250
|
+
%{expected #{transformation_command.inspect} to include '"SCALE"'}
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
context "passing a custom geometry string parser" do
|
255
|
+
should "produce the appropriate transformation_command" do
|
256
|
+
GeoParser = Class.new do
|
257
|
+
def self.parse(s)
|
258
|
+
new
|
259
|
+
end
|
260
|
+
|
261
|
+
def to_s
|
262
|
+
"151x167"
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
thumb = Paperclip::Thumbnail.new(@file, :geometry => '50x50', :string_geometry_parser => GeoParser)
|
267
|
+
|
268
|
+
transformation_command = thumb.transformation_command
|
269
|
+
|
270
|
+
assert transformation_command.include?('"151x167"'),
|
271
|
+
%{expected #{transformation_command.inspect} to include '151x167'}
|
272
|
+
end
|
273
|
+
end
|
223
274
|
end
|
224
275
|
|
225
276
|
context "A multipage PDF" do
|
data/test/upfile_test.rb
CHANGED
@@ -24,6 +24,14 @@ class UpfileTest < Test::Unit::TestCase
|
|
24
24
|
|
25
25
|
assert_equal content_type, file.content_type
|
26
26
|
end
|
27
|
+
|
28
|
+
should "return a content_type of text/plain on a real file whose content_type is determined with the file command" do
|
29
|
+
file = File.new(File.join(File.dirname(__FILE__), "..", "LICENSE"))
|
30
|
+
class << file
|
31
|
+
include Paperclip::Upfile
|
32
|
+
end
|
33
|
+
assert_equal 'text/plain', file.content_type
|
34
|
+
end
|
27
35
|
end
|
28
36
|
end
|
29
37
|
|
metadata
CHANGED
@@ -1,211 +1,262 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 2.4.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Jon Yurek
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
|
18
|
+
date: 2011-08-31 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
type: :runtime
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 3
|
32
|
+
- 0
|
21
33
|
version: 2.3.0
|
22
|
-
|
34
|
+
name: activerecord
|
23
35
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
|
27
|
-
requirement: &
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
type: :runtime
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
40
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 7
|
45
|
+
segments:
|
46
|
+
- 2
|
47
|
+
- 3
|
48
|
+
- 2
|
32
49
|
version: 2.3.2
|
33
|
-
|
50
|
+
name: activesupport
|
34
51
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
|
38
|
-
requirement: &
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
type: :runtime
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
56
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 27
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 0
|
64
|
+
- 2
|
43
65
|
version: 0.0.2
|
44
|
-
|
66
|
+
name: cocaine
|
45
67
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: mime-types
|
49
|
-
requirement: &2154143920 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ! '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
68
|
+
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
55
70
|
type: :runtime
|
56
|
-
|
57
|
-
version_requirements: *2154143920
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: shoulda
|
60
|
-
requirement: &2154139460 !ruby/object:Gem::Requirement
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
61
72
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
66
|
-
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
name: mime-types
|
67
81
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: appraisal
|
71
|
-
requirement: &2154138980 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ! '>='
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
82
|
+
version_requirements: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
77
84
|
type: :development
|
78
|
-
|
79
|
-
version_requirements: *2154138980
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: mocha
|
82
|
-
requirement: &2154138200 !ruby/object:Gem::Requirement
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
83
86
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
88
|
-
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
94
|
+
name: shoulda
|
89
95
|
prerelease: false
|
90
|
-
version_requirements: *
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
|
93
|
-
requirement: &
|
96
|
+
version_requirements: *id005
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
type: :development
|
99
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
100
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 3
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
version: "0"
|
108
|
+
name: appraisal
|
109
|
+
prerelease: false
|
110
|
+
version_requirements: *id006
|
111
|
+
- !ruby/object:Gem::Dependency
|
99
112
|
type: :development
|
113
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
hash: 3
|
119
|
+
segments:
|
120
|
+
- 0
|
121
|
+
version: "0"
|
122
|
+
name: mocha
|
100
123
|
prerelease: false
|
101
|
-
version_requirements: *
|
102
|
-
- !ruby/object:Gem::Dependency
|
103
|
-
|
104
|
-
requirement: &
|
124
|
+
version_requirements: *id007
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
type: :development
|
127
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
105
128
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 3
|
133
|
+
segments:
|
134
|
+
- 0
|
135
|
+
version: "0"
|
136
|
+
name: aws-s3
|
137
|
+
prerelease: false
|
138
|
+
version_requirements: *id008
|
139
|
+
- !ruby/object:Gem::Dependency
|
110
140
|
type: :development
|
141
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
hash: 3
|
147
|
+
segments:
|
148
|
+
- 0
|
149
|
+
version: "0"
|
150
|
+
name: sqlite3
|
111
151
|
prerelease: false
|
112
|
-
version_requirements: *
|
152
|
+
version_requirements: *id009
|
113
153
|
description: Easy upload management for ActiveRecord
|
114
154
|
email: jyurek@thoughtbot.com
|
115
155
|
executables: []
|
156
|
+
|
116
157
|
extensions: []
|
117
|
-
|
158
|
+
|
159
|
+
extra_rdoc_files:
|
118
160
|
- README.md
|
119
|
-
files:
|
161
|
+
files:
|
120
162
|
- README.md
|
121
163
|
- LICENSE
|
122
164
|
- Rakefile
|
123
165
|
- init.rb
|
124
|
-
- lib/
|
125
|
-
- lib/
|
126
|
-
- lib/
|
166
|
+
- lib/paperclip/storage/fog.rb
|
167
|
+
- lib/paperclip/storage/s3.rb
|
168
|
+
- lib/paperclip/storage/filesystem.rb
|
169
|
+
- lib/paperclip/storage.rb
|
127
170
|
- lib/paperclip/attachment.rb
|
128
171
|
- lib/paperclip/callback_compatibility.rb
|
129
|
-
- lib/paperclip/geometry.rb
|
130
|
-
- lib/paperclip/interpolations.rb
|
131
|
-
- lib/paperclip/iostream.rb
|
132
172
|
- lib/paperclip/matchers/have_attached_file_matcher.rb
|
133
|
-
- lib/paperclip/matchers/validate_attachment_content_type_matcher.rb
|
134
|
-
- lib/paperclip/matchers/validate_attachment_presence_matcher.rb
|
135
173
|
- lib/paperclip/matchers/validate_attachment_size_matcher.rb
|
136
|
-
- lib/paperclip/matchers.rb
|
137
|
-
- lib/paperclip/
|
138
|
-
- lib/paperclip/railtie.rb
|
139
|
-
- lib/paperclip/storage/filesystem.rb
|
140
|
-
- lib/paperclip/storage/fog.rb
|
141
|
-
- lib/paperclip/storage/s3.rb
|
142
|
-
- lib/paperclip/storage.rb
|
143
|
-
- lib/paperclip/style.rb
|
174
|
+
- lib/paperclip/matchers/validate_attachment_presence_matcher.rb
|
175
|
+
- lib/paperclip/matchers/validate_attachment_content_type_matcher.rb
|
144
176
|
- lib/paperclip/thumbnail.rb
|
177
|
+
- lib/paperclip/processor.rb
|
178
|
+
- lib/paperclip/geometry.rb
|
179
|
+
- lib/paperclip/iostream.rb
|
180
|
+
- lib/paperclip/missing_attachment_styles.rb
|
181
|
+
- lib/paperclip/matchers.rb
|
145
182
|
- lib/paperclip/upfile.rb
|
183
|
+
- lib/paperclip/interpolations.rb
|
146
184
|
- lib/paperclip/version.rb
|
147
|
-
- lib/paperclip.rb
|
185
|
+
- lib/paperclip/railtie.rb
|
186
|
+
- lib/paperclip/style.rb
|
148
187
|
- lib/tasks/paperclip.rake
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
188
|
+
- lib/generators/paperclip/USAGE
|
189
|
+
- lib/generators/paperclip/paperclip_generator.rb
|
190
|
+
- lib/generators/paperclip/templates/paperclip_migration.rb.erb
|
191
|
+
- lib/paperclip.rb
|
192
|
+
- test/processor_test.rb
|
193
|
+
- test/paperclip_test.rb
|
194
|
+
- test/upfile_test.rb
|
195
|
+
- test/paperclip_missing_attachment_styles_test.rb
|
196
|
+
- test/matchers/have_attached_file_matcher_test.rb
|
197
|
+
- test/matchers/validate_attachment_presence_matcher_test.rb
|
198
|
+
- test/matchers/validate_attachment_size_matcher_test.rb
|
199
|
+
- test/matchers/validate_attachment_content_type_matcher_test.rb
|
200
|
+
- test/storage_test.rb
|
201
|
+
- test/style_test.rb
|
202
|
+
- test/fixtures/fog.yml
|
203
|
+
- test/fixtures/s3.yml
|
152
204
|
- test/fixtures/50x50.png
|
153
|
-
- test/fixtures/
|
205
|
+
- test/fixtures/12k.png
|
154
206
|
- test/fixtures/animated.gif
|
155
|
-
- test/fixtures/bad.png
|
156
|
-
- test/fixtures/s3.yml
|
157
|
-
- test/fixtures/text.txt
|
158
|
-
- test/fixtures/twopage.pdf
|
159
207
|
- test/fixtures/uppercase.PNG
|
160
|
-
- test/
|
208
|
+
- test/fixtures/twopage.pdf
|
209
|
+
- test/fixtures/text.txt
|
210
|
+
- test/fixtures/5k.png
|
211
|
+
- test/fixtures/bad.png
|
161
212
|
- test/geometry_test.rb
|
213
|
+
- test/fog_test.rb
|
214
|
+
- test/attachment_test.rb
|
162
215
|
- test/helper.rb
|
163
|
-
- test/integration_test.rb
|
164
216
|
- test/interpolations_test.rb
|
165
|
-
- test/iostream_test.rb
|
166
|
-
- test/matchers/have_attached_file_matcher_test.rb
|
167
|
-
- test/matchers/validate_attachment_content_type_matcher_test.rb
|
168
|
-
- test/matchers/validate_attachment_presence_matcher_test.rb
|
169
|
-
- test/matchers/validate_attachment_size_matcher_test.rb
|
170
|
-
- test/paperclip_test.rb
|
171
|
-
- test/processor_test.rb
|
172
|
-
- test/storage_test.rb
|
173
|
-
- test/style_test.rb
|
174
217
|
- test/thumbnail_test.rb
|
175
|
-
- test/
|
218
|
+
- test/integration_test.rb
|
219
|
+
- test/iostream_test.rb
|
220
|
+
- test/database.yml
|
176
221
|
- rails/init.rb
|
222
|
+
- generators/paperclip/USAGE
|
177
223
|
- generators/paperclip/paperclip_generator.rb
|
178
224
|
- generators/paperclip/templates/paperclip_migration.rb.erb
|
179
|
-
- generators/paperclip/USAGE
|
180
225
|
- shoulda_macros/paperclip.rb
|
226
|
+
has_rdoc: true
|
181
227
|
homepage: https://github.com/thoughtbot/paperclip
|
182
228
|
licenses: []
|
229
|
+
|
183
230
|
post_install_message:
|
184
|
-
rdoc_options:
|
231
|
+
rdoc_options:
|
185
232
|
- --line-numbers
|
186
233
|
- --inline-source
|
187
|
-
require_paths:
|
234
|
+
require_paths:
|
188
235
|
- lib
|
189
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
236
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
190
237
|
none: false
|
191
|
-
requirements:
|
192
|
-
- -
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
|
195
|
-
segments:
|
238
|
+
requirements:
|
239
|
+
- - ">="
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
hash: 3
|
242
|
+
segments:
|
196
243
|
- 0
|
197
|
-
|
198
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
|
+
version: "0"
|
245
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
246
|
none: false
|
200
|
-
requirements:
|
201
|
-
- -
|
202
|
-
- !ruby/object:Gem::Version
|
203
|
-
|
204
|
-
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
hash: 3
|
251
|
+
segments:
|
252
|
+
- 0
|
253
|
+
version: "0"
|
254
|
+
requirements:
|
205
255
|
- ImageMagick
|
206
256
|
rubyforge_project: paperclip
|
207
|
-
rubygems_version: 1.
|
257
|
+
rubygems_version: 1.6.2
|
208
258
|
signing_key:
|
209
259
|
specification_version: 3
|
210
260
|
summary: File attachments as attributes for ActiveRecord
|
211
261
|
test_files: []
|
262
|
+
|