carrierwave 0.3.5.2 → 0.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 carrierwave might be problematic. Click here for more details.

Files changed (43) hide show
  1. data/Generators +1 -1
  2. data/History.txt +11 -0
  3. data/Manifest.txt +7 -5
  4. data/README.rdoc +67 -26
  5. data/Rakefile +4 -1
  6. data/features/grid_fs_storage.feature +32 -0
  7. data/features/step_definitions/general_steps.rb +6 -1
  8. data/features/support/env.rb +5 -16
  9. data/lib/carrierwave.rb +30 -61
  10. data/lib/carrierwave/compatibility/paperclip.rb +2 -2
  11. data/lib/carrierwave/core_ext/inheritable_attributes.rb +3 -3
  12. data/lib/carrierwave/mount.rb +34 -27
  13. data/lib/carrierwave/orm/activerecord.rb +2 -2
  14. data/lib/carrierwave/processing/rmagick.rb +1 -1
  15. data/lib/carrierwave/storage/abstract.rb +0 -2
  16. data/lib/carrierwave/storage/file.rb +3 -5
  17. data/lib/carrierwave/storage/grid_fs.rb +88 -0
  18. data/lib/carrierwave/storage/s3.rb +37 -69
  19. data/lib/carrierwave/uploader.rb +1 -2
  20. data/lib/carrierwave/uploader/cache.rb +21 -18
  21. data/lib/carrierwave/uploader/configuration.rb +59 -0
  22. data/lib/carrierwave/uploader/remove.rb +0 -1
  23. data/lib/carrierwave/uploader/store.rb +3 -30
  24. data/lib/carrierwave/uploader/url.rb +1 -1
  25. data/lib/carrierwave/uploader/versions.rb +1 -4
  26. data/{lib/generators → merb_generators}/uploader_generator.rb +0 -0
  27. data/rails_generators/uploader/templates/uploader.rb +3 -3
  28. data/spec/compatibility/paperclip_spec.rb +11 -2
  29. data/spec/mount_spec.rb +0 -25
  30. data/spec/orm/datamapper_spec.rb +1 -1
  31. data/spec/spec_helper.rb +3 -3
  32. data/spec/storage/grid_fs_spec.rb +76 -0
  33. data/spec/storage/s3_spec.rb +75 -0
  34. data/spec/uploader/cache_spec.rb +1 -13
  35. data/spec/uploader/configuration_spec.rb +71 -0
  36. data/spec/uploader/paths_spec.rb +1 -1
  37. data/spec/uploader/store_spec.rb +0 -16
  38. data/spec/uploader/versions_spec.rb +0 -8
  39. metadata +40 -8
  40. data/carrierwave.gemspec +0 -63
  41. data/lib/carrierwave/uploader/default_path.rb +0 -24
  42. data/lib/carrierwave/uploader/paths.rb +0 -27
  43. data/spec/uploader/default_path_spec.rb +0 -68
