ack-paperclip-meta 3.0.0.1 → 3.0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/paperclip/meta/attachment.rb +3 -1
- data/lib/paperclip/meta/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e30bf93a1c0c942ef040b6ba67722ee7942fc3a2
|
4
|
+
data.tar.gz: 23b760b0695ff83e53252af05ff5c3fe8bc2a61b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41078d22213e9c453f98cc44268106df65a1f9bb750a549d1a720d041448a9e0d054d72ce5f26a8a3cb2bd6fe62c1be8abe9683cc0f9dbc133c4a8b30dbb1f92
|
7
|
+
data.tar.gz: 75683ee450ca76f59716a1d259197cbaaf1b61fc842c2e8d1fcdd1529d68c1aa4910153d88a69bfdd5428d2c2bf09c19820fb09464058483b5ecc868d390df05
|
@@ -3,7 +3,7 @@ module Paperclip
|
|
3
3
|
module Attachment
|
4
4
|
def assign_attributes
|
5
5
|
super
|
6
|
-
assign_meta
|
6
|
+
assign_meta if content_type =~ /\Aimage\/.*\Z/
|
7
7
|
end
|
8
8
|
|
9
9
|
def save
|
@@ -44,6 +44,7 @@ module Paperclip
|
|
44
44
|
private
|
45
45
|
|
46
46
|
def assign_meta
|
47
|
+
return unless content_type =~ /\Aimage\/.*\Z/
|
47
48
|
return unless instance.respond_to?(:"#{name}_meta=")
|
48
49
|
meta = populate_meta(@queued_for_write)
|
49
50
|
return if meta == {}
|
@@ -85,6 +86,7 @@ module Paperclip
|
|
85
86
|
|
86
87
|
# Return decoded metadata as Object
|
87
88
|
def meta_decode(meta)
|
89
|
+
return meta if meta.is_a?(Hash)
|
88
90
|
Marshal.load(Base64.decode64(meta))
|
89
91
|
end
|
90
92
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ack-paperclip-meta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ack
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: paperclip
|