paperclip 2.3.1.1 → 2.3.2
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.rdoc +6 -1
- data/Rakefile +11 -38
- data/generators/paperclip/USAGE +2 -2
- data/generators/paperclip/paperclip_generator.rb +8 -8
- data/lib/generators/paperclip/USAGE +8 -0
- data/lib/generators/paperclip/paperclip_generator.rb +31 -0
- data/lib/generators/paperclip/templates/paperclip_migration.rb.erb +19 -0
- data/lib/paperclip.rb +113 -69
- data/lib/paperclip/attachment.rb +58 -146
- data/lib/paperclip/callback_compatability.rb +50 -22
- data/lib/paperclip/geometry.rb +7 -7
- data/lib/paperclip/interpolations.rb +21 -21
- data/lib/paperclip/iostream.rb +3 -2
- data/lib/paperclip/matchers.rb +29 -0
- data/lib/paperclip/matchers/have_attached_file_matcher.rb +8 -0
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +13 -5
- data/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +13 -7
- data/lib/paperclip/matchers/validate_attachment_size_matcher.rb +16 -4
- data/lib/paperclip/processor.rb +2 -2
- data/lib/paperclip/railtie.rb +22 -0
- data/lib/paperclip/storage.rb +29 -25
- data/lib/paperclip/style.rb +90 -0
- data/lib/paperclip/thumbnail.rb +20 -15
- data/lib/paperclip/upfile.rb +5 -2
- data/lib/paperclip/version.rb +3 -0
- data/{tasks/paperclip_tasks.rake → lib/tasks/paperclip.rake} +0 -0
- data/rails/init.rb +2 -0
- data/shoulda_macros/paperclip.rb +5 -3
- data/test/attachment_test.rb +52 -74
- data/test/geometry_test.rb +1 -1
- data/test/helper.rb +62 -22
- data/test/integration_test.rb +8 -8
- data/test/interpolations_test.rb +4 -4
- data/test/iostream_test.rb +9 -2
- data/test/matchers/have_attached_file_matcher_test.rb +9 -6
- data/test/matchers/validate_attachment_content_type_matcher_test.rb +15 -8
- data/test/matchers/validate_attachment_presence_matcher_test.rb +11 -6
- data/test/matchers/validate_attachment_size_matcher_test.rb +18 -17
- data/test/paperclip_test.rb +58 -68
- data/test/storage_test.rb +53 -13
- data/test/style_test.rb +141 -0
- data/test/thumbnail_test.rb +17 -17
- data/test/upfile_test.rb +8 -0
- metadata +69 -42
data/test/storage_test.rb
CHANGED
@@ -4,7 +4,7 @@ require 'aws/s3'
|
|
4
4
|
class StorageTest < Test::Unit::TestCase
|
5
5
|
def rails_env(env)
|
6
6
|
silence_warnings do
|
7
|
-
Object.const_set(:
|
7
|
+
Object.const_set(:Rails, stub('Rails', :env => env))
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
@@ -17,12 +17,6 @@ class StorageTest < Test::Unit::TestCase
|
|
17
17
|
|
18
18
|
@dummy = Dummy.new
|
19
19
|
@avatar = @dummy.avatar
|
20
|
-
|
21
|
-
@current_env = RAILS_ENV
|
22
|
-
end
|
23
|
-
|
24
|
-
teardown do
|
25
|
-
rails_env(@current_env)
|
26
20
|
end
|
27
21
|
|
28
22
|
should "get the correct credentials when RAILS_ENV is production" do
|
@@ -97,6 +91,33 @@ class StorageTest < Test::Unit::TestCase
|
|
97
91
|
end
|
98
92
|
end
|
99
93
|
|
94
|
+
context "Generating a url with an expiration" do
|
95
|
+
setup do
|
96
|
+
AWS::S3::Base.stubs(:establish_connection!)
|
97
|
+
rebuild_model :storage => :s3,
|
98
|
+
:s3_credentials => {
|
99
|
+
:production => { :bucket => "prod_bucket" },
|
100
|
+
:development => { :bucket => "dev_bucket" }
|
101
|
+
},
|
102
|
+
:s3_host_alias => "something.something.com",
|
103
|
+
:path => ":attachment/:basename.:extension",
|
104
|
+
:url => ":s3_alias_url"
|
105
|
+
|
106
|
+
rails_env("production")
|
107
|
+
|
108
|
+
@dummy = Dummy.new
|
109
|
+
@dummy.avatar = StringIO.new(".")
|
110
|
+
|
111
|
+
AWS::S3::S3Object.expects(:url_for).with("avatars/stringio.txt", "prod_bucket", { :expires_in => 3600 })
|
112
|
+
|
113
|
+
@dummy.avatar.expiring_url
|
114
|
+
end
|
115
|
+
|
116
|
+
should "should succeed" do
|
117
|
+
assert true
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
100
121
|
context "Parsing S3 credentials with a bucket in them" do
|
101
122
|
setup do
|
102
123
|
AWS::S3::Base.stubs(:establish_connection!)
|
@@ -106,11 +127,8 @@ class StorageTest < Test::Unit::TestCase
|
|
106
127
|
:development => { :bucket => "dev_bucket" }
|
107
128
|
}
|
108
129
|
@dummy = Dummy.new
|
109
|
-
@old_env = RAILS_ENV
|
110
130
|
end
|
111
131
|
|
112
|
-
teardown{ rails_env(@old_env) }
|
113
|
-
|
114
132
|
should "get the right bucket in production" do
|
115
133
|
rails_env("production")
|
116
134
|
assert_equal "prod_bucket", @dummy.avatar.bucket_name
|
@@ -166,7 +184,7 @@ class StorageTest < Test::Unit::TestCase
|
|
166
184
|
assert true
|
167
185
|
end
|
168
186
|
end
|
169
|
-
|
187
|
+
|
170
188
|
context "and remove" do
|
171
189
|
setup do
|
172
190
|
AWS::S3::S3Object.stubs(:exists?).returns(true)
|
@@ -180,7 +198,7 @@ class StorageTest < Test::Unit::TestCase
|
|
180
198
|
end
|
181
199
|
end
|
182
200
|
end
|
183
|
-
|
201
|
+
|
184
202
|
context "An attachment with S3 storage and bucket defined as a Proc" do
|
185
203
|
setup do
|
186
204
|
AWS::S3::Base.stubs(:establish_connection!)
|
@@ -188,7 +206,7 @@ class StorageTest < Test::Unit::TestCase
|
|
188
206
|
:bucket => lambda { |attachment| "bucket_#{attachment.instance.other}" },
|
189
207
|
:s3_credentials => {:not => :important}
|
190
208
|
end
|
191
|
-
|
209
|
+
|
192
210
|
should "get the right bucket name" do
|
193
211
|
assert "bucket_a", Dummy.new(:other => 'a').avatar.bucket_name
|
194
212
|
assert "bucket_b", Dummy.new(:other => 'b').avatar.bucket_name
|
@@ -236,6 +254,28 @@ class StorageTest < Test::Unit::TestCase
|
|
236
254
|
end
|
237
255
|
end
|
238
256
|
|
257
|
+
context "with S3 credentials supplied as Pathname" do
|
258
|
+
setup do
|
259
|
+
ENV['S3_KEY'] = 'pathname_key'
|
260
|
+
ENV['S3_BUCKET'] = 'pathname_bucket'
|
261
|
+
ENV['S3_SECRET'] = 'pathname_secret'
|
262
|
+
|
263
|
+
rails_env('test')
|
264
|
+
|
265
|
+
rebuild_model :storage => :s3,
|
266
|
+
:s3_credentials => Pathname.new(File.join(File.dirname(__FILE__))).join("fixtures/s3.yml")
|
267
|
+
|
268
|
+
Dummy.delete_all
|
269
|
+
@dummy = Dummy.new
|
270
|
+
end
|
271
|
+
|
272
|
+
should "parse the credentials" do
|
273
|
+
assert_equal 'pathname_bucket', @dummy.avatar.bucket_name
|
274
|
+
assert_equal 'pathname_key', AWS::S3::Base.connection.options[:access_key_id]
|
275
|
+
assert_equal 'pathname_secret', AWS::S3::Base.connection.options[:secret_access_key]
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
239
279
|
context "with S3 credentials in a YAML file" do
|
240
280
|
setup do
|
241
281
|
ENV['S3_KEY'] = 'env_key'
|
data/test/style_test.rb
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'test/helper'
|
3
|
+
|
4
|
+
class StyleTest < Test::Unit::TestCase
|
5
|
+
|
6
|
+
context "A style rule" do
|
7
|
+
setup do
|
8
|
+
@attachment = attachment :path => ":basename.:extension",
|
9
|
+
:styles => { :foo => {:geometry => "100x100#", :format => :png} }
|
10
|
+
@style = @attachment.styles[:foo]
|
11
|
+
end
|
12
|
+
|
13
|
+
should "be held as a Style object" do
|
14
|
+
assert_kind_of Paperclip::Style, @style
|
15
|
+
end
|
16
|
+
|
17
|
+
should "get processors from the attachment definition" do
|
18
|
+
assert_equal [:thumbnail], @style.processors
|
19
|
+
end
|
20
|
+
|
21
|
+
should "have the right geometry" do
|
22
|
+
assert_equal "100x100#", @style.geometry
|
23
|
+
end
|
24
|
+
|
25
|
+
should "be whiny if the attachment is" do
|
26
|
+
@attachment.expects(:whiny).returns(true)
|
27
|
+
assert @style.whiny?
|
28
|
+
end
|
29
|
+
|
30
|
+
should "respond to hash notation" do
|
31
|
+
assert_equal [:thumbnail], @style[:processors]
|
32
|
+
assert_equal "100x100#", @style[:geometry]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "A style rule with properties supplied as procs" do
|
37
|
+
setup do
|
38
|
+
@attachment = attachment :path => ":basename.:extension",
|
39
|
+
:whiny_thumbnails => true,
|
40
|
+
:processors => lambda {|a| [:test]},
|
41
|
+
:styles => {
|
42
|
+
:foo => lambda{|a| "300x300#"},
|
43
|
+
:bar => {
|
44
|
+
:geometry => lambda{|a| "300x300#"}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
should "defer processing of procs until they are needed" do
|
50
|
+
assert_kind_of Proc, @attachment.styles[:foo].instance_variable_get("@geometry")
|
51
|
+
assert_kind_of Proc, @attachment.styles[:bar].instance_variable_get("@geometry")
|
52
|
+
assert_kind_of Proc, @attachment.instance_variable_get("@processors")
|
53
|
+
end
|
54
|
+
|
55
|
+
should "call procs when they are needed" do
|
56
|
+
assert_equal "300x300#", @attachment.styles[:foo].geometry
|
57
|
+
assert_equal "300x300#", @attachment.styles[:bar].geometry
|
58
|
+
assert_equal [:test], @attachment.styles[:foo].processors
|
59
|
+
assert_equal [:test], @attachment.styles[:bar].processors
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context "An attachment with style rules in various forms" do
|
64
|
+
setup do
|
65
|
+
@attachment = attachment :path => ":basename.:extension",
|
66
|
+
:styles => {
|
67
|
+
:aslist => ["100x100", :png],
|
68
|
+
:ashash => {:geometry => "100x100", :format => :png},
|
69
|
+
:asstring => "100x100"
|
70
|
+
}
|
71
|
+
end
|
72
|
+
should "have the right number of styles" do
|
73
|
+
assert_kind_of Hash, @attachment.styles
|
74
|
+
assert_equal 3, @attachment.styles.size
|
75
|
+
end
|
76
|
+
|
77
|
+
should "have styles as Style objects" do
|
78
|
+
[:aslist, :ashash, :aslist].each do |s|
|
79
|
+
assert_kind_of Paperclip::Style, @attachment.styles[s]
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
should "have the right geometries" do
|
84
|
+
[:aslist, :ashash, :aslist].each do |s|
|
85
|
+
assert_equal @attachment.styles[s].geometry, "100x100"
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
should "have the right formats" do
|
90
|
+
assert_equal @attachment.styles[:aslist].format, :png
|
91
|
+
assert_equal @attachment.styles[:ashash].format, :png
|
92
|
+
assert_nil @attachment.styles[:asstring].format
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
context "An attachment with :convert_options" do
|
98
|
+
setup do
|
99
|
+
@attachment = attachment :path => ":basename.:extension",
|
100
|
+
:styles => {:thumb => "100x100", :large => "400x400"},
|
101
|
+
:convert_options => {:all => "-do_stuff", :thumb => "-thumbnailize"}
|
102
|
+
@style = @attachment.styles[:thumb]
|
103
|
+
@file = StringIO.new("...")
|
104
|
+
@file.stubs(:original_filename).returns("file.jpg")
|
105
|
+
end
|
106
|
+
|
107
|
+
before_should "not have called extra_options_for(:thumb/:large) on initialization" do
|
108
|
+
@attachment.expects(:extra_options_for).never
|
109
|
+
end
|
110
|
+
|
111
|
+
should "call extra_options_for(:thumb/:large) when convert options are requested" do
|
112
|
+
@attachment.expects(:extra_options_for).with(:thumb)
|
113
|
+
@attachment.styles[:thumb].convert_options
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
context "A style rule with its own :processors" do
|
118
|
+
setup do
|
119
|
+
@attachment = attachment :path => ":basename.:extension",
|
120
|
+
:styles => {
|
121
|
+
:foo => {
|
122
|
+
:geometry => "100x100#",
|
123
|
+
:format => :png,
|
124
|
+
:processors => [:test]
|
125
|
+
}
|
126
|
+
},
|
127
|
+
:processors => [:thumbnail]
|
128
|
+
@style = @attachment.styles[:foo]
|
129
|
+
end
|
130
|
+
|
131
|
+
should "not get processors from the attachment" do
|
132
|
+
@attachment.expects(:processors).never
|
133
|
+
assert_not_equal [:thumbnail], @style.processors
|
134
|
+
end
|
135
|
+
|
136
|
+
should "report its own processors" do
|
137
|
+
assert_equal [:test], @style.processors
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
end
|
data/test/thumbnail_test.rb
CHANGED
@@ -47,7 +47,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
47
47
|
end
|
48
48
|
|
49
49
|
should "start with dimensions of 434x66" do
|
50
|
-
cmd = %Q[identify -format "%wx%h" "#{@file.path}"]
|
50
|
+
cmd = %Q[identify -format "%wx%h" "#{@file.path}"]
|
51
51
|
assert_equal "434x66", `#{cmd}`.chomp
|
52
52
|
end
|
53
53
|
|
@@ -61,7 +61,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
61
61
|
end
|
62
62
|
|
63
63
|
should "be the size we expect it to be" do
|
64
|
-
cmd = %Q[identify -format "%wx%h" "#{@thumb_result.path}"]
|
64
|
+
cmd = %Q[identify -format "%wx%h" "#{@thumb_result.path}"]
|
65
65
|
assert_equal args[1], `#{cmd}`.chomp
|
66
66
|
end
|
67
67
|
end
|
@@ -85,14 +85,14 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
85
85
|
should "have whiny turned on by default" do
|
86
86
|
assert @thumb.whiny
|
87
87
|
end
|
88
|
-
|
88
|
+
|
89
89
|
should "have convert_options set to nil by default" do
|
90
90
|
assert_equal nil, @thumb.convert_options
|
91
91
|
end
|
92
92
|
|
93
93
|
should "send the right command to convert when sent #make" do
|
94
94
|
Paperclip.expects(:"`").with do |arg|
|
95
|
-
arg.match %r{convert
|
95
|
+
arg.match %r{convert '#{File.expand_path(@thumb.file.path)}\[0\]' '-resize' 'x50' '-crop' '100x50\+114\+0' '\+repage' '.*?'}
|
96
96
|
end
|
97
97
|
@thumb.make
|
98
98
|
end
|
@@ -102,7 +102,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
102
102
|
assert_match /100x50/, `identify "#{dst.path}"`
|
103
103
|
end
|
104
104
|
end
|
105
|
-
|
105
|
+
|
106
106
|
context "being thumbnailed with source file options set" do
|
107
107
|
setup do
|
108
108
|
@thumb = Paperclip::Thumbnail.new(@file,
|
@@ -111,12 +111,12 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
111
111
|
end
|
112
112
|
|
113
113
|
should "have source_file_options value set" do
|
114
|
-
assert_equal "-strip", @thumb.source_file_options
|
114
|
+
assert_equal ["-strip"], @thumb.source_file_options
|
115
115
|
end
|
116
116
|
|
117
117
|
should "send the right command to convert when sent #make" do
|
118
118
|
Paperclip.expects(:"`").with do |arg|
|
119
|
-
arg.match %r{convert
|
119
|
+
arg.match %r{convert '-strip' '#{File.expand_path(@thumb.file.path)}\[0\]' '-resize' 'x50' '-crop' '100x50\+114\+0' '\+repage' '.*?'}
|
120
120
|
end
|
121
121
|
@thumb.make
|
122
122
|
end
|
@@ -125,7 +125,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
125
125
|
dst = @thumb.make
|
126
126
|
assert_match /100x50/, `identify "#{dst.path}"`
|
127
127
|
end
|
128
|
-
|
128
|
+
|
129
129
|
context "redefined to have bad source_file_options setting" do
|
130
130
|
setup do
|
131
131
|
@thumb = Paperclip::Thumbnail.new(@file,
|
@@ -138,7 +138,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
138
138
|
@thumb.make
|
139
139
|
end
|
140
140
|
end
|
141
|
-
end
|
141
|
+
end
|
142
142
|
end
|
143
143
|
|
144
144
|
context "being thumbnailed with convert options set" do
|
@@ -149,12 +149,12 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
149
149
|
end
|
150
150
|
|
151
151
|
should "have convert_options value set" do
|
152
|
-
assert_equal "-strip -depth 8", @thumb.convert_options
|
152
|
+
assert_equal %w"-strip -depth 8", @thumb.convert_options
|
153
153
|
end
|
154
154
|
|
155
155
|
should "send the right command to convert when sent #make" do
|
156
156
|
Paperclip.expects(:"`").with do |arg|
|
157
|
-
arg.match %r{convert
|
157
|
+
arg.match %r{convert '#{File.expand_path(@thumb.file.path)}\[0\]' '-resize' 'x50' '-crop' '100x50\+114\+0' '\+repage' '-strip' '-depth' '8' '.*?'}
|
158
158
|
end
|
159
159
|
@thumb.make
|
160
160
|
end
|
@@ -163,7 +163,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
163
163
|
dst = @thumb.make
|
164
164
|
assert_match /100x50/, `identify "#{dst.path}"`
|
165
165
|
end
|
166
|
-
|
166
|
+
|
167
167
|
context "redefined to have bad convert_options setting" do
|
168
168
|
setup do
|
169
169
|
@thumb = Paperclip::Thumbnail.new(@file,
|
@@ -176,18 +176,18 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
176
176
|
@thumb.make
|
177
177
|
end
|
178
178
|
end
|
179
|
-
end
|
179
|
+
end
|
180
180
|
end
|
181
|
-
|
181
|
+
|
182
182
|
context "being thumbnailed with a blank geometry string" do
|
183
183
|
setup do
|
184
184
|
@thumb = Paperclip::Thumbnail.new(@file,
|
185
185
|
:geometry => "",
|
186
186
|
:convert_options => "-gravity center -crop \"300x300+0-0\"")
|
187
187
|
end
|
188
|
-
|
188
|
+
|
189
189
|
should "not get resized by default" do
|
190
|
-
|
190
|
+
assert !@thumb.transformation_command.include?("-resize")
|
191
191
|
end
|
192
192
|
end
|
193
193
|
end
|
@@ -200,7 +200,7 @@ class ThumbnailTest < Test::Unit::TestCase
|
|
200
200
|
teardown { @file.close }
|
201
201
|
|
202
202
|
should "start with two pages with dimensions 612x792" do
|
203
|
-
cmd = %Q[identify -format "%wx%h" "#{@file.path}"]
|
203
|
+
cmd = %Q[identify -format "%wx%h" "#{@file.path}"]
|
204
204
|
assert_equal "612x792"*2, `#{cmd}`.chomp
|
205
205
|
end
|
206
206
|
|
data/test/upfile_test.rb
CHANGED
@@ -25,4 +25,12 @@ class UpfileTest < Test::Unit::TestCase
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
should "return a content_type of text/plain on a real file whose content_type is determined with the file command" do
|
30
|
+
file = File.new(File.join(File.dirname(__FILE__), "..", "LICENSE"))
|
31
|
+
class << file
|
32
|
+
include Paperclip::Upfile
|
33
|
+
end
|
34
|
+
assert_equal 'text/plain', file.content_type
|
35
|
+
end
|
28
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 2
|
7
|
+
- 3
|
8
|
+
- 2
|
9
|
+
version: 2.3.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Jon Yurek
|
@@ -9,70 +14,82 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-06-08 00:00:00 -04:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
name: activerecord
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
23
29
|
version: "0"
|
24
|
-
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
25
32
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
33
|
+
name: activesupport
|
34
|
+
prerelease: false
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
39
|
+
segments:
|
40
|
+
- 0
|
41
|
+
version: "0"
|
42
|
+
type: :runtime
|
43
|
+
version_requirements: *id002
|
35
44
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
name: shoulda
|
46
|
+
prerelease: false
|
47
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
48
|
requirements:
|
41
49
|
- - ">="
|
42
50
|
- !ruby/object:Gem::Version
|
51
|
+
segments:
|
52
|
+
- 0
|
43
53
|
version: "0"
|
44
|
-
version:
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: sqlite3-ruby
|
47
54
|
type: :development
|
48
|
-
|
49
|
-
|
55
|
+
version_requirements: *id003
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: mocha
|
58
|
+
prerelease: false
|
59
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
60
|
requirements:
|
51
61
|
- - ">="
|
52
62
|
- !ruby/object:Gem::Version
|
63
|
+
segments:
|
64
|
+
- 0
|
53
65
|
version: "0"
|
54
|
-
version:
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: activerecord
|
57
66
|
type: :development
|
58
|
-
|
59
|
-
|
67
|
+
version_requirements: *id004
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: aws-s3
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
60
72
|
requirements:
|
61
73
|
- - ">="
|
62
74
|
- !ruby/object:Gem::Version
|
75
|
+
segments:
|
76
|
+
- 0
|
63
77
|
version: "0"
|
64
|
-
version:
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: activesupport
|
67
78
|
type: :development
|
68
|
-
|
69
|
-
|
79
|
+
version_requirements: *id005
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: sqlite3-ruby
|
82
|
+
prerelease: false
|
83
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
70
84
|
requirements:
|
71
85
|
- - ">="
|
72
86
|
- !ruby/object:Gem::Version
|
87
|
+
segments:
|
88
|
+
- 0
|
73
89
|
version: "0"
|
74
|
-
|
75
|
-
|
90
|
+
type: :development
|
91
|
+
version_requirements: *id006
|
92
|
+
description: Easy upload management for ActiveRecord
|
76
93
|
email: jyurek@thoughtbot.com
|
77
94
|
executables: []
|
78
95
|
|
@@ -85,9 +102,9 @@ files:
|
|
85
102
|
- LICENSE
|
86
103
|
- Rakefile
|
87
104
|
- init.rb
|
88
|
-
- generators/paperclip/paperclip_generator.rb
|
89
|
-
- generators/paperclip/templates/paperclip_migration.rb.erb
|
90
|
-
- generators/paperclip/USAGE
|
105
|
+
- lib/generators/paperclip/paperclip_generator.rb
|
106
|
+
- lib/generators/paperclip/templates/paperclip_migration.rb.erb
|
107
|
+
- lib/generators/paperclip/USAGE
|
91
108
|
- lib/paperclip/attachment.rb
|
92
109
|
- lib/paperclip/callback_compatability.rb
|
93
110
|
- lib/paperclip/geometry.rb
|
@@ -99,11 +116,14 @@ files:
|
|
99
116
|
- lib/paperclip/matchers/validate_attachment_size_matcher.rb
|
100
117
|
- lib/paperclip/matchers.rb
|
101
118
|
- lib/paperclip/processor.rb
|
119
|
+
- lib/paperclip/railtie.rb
|
102
120
|
- lib/paperclip/storage.rb
|
121
|
+
- lib/paperclip/style.rb
|
103
122
|
- lib/paperclip/thumbnail.rb
|
104
123
|
- lib/paperclip/upfile.rb
|
124
|
+
- lib/paperclip/version.rb
|
105
125
|
- lib/paperclip.rb
|
106
|
-
- tasks/
|
126
|
+
- lib/tasks/paperclip.rake
|
107
127
|
- test/attachment_test.rb
|
108
128
|
- test/database.yml
|
109
129
|
- test/fixtures/12k.png
|
@@ -125,8 +145,13 @@ files:
|
|
125
145
|
- test/paperclip_test.rb
|
126
146
|
- test/processor_test.rb
|
127
147
|
- test/storage_test.rb
|
148
|
+
- test/style_test.rb
|
128
149
|
- test/thumbnail_test.rb
|
129
150
|
- test/upfile_test.rb
|
151
|
+
- rails/init.rb
|
152
|
+
- generators/paperclip/paperclip_generator.rb
|
153
|
+
- generators/paperclip/templates/paperclip_migration.rb.erb
|
154
|
+
- generators/paperclip/USAGE
|
130
155
|
- shoulda_macros/paperclip.rb
|
131
156
|
has_rdoc: true
|
132
157
|
homepage: http://www.thoughtbot.com/projects/paperclip
|
@@ -142,18 +167,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
167
|
requirements:
|
143
168
|
- - ">="
|
144
169
|
- !ruby/object:Gem::Version
|
170
|
+
segments:
|
171
|
+
- 0
|
145
172
|
version: "0"
|
146
|
-
version:
|
147
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
174
|
requirements:
|
149
175
|
- - ">="
|
150
176
|
- !ruby/object:Gem::Version
|
177
|
+
segments:
|
178
|
+
- 0
|
151
179
|
version: "0"
|
152
|
-
version:
|
153
180
|
requirements:
|
154
181
|
- ImageMagick
|
155
182
|
rubyforge_project: paperclip
|
156
|
-
rubygems_version: 1.3.
|
183
|
+
rubygems_version: 1.3.6
|
157
184
|
signing_key:
|
158
185
|
specification_version: 3
|
159
186
|
summary: File attachments as attributes for ActiveRecord
|