@@ -0,0 +1,75 @@
1
+ # encoding: utf-8
2
+
3
+ require File.dirname(__FILE__) + '/../spec_helper'
4
+ require 'aws/s3'
5
+
6
+ if ENV['S3_SPEC']
7
+ describe CarrierWave::Storage::S3 do
8
+ before do
9
+ @uploader = mock('an uploader')
10
+ @uploader.stub!(:s3_access_key_id).and_return(ENV["S3_ACCESS_KEY_ID"])
11
+ @uploader.stub!(:s3_secret_access_key).and_return(ENV["S3_SECRET_ACCESS_KEY"])
12
+ @uploader.stub!(:s3_bucket).and_return('carrierwave_test')
13
+ @uploader.stub!(:s3_access).and_return(:public_read)
14
+ @uploader.stub!(:s3_cnamed).and_return(false)
15
+
16
+ @storage = CarrierWave::Storage::S3.new(@uploader)
17
+ @file = CarrierWave::SanitizedFile.new(file_path('test.jpg'))
18
+ end
19
+
20
+ after do
21
+ AWS::S3::S3Object.delete('uploads/bar.txt', 'carrierwave_test')
22
+ end
23
+
24
+ describe '#store!' do
25
+ before do
26
+ @uploader.stub!(:store_path).and_return('uploads/bar.txt')
27
+ @s3_file = @storage.store!(@file)
28
+ end
29
+
30
+ it "should upload the file to s3" do
31
+ AWS::S3::S3Object.value('uploads/bar.txt', 'carrierwave_test').should == 'this is stuff'
32
+ end
33
+
34
+ it "should have a path" do
35
+ @s3_file.path.should == 'uploads/bar.txt'
36
+ end
37
+
38
+ it "should have an Amazon URL" do
39
+ @s3_file.url.should == 'http://s3.amazonaws.com/carrierwave_test/uploads/bar.txt'
40
+ end
41
+
42
+ it "should be deletable" do
43
+ @s3_file.delete
44
+ AWS::S3::S3Object.exists?('uploads/bar.txt', 'carrierwave_test').should be_false
45
+ end
46
+ end
47
+
48
+ describe '#retrieve!' do
49
+ before do
50
+ AWS::S3::S3Object.store('uploads/bar.txt', "A test, 1234", 'carrierwave_test')
51
+
52
+ @uploader.stub!(:store_path).with('bar.txt').and_return('uploads/bar.txt')
53
+ @s3_file = @storage.retrieve!('bar.txt')
54
+ end
55
+
56
+ it "should retrieve the file contents from s3" do
57
+ @s3_file.read.chomp.should == "A test, 1234"
58
+ end
59
+
60
+ it "should have a path" do
61
+ @s3_file.path.should == 'uploads/bar.txt'
62
+ end
63
+
64
+ it "should have an Amazon URL" do
65
+ @s3_file.url.should == 'http://s3.amazonaws.com/carrierwave_test/uploads/bar.txt'
66
+ end
67
+
68
+ it "should be deletable" do
69
+ @s3_file.delete
70
+ AWS::S3::S3Object.exists?('uploads/bar.txt', 'carrierwave_test').should be_false
71
+ end
72
+ end
73
+
74
+ end
75
+ end
@@ -51,15 +51,6 @@ describe CarrierWave::Uploader do
51
51
  @uploader.file.exists?.should be_true
52
52
  end
53
53
 
54
- it "should not move it if cache_to_cache_dir is false" do
55
- CarrierWave.config[:cache_to_cache_dir] = false
56
- path = file_path('test.jpg')
57
- @uploader.cache!(File.open(path))
58
- @uploader.current_path.should == path
59
- @uploader.file.exists?.should be_true
60
- CarrierWave.config[:cache_to_cache_dir] = true
61
- end
62
-
63
54
  it "should set the url" do
64
55
  @uploader.cache!(File.open(file_path('test.jpg')))
65
56
  @uploader.url.should == '/uploads/tmp/20071201-1234-345-2255/test.jpg'
@@ -82,13 +73,10 @@ describe CarrierWave::Uploader do
82
73
  end
83
74
 
84
75
  it "should set permissions if options are given" do
85
- old_permissions = CarrierWave.config[:permissions]
86
- CarrierWave.config[:permissions] = 0777
76
+ @uploader_class.permissions = 0777
87
77
 
88
78
  @uploader.cache!(File.open(file_path('test.jpg')))
89
79
  @uploader.should have_permissions(0777)
90
-
91
- CarrierWave.config[:permissions] = old_permissions
92
80
  end
93
81
  end
94
82
 
