delayed_paperclip 2.4.2.0 → 2.4.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,8 +33,10 @@ module DelayedPaperclip
33
33
 
34
34
  end
35
35
 
36
- def self.included(base)
37
- base.extend(ClassMethods)
36
+ module Glue
37
+ def self.included base #:nodoc:
38
+ base.extend(ClassMethods)
39
+ end
38
40
  end
39
41
 
40
42
  module ClassMethods
@@ -53,7 +53,7 @@ module DelayedPaperclip
53
53
  end
54
54
  end
55
55
 
56
- def url_with_processed style = default_style, include_updated_timestamp = @use_timestamp
56
+ def url_with_processed style = default_style, include_updated_timestamp = @options.use_timestamp
57
57
  return url_without_processed style, include_updated_timestamp if !@instance.class.attachment_definitions[@name][:delayed].try(:[], :url_with_processing) || job_is_processing
58
58
 
59
59
  if !@instance.respond_to?(:"#{name}_processing?")
@@ -65,7 +65,8 @@ module DelayedPaperclip
65
65
  if dirty?
66
66
  url_without_processed style, include_updated_timestamp
67
67
  else
68
- interpolate(@default_url, style)
68
+ default_url = @options.default_url.is_a?(Proc) ? @options.default_url.call(self) : @options.default_url
69
+ interpolate(default_url, style)
69
70
  end
70
71
  end
71
72
  end
@@ -14,7 +14,7 @@ module DelayedPaperclip
14
14
 
15
15
  class Railtie
16
16
  def self.insert
17
- ActiveRecord::Base.send(:include, DelayedPaperclip)
17
+ ActiveRecord::Base.send(:include, DelayedPaperclip::Glue)
18
18
  Paperclip::Attachment.send :include, DelayedPaperclip::Attachment
19
19
  end
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_paperclip
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2.0
4
+ version: 2.4.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,18 +14,18 @@ date: 2011-11-12 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: paperclip
17
- requirement: &2152842880 !ruby/object:Gem::Requirement
17
+ requirement: &2165116360 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 2.4.2
22
+ version: 2.4.3
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2152842880
25
+ version_requirements: *2165116360
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: mocha
28
- requirement: &2152842460 !ruby/object:Gem::Requirement
28
+ requirement: &2165115920 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2152842460
36
+ version_requirements: *2165115920
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: sqlite3
39
- requirement: &2152841940 !ruby/object:Gem::Requirement
39
+ requirement: &2165115400 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2152841940
47
+ version_requirements: *2165115400
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: delayed_job
50
- requirement: &2152841460 !ruby/object:Gem::Requirement
50
+ requirement: &2165114820 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2152841460
58
+ version_requirements: *2165114820
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: resque
61
- requirement: &2152840980 !ruby/object:Gem::Requirement
61
+ requirement: &2165114300 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2152840980
69
+ version_requirements: *2165114300
70
70
  description: Process your Paperclip attachments in the background with delayed_job,
71
71
  Resque or your own processor.
72
72
  email: jesse@jstorimer.com