papercrop 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of papercrop might be problematic. Click here for more details.
- data/lib/papercrop/active_record_extension.rb +10 -2
- metadata +2 -2
@@ -35,8 +35,16 @@ module Papercrop
|
|
35
35
|
opts[:aspect].first.to_f / opts[:aspect].last.to_f
|
36
36
|
end
|
37
37
|
|
38
|
-
|
39
|
-
|
38
|
+
if respond_to? :attachment_definitions
|
39
|
+
# for Paperclip <= 3.4
|
40
|
+
definitions = attachment_definitions
|
41
|
+
else
|
42
|
+
# for Paperclip >= 3.5
|
43
|
+
definitions = Paperclip::Tasks::Attachments.instance.definitions_for(self)
|
44
|
+
end
|
45
|
+
|
46
|
+
definitions[attachment_name][:processors] ||= []
|
47
|
+
definitions[attachment_name][:processors] << :cropper
|
40
48
|
|
41
49
|
after_update :"reprocess_to_crop_#{attachment_name}_attachment"
|
42
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: papercrop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|