@@ -0,0 +1,71 @@
1
+ # encoding: utf-8
2
+
3
+ require File.dirname(__FILE__) + '/../spec_helper'
4
+
5
+
6
+ describe CarrierWave do
7
+ before do
8
+ @uploader_class = Class.new(CarrierWave::Uploader::Base)
9
+ end
10
+
11
+ describe '.configure' do
12
+ it "should proxy to Uploader configuration" do
13
+ CarrierWave::Uploader::Base.add_config :test_config
14
+ CarrierWave.configure do |config|
15
+ config.test_config = "foo"
16
+ end
17
+ CarrierWave::Uploader::Base.test_config.should == 'foo'
18
+ end
19
+ end
20
+ end
21
+
22
+ describe CarrierWave::Uploader::Base do
23
+ before do
24
+ @uploader_class = Class.new(CarrierWave::Uploader::Base)
25
+ end
26
+
27
+ describe '.configure' do
28
+ it "should set a configuration parameter" do
29
+ @uploader_class.add_config :foo_bar
30
+ @uploader_class.configure do |config|
31
+ config.foo_bar = "monkey"
32
+ end
33
+ @uploader_class.foo_bar.should == 'monkey'
34
+ end
35
+ end
36
+
37
+ describe '.add_config' do
38
+ it "should add a class level accessor" do
39
+ @uploader_class.add_config :foo_bar
40
+ @uploader_class.foo_bar = 'foo'
41
+ @uploader_class.foo_bar.should == 'foo'
42
+ end
43
+
44
+ it "should be inheritable" do
45
+ @child_class = Class.new(@uploader_class)
46
+ @uploader_class.add_config :foo_bar
47
+
48
+ @uploader_class.foo_bar = 'foo'
49
+ @uploader_class.foo_bar.should == 'foo'
50
+
51
+ #@child_class.foo_bar.should == 'foo'
52
+
53
+ @child_class.foo_bar = 'bar'
54
+ @child_class.foo_bar.should == 'bar'
55
+
56
+ @uploader_class.foo_bar.should == 'foo'
57
+ end
58
+
59
+ it "should add an instance level accessor" do
60
+ @uploader_class.add_config :foo_bar
61
+ @uploader_class.foo_bar = 'foo'
62
+ @uploader_class.new.foo_bar.should == 'foo'
63
+ end
64
+
65
+ it "should add a convenient in-class setter" do
66
+ @uploader_class.add_config :foo_bar
67
+ @uploader_class.foo_bar "monkey"
68
+ @uploader_class.foo_bar.should == "monkey"
69
+ end
70
+ end
71
+ end
@@ -15,7 +15,7 @@ describe CarrierWave::Uploader do
15
15
 
16
16
  describe '#root' do
17
17
  it "should default to the config option" do
18
- @uploader.root.should == public_path('..')
18
+ @uploader.root.should == public_path
19
19
  end
20
20
  end
21
21
 
@@ -14,14 +14,8 @@ describe CarrierWave::Uploader do
14
14
  end
15
15
 
16
16
  describe ".storage" do
17
- before do
18
- CarrierWave::Storage::File.stub!(:setup!)
19
- CarrierWave::Storage::S3.stub!(:setup!)
20
- end
21
-
22
17
  it "should set the storage if an argument is given" do
23
18
  storage = mock('some kind of storage')
24
- storage.should_receive(:setup!)
25
19
  @uploader_class.storage storage
26
20
  @uploader_class.storage.should == storage
27
21
  end
@@ -208,10 +202,6 @@ describe CarrierWave::Uploader do
208
202
  @uploader_class.storage.stub!(:new).with(@uploader).and_return(@storage)
209
203
  end
210
204
 
211
- after do
212
- CarrierWave.config[:use_cache] = true
213
- end
214
-
215
205
  it "should set the current path" do
216
206
  @uploader.store!(@file)
217
207
  @uploader.current_path.should == '/path/to/somewhere'
@@ -227,12 +217,6 @@ describe CarrierWave::Uploader do
227
217
  @uploader.filename.should == 'gpj.tset'
228
218
  end
229
219
 
230
- it "should, if a files is given as an argument and use_cache is false, reverse the filename" do
231
- CarrierWave.config[:use_cache] = false
232
- @uploader.store!(@file)
233
- @uploader.filename.should == 'gpj.tset'
234
- end
235
-
236
220
  end
237
221
 
238
222
  describe '#retrieve_from_store!' do
@@ -169,10 +169,6 @@ describe CarrierWave::Uploader do
169
169
  @uploader_class.version(:thumb).storage.stub!(:new).with(@uploader.thumb).and_return(@thumb_storage)
170
170
  end
171
171
 
172
- after do
173
- CarrierWave.config[:use_cache] = true
174
- end
175
-
176
172
  it "should set the current path for the version" do
177
173
  @uploader.store!(@file)
178
174
  @uploader.current_path.should == '/path/to/somewhere'
@@ -226,10 +222,6 @@ describe CarrierWave::Uploader do
226
222
  @uploader.store!(@file)
227
223
  end
228
224
 
229
- after do
230
- CarrierWave.config[:use_cache] = true
231
- end
232
-
233
225
  it "should reset the current path for the version" do
234
226
  @uploader.remove!
