carrierwave_backgrounder 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -37,6 +37,12 @@ Currently ActiveRecord is the default orm and I have not tested this with others
37
37
  # or
38
38
  Sequel::Model.send(:extend, ::CarrierWave::Backgrounder::ORM)
39
39
 
40
+ == Usage
41
+
42
+ If you need to process/store the upload immediately:
43
+
44
+ @user.process_upload = true
45
+
40
46
  == Word Of Caution
41
47
 
42
48
  Temp files are stored by default in the tmp directory. They are not guaranteed to be available when your workers process them! For instance, on Heroku, they get blown away on every deploy. If image upload is the main function of your app, I would store the tmp files in a non-volatile directory if you have the option.
@@ -1,3 +1,3 @@
1
1
  module CarrierwaveBackgrounder
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -6,8 +6,8 @@ module CarrierWave
6
6
  def perform
7
7
  record = klass.find id
8
8
  if record.send :"#{column}_tmp"
9
- cache_dir = record.send(:"#{column}").root.join(record.send(:"#{column}").cache_dir)
10
- cache_path = cache_dir.join record.send(:"#{column}_tmp")
9
+ cache_dir = [record.send(:"#{column}").root, record.send(:"#{column}").cache_dir].join("/")
10
+ cache_path = [cache_dir, record.send(:"#{column}_tmp")].join("/")
11
11
 
12
12
  record.send :"process_upload=", true
13
13
  record.send :"#{column}=", File.open(cache_path)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: carrierwave_backgrounder
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Larry Sprock
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-25 00:00:00 -07:00
13
+ date: 2011-03-28 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16