alchemy-dragonfly-s3 3.6.5 → 3.6.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 07e27d0972c3f7d205fea44ca18707a60674ba3a
|
4
|
+
data.tar.gz: 4cbf280831ab503c0acac159cd26bd6f397e229d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d59f579103e7976a83f252389eb0a81ca82c4c0d852ecbc8f0d81f9c0e705b36decc74576eaa1157f25257e5c193a2dd3a10aa048b1174697eafd2adf485dcd2
|
7
|
+
data.tar.gz: d386023a14465cf7d6f218f24fccdf3ff40165a6a2c031698ed9d9ab034c7b107a64d9944393192a59c048d6bbc09d2271f4d076cc186692a2d4aa4744bda22d
|
@@ -5,13 +5,23 @@ module Alchemy
|
|
5
5
|
#
|
6
6
|
class Create
|
7
7
|
def self.call(variant, signature, uid)
|
8
|
-
|
9
|
-
|
10
|
-
variant.picture.thumbs.create!(
|
8
|
+
# create the thumb before uploading
|
9
|
+
# to prevent db race conditions
|
10
|
+
thumb = variant.picture.thumbs.create!(
|
11
11
|
picture: variant.picture,
|
12
12
|
signature: signature,
|
13
13
|
uid: uid,
|
14
14
|
)
|
15
|
+
begin
|
16
|
+
# fetch and process the image
|
17
|
+
image = variant.image
|
18
|
+
# upload the processed image
|
19
|
+
image.store(path: uid)
|
20
|
+
rescue RuntimeError, Excon::Error => e
|
21
|
+
Rails.logger.warn(e)
|
22
|
+
# destroy the thumb if processing or upload fails
|
23
|
+
thumb.destroy
|
24
|
+
end
|
15
25
|
end
|
16
26
|
end
|
17
27
|
end
|
@@ -91,7 +91,7 @@ module Alchemy
|
|
91
91
|
|
92
92
|
encoding_options = []
|
93
93
|
|
94
|
-
convert_format = render_format != picture.image_file_format.sub("jpeg", "jpg")
|
94
|
+
convert_format = render_format.sub("jpeg", "jpg") != picture.image_file_format.sub("jpeg", "jpg")
|
95
95
|
|
96
96
|
if render_format =~ /jpe?g/ && convert_format
|
97
97
|
quality = options[:quality] || Config.get(:output_image_jpg_quality)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-dragonfly-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -158,7 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
|
161
|
+
rubyforge_project:
|
162
|
+
rubygems_version: 2.6.14.4
|
162
163
|
signing_key:
|
163
164
|
specification_version: 4
|
164
165
|
summary: AlchemyCMS Dragonfly S3.
|