235
227
  @uploader.current_path.should be_nil
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.3.5.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
@@ -12,6 +12,16 @@ cert_chain: []
12
12
  date: 2009-10-12 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: newgem
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.5.2
24
+ version:
15
25
  - !ruby/object:Gem::Dependency
16
26
  name: rspec
17
27
  type: :development
@@ -62,6 +72,16 @@ dependencies:
62
72
  - !ruby/object:Gem::Version
63
73
  version: 0.9.11
64
74
  version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: data_objects
77
+ type: :development
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 0.9.12
84
+ version:
65
85
  - !ruby/object:Gem::Dependency
66
86
  name: do_sqlite3
67
87
  type: :development
@@ -93,14 +113,24 @@ dependencies:
93
113
  version: 2.10.0
94
114
  version:
95
115
  - !ruby/object:Gem::Dependency
96
- name: jnunemaker-mongomapper
116
+ name: mongo_mapper
117
+ type: :development
118
+ version_requirement:
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 0.5.4
124
+ version:
125
+ - !ruby/object:Gem::Dependency
126
+ name: aws-s3
97
127
  type: :development
98
128
  version_requirement:
99
129
  version_requirements: !ruby/object:Gem::Requirement
100
130
  requirements:
101
131
  - - ">="
102
132
  - !ruby/object:Gem::Version
103
- version: 0.3.3
133
+ version: 0.6.2
104
134
  version:
105
135
  - !ruby/object:Gem::Dependency
106
136
  name: hoe
@@ -135,7 +165,6 @@ files:
135
165
  - Manifest.txt
136
166
  - README.rdoc
137
167
  - Rakefile
138
- - carrierwave.gemspec
139
168
  - cucumber.yml
140
169
  - features/caching.feature
141
170
  - features/file_storage.feature
@@ -144,6 +173,7 @@ files:
144
173
  - features/file_storage_reversing_processor.feature
145
174
  - features/fixtures/bork.txt
146
175
  - features/fixtures/monkey.txt
176
+ - features/grid_fs_storage.feature
147
177
  - features/mount_activerecord.feature
148
178
  - features/mount_datamapper.feature
149
179
  - features/step_definitions/activerecord_steps.rb
@@ -175,23 +205,23 @@ files:
175
205
  - lib/carrierwave/sanitized_file.rb
176
206
  - lib/carrierwave/storage/abstract.rb
177
207
  - lib/carrierwave/storage/file.rb
208
+ - lib/carrierwave/storage/grid_fs.rb
178
209
  - lib/carrierwave/storage/s3.rb
179
210
  - lib/carrierwave/test/matchers.rb
180
211
  - lib/carrierwave/uploader.rb
181
212
  - lib/carrierwave/uploader/cache.rb
182
213
  - lib/carrierwave/uploader/callbacks.rb
183
- - lib/carrierwave/uploader/default_path.rb
214
+ - lib/carrierwave/uploader/configuration.rb
184
215
  - lib/carrierwave/uploader/default_url.rb
185
216
  - lib/carrierwave/uploader/extension_whitelist.rb
186
217
  - lib/carrierwave/uploader/mountable.rb
187
- - lib/carrierwave/uploader/paths.rb
188
218
  - lib/carrierwave/uploader/processing.rb
189
219
  - lib/carrierwave/uploader/proxy.rb
190
220
  - lib/carrierwave/uploader/remove.rb
191
221
  - lib/carrierwave/uploader/store.rb
192
222
  - lib/carrierwave/uploader/url.rb
193
223
  - lib/carrierwave/uploader/versions.rb
194
- - lib/generators/uploader_generator.rb
224
+ - merb_generators/uploader_generator.rb
195
225
  - rails_generators/uploader/USAGE
196
226
  - rails_generators/uploader/templates/uploader.rb
197
227
  - rails_generators/uploader/uploader_generator.rb
@@ -209,8 +239,10 @@ files:
209
239
  - spec/orm/sequel_spec.rb
210
240
  - spec/sanitized_file_spec.rb
211
241
  - spec/spec_helper.rb
242
+ - spec/storage/grid_fs_spec.rb
243
+ - spec/storage/s3_spec.rb
212
244
  - spec/uploader/cache_spec.rb
213
- - spec/uploader/default_path_spec.rb
245
+ - spec/uploader/configuration_spec.rb
214
246
  - spec/uploader/default_url_spec.rb
