carrierwave 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of carrierwave might be problematic. Click here for more details.
- data/Rakefile +1 -1
- data/lib/carrierwave/orm/activerecord.rb +4 -0
- data/lib/carrierwave/processing/rmagick.rb +37 -4
- data/lib/carrierwave/storage/file.rb +3 -22
- data/lib/carrierwave/storage/s3.rb +23 -5
- data/lib/carrierwave/uploader/callbacks.rb +1 -1
- data/lib/carrierwave/uploader/proxy.rb +1 -1
- data/lib/carrierwave/uploader/remove.rb +1 -1
- data/spec/orm/activerecord_spec.rb +19 -1
- data/spec/test.log +57 -1602
- data/spec/uploader/remove_spec.rb +3 -3
- data/spec/uploader/versions_spec.rb +5 -8
- metadata +2 -2
@@ -19,9 +19,9 @@ describe CarrierWave::Uploader do
|
|
19
19
|
@stored_file.stub!(:path).and_return('/path/to/somewhere')
|
20
20
|
@stored_file.stub!(:url).and_return('http://www.example.com')
|
21
21
|
@stored_file.stub!(:identifier).and_return('this-is-me')
|
22
|
+
@stored_file.stub!(:delete)
|
22
23
|
|
23
24
|
@uploader_class.storage.stub!(:store!).and_return(@stored_file)
|
24
|
-
@uploader_class.storage.stub!(:destroy!)
|
25
25
|
@uploader.store!(@file)
|
26
26
|
end
|
27
27
|
|
@@ -46,8 +46,8 @@ describe CarrierWave::Uploader do
|
|
46
46
|
@uploader.identifier.should be_nil
|
47
47
|
end
|
48
48
|
|
49
|
-
it "should
|
50
|
-
@
|
49
|
+
it "should delete the file" do
|
50
|
+
@stored_file.should_receive(:delete)
|
51
51
|
@uploader.remove!
|
52
52
|
end
|
53
53
|
|
@@ -206,11 +206,8 @@ describe CarrierWave::Uploader do
|
|
206
206
|
@uploader_class.storage.stub!(:store!).and_return(@base_stored_file)
|
207
207
|
@uploader_class.version(:thumb).storage.stub!(:store!).and_return(@thumb_stored_file)
|
208
208
|
|
209
|
-
@
|
210
|
-
@
|
211
|
-
|
212
|
-
@uploader_class.storage.stub!(:destroy!)
|
213
|
-
@uploader_class.version(:thumb).storage.stub!(:destroy!)
|
209
|
+
@base_stored_file.stub!(:delete)
|
210
|
+
@thumb_stored_file.stub!(:delete)
|
214
211
|
|
215
212
|
@uploader.store!(@file)
|
216
213
|
end
|
@@ -231,9 +228,9 @@ describe CarrierWave::Uploader do
|
|
231
228
|
@uploader.thumb.url.should be_nil
|
232
229
|
end
|
233
230
|
|
234
|
-
it "should
|
235
|
-
@
|
236
|
-
@
|
231
|
+
it "should delete all the files" do
|
232
|
+
@base_stored_file.should_receive(:delete)
|
233
|
+
@thumb_stored_file.should_receive(:delete)
|
237
234
|
@uploader.remove!
|
238
235
|
end
|
239
236
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Nicklas
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-11 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|