215
247
  - spec/uploader/extension_whitelist_spec.rb
216
248
  - spec/uploader/mountable_spec.rb
@@ -1,63 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{carrierwave}
5
- s.version = "0.3.5.2"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Jonas Nicklas"]
9
- s.date = %q{2009-10-12}
10
- s.description = %q{* RDoc Documentation {available at Rubyforge}[http://carrierwave.rubyforge.org/rdoc].
11
- * Source code {hosted at GitHub}[http://github.com/jnicklas/carrierwave]
12
- * Please {report any issues}[http://github.com/jnicklas/carrierwave/issues] on GitHub
13
- * Please direct any questions at the {mailing list}[http://groups.google.com/group/carrierwave]}
14
- s.email = ["jonas.nicklas@gmail.com"]
15
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "features/fixtures/bork.txt", "features/fixtures/monkey.txt", "README.rdoc"]
16
- s.files = ["Generators", "History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "carrierwave.gemspec", "cucumber.yml", "features/caching.feature", "features/file_storage.feature", "features/file_storage_overridden_filename.feature", "features/file_storage_overridden_store_dir.feature", "features/file_storage_reversing_processor.feature", "features/fixtures/bork.txt", "features/fixtures/monkey.txt", "features/mount_activerecord.feature", "features/mount_datamapper.feature", "features/step_definitions/activerecord_steps.rb", "features/step_definitions/caching_steps.rb", "features/step_definitions/datamapper_steps.rb", "features/step_definitions/file_steps.rb", "features/step_definitions/general_steps.rb", "features/step_definitions/mount_steps.rb", "features/step_definitions/store_steps.rb", "features/support/activerecord.rb", "features/support/datamapper.rb", "features/support/env.rb", "features/versions_basics.feature", "features/versions_nested_versions.feature", "features/versions_overridden_filename.feature", "features/versions_overriden_store_dir.feature", "lib/carrierwave.rb", "lib/carrierwave/compatibility/paperclip.rb", "lib/carrierwave/core_ext/blank.rb", "lib/carrierwave/core_ext/inheritable_attributes.rb", "lib/carrierwave/core_ext/module_setup.rb", "lib/carrierwave/mount.rb", "lib/carrierwave/orm/activerecord.rb", "lib/carrierwave/orm/datamapper.rb", "lib/carrierwave/orm/mongomapper.rb", "lib/carrierwave/orm/sequel.rb", "lib/carrierwave/processing/image_science.rb", "lib/carrierwave/processing/rmagick.rb", "lib/carrierwave/sanitized_file.rb", "lib/carrierwave/storage/abstract.rb", "lib/carrierwave/storage/file.rb", "lib/carrierwave/storage/s3.rb", "lib/carrierwave/test/matchers.rb", "lib/carrierwave/uploader.rb", "lib/carrierwave/uploader/cache.rb", "lib/carrierwave/uploader/callbacks.rb", "lib/carrierwave/uploader/default_path.rb", "lib/carrierwave/uploader/default_url.rb", "lib/carrierwave/uploader/extension_whitelist.rb", "lib/carrierwave/uploader/mountable.rb", "lib/carrierwave/uploader/paths.rb", "lib/carrierwave/uploader/processing.rb", "lib/carrierwave/uploader/proxy.rb", "lib/carrierwave/uploader/remove.rb", "lib/carrierwave/uploader/store.rb", "lib/carrierwave/uploader/url.rb", "lib/carrierwave/uploader/versions.rb", "lib/generators/uploader_generator.rb", "rails_generators/uploader/USAGE", "rails_generators/uploader/templates/uploader.rb", "rails_generators/uploader/uploader_generator.rb", "script/console", "script/destroy", "script/generate", "spec/compatibility/paperclip_spec.rb", "spec/fixtures/bork.txt", "spec/fixtures/test.jpeg", "spec/fixtures/test.jpg", "spec/mount_spec.rb", "spec/orm/activerecord_spec.rb", "spec/orm/datamapper_spec.rb", "spec/orm/mongomapper_spec.rb", "spec/orm/sequel_spec.rb", "spec/sanitized_file_spec.rb", "spec/spec_helper.rb", "spec/uploader/cache_spec.rb", "spec/uploader/default_path_spec.rb", "spec/uploader/default_url_spec.rb", "spec/uploader/extension_whitelist_spec.rb", "spec/uploader/mountable_spec.rb", "spec/uploader/paths_spec.rb", "spec/uploader/processing_spec.rb", "spec/uploader/proxy_spec.rb", "spec/uploader/remove_spec.rb", "spec/uploader/store_spec.rb", "spec/uploader/url_spec.rb", "spec/uploader/versions_spec.rb"]
17
- s.homepage = %q{http://carrierwave.rubyforge.org}
18
- s.rdoc_options = ["--main", "README.rdoc"]
19
- s.require_paths = ["lib"]
20
- s.rubyforge_project = %q{carrierwave}
21
- s.rubygems_version = %q{1.3.5}
22
- s.summary = %q{* RDoc Documentation {available at Rubyforge}[http://carrierwave.rubyforge.org/rdoc]}
23
-
24
- if s.respond_to? :specification_version then
25
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
26
- s.specification_version = 3
27
-
28
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
29
- s.add_development_dependency(%q<rspec>, [">= 1.2.8"])
30
- s.add_development_dependency(%q<cucumber>, [">= 0.3.96"])
31
- s.add_development_dependency(%q<activerecord>, [">= 2.3.3"])
32
- s.add_development_dependency(%q<sqlite3-ruby>, [">= 1.2.5"])
33
- s.add_development_dependency(%q<dm-core>, [">= 0.9.11"])
34
- s.add_development_dependency(%q<do_sqlite3>, [">= 0.9.11"])
35
- s.add_development_dependency(%q<sequel>, [">= 3.2.0"])
36
- s.add_development_dependency(%q<rmagick>, [">= 2.10.0"])
37
- s.add_development_dependency(%q<jnunemaker-mongomapper>, [">= 0.3.3"])
38
- s.add_development_dependency(%q<hoe>, [">= 2.3.2"])
39
- else
40
- s.add_dependency(%q<rspec>, [">= 1.2.8"])
41
- s.add_dependency(%q<cucumber>, [">= 0.3.96"])
42
- s.add_dependency(%q<activerecord>, [">= 2.3.3"])
43
- s.add_dependency(%q<sqlite3-ruby>, [">= 1.2.5"])
44
- s.add_dependency(%q<dm-core>, [">= 0.9.11"])
45
- s.add_dependency(%q<do_sqlite3>, [">= 0.9.11"])
46
- s.add_dependency(%q<sequel>, [">= 3.2.0"])
47
- s.add_dependency(%q<rmagick>, [">= 2.10.0"])
48
- s.add_dependency(%q<jnunemaker-mongomapper>, [">= 0.3.3"])
49
- s.add_dependency(%q<hoe>, [">= 2.3.2"])
50
- end
51
- else
52
- s.add_dependency(%q<rspec>, [">= 1.2.8"])
53
- s.add_dependency(%q<cucumber>, [">= 0.3.96"])
54
- s.add_dependency(%q<activerecord>, [">= 2.3.3"])
55
- s.add_dependency(%q<sqlite3-ruby>, [">= 1.2.5"])
56
- s.add_dependency(%q<dm-core>, [">= 0.9.11"])
57
- s.add_dependency(%q<do_sqlite3>, [">= 0.9.11"])
58
- s.add_dependency(%q<sequel>, [">= 3.2.0"])
59
- s.add_dependency(%q<rmagick>, [">= 2.10.0"])
60
- s.add_dependency(%q<jnunemaker-mongomapper>, [">= 0.3.3"])
61
- s.add_dependency(%q<hoe>, [">= 2.3.2"])
62
- end
63
- end
@@ -1,24 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module CarrierWave
4
- module Uploader
5
- module DefaultPath
6
-
7
- def initialize(*args)
8
- super
9
- if default_path
10
- puts "WARNING: Default Path is deprecated and will be removed in CarrierWave 0.4. Please use default_url instead!"
11
- @file = CarrierWave::SanitizedFile.new(File.expand_path(default_path, public))
12
- def @file.blank?; true; end
13
- end
14
- end
15
-
16
- ##
17
- # Override this method in your uploader to provide a default path
18
- # in case no file has been cached/stored yet.
19
- #
20
- def default_path; end
21
-
22
- end # DefaultPath
23
- end # Uploader
24
- end # CarrierWave