alchemy-dragonfly-s3 5.2.1 → 6.0.0

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
2
  SHA256:
3
- metadata.gz: f2741b9d0809ea0db39de700b0ca1b1181deec6d59606737c7620ec96faadf66
4
- data.tar.gz: c8ce3d82fb9a790f2719ebeb39e69547602e68336e6ec345306b0c570c682aa5
3
+ metadata.gz: 8731b036311b3a669e0644fe5fd9e0301bc981bdc431c102979961aa4db3671e
4
+ data.tar.gz: dbddcab7948012fe5d9a12a140fbc203dadac20157b039d74d82d86abb3a7390
5
5
  SHA512:
6
- metadata.gz: dffd05e4c6da9a3ceb21895c71c042e07ded2a7a8bd6556bfefeffa40af34a9ece18017050755f435ce34d1ae354dbcfe6d77dc5153b0a5e91d381d886d49821
7
- data.tar.gz: 80e574fdc5b74a76d1278bf9b809ceb56b19778e76acf485afc76a914c7e3559ab7ab81c447b0c0c6f985bc7fdfdc894fc612816df7932168a32d3a1e87e4dab
6
+ metadata.gz: b0ca6b6a588e561c9c154853d4393e67aeaa7950810347f84d04cf3b61a6e7621c6d228c977d6bd9c3df02c07014e632fabf579392d82687828136b70cef3c75
7
+ data.tar.gz: cd8f538c29407ba748d89f6a6b71960b0e9f9812b4924a19151909b42ddad41a3ab14edb43f04b09d546bba3124ce2b4f9c152112f599bcadf04320ce0f52eaa
data/CHANGELOG.md CHANGED
@@ -1,6 +1,7 @@
1
- ## v5.2.1
1
+ ## v6.0.0
2
2
 
3
- - Fix race condition in CreatePictureThumb
3
+ - Allow Alchemy 6.1
4
+ - Drop support for Alchemy 5.x
4
5
 
5
6
  ## v5.2.0
6
7
 
data/README.md CHANGED
@@ -6,8 +6,9 @@ Provides classes for storing Alchemy pictures and file attachments on Amazon AWS
6
6
 
7
7
  ## Alchemy Version
8
8
 
9
- This branch works with Alchemy 5.1 and above.
9
+ This branch works with Alchemy 6.0 and above.
10
10
 
11
+ - For a Alchemy 5.2/5.3 compatible version use the `5.2-stable` branch.
11
12
  - For a Alchemy 5.0 compatible version use the `alchemy-5` branch.
12
13
  - For a Alchemy 4 compatible version use the `alchemy-4` branch.
13
14
  - For a Alchemy 3 compatible version use the `alchemy-3` branch.
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  "README.md",
25
25
  ]
26
26
 
27
- s.add_dependency "alchemy_cms", [">= 5.1.0", "< 6.1"]
27
+ s.add_dependency "alchemy_cms", [">= 6.0.0", "< 7"]
28
28
  s.add_dependency "dragonfly-s3_data_store", "~> 1.3"
29
29
 
30
30
  s.add_development_dependency "rspec-rails", "~> 4.0"
@@ -5,13 +5,15 @@ module Alchemy
5
5
  module S3
6
6
  class CreatePictureThumb
7
7
  def self.call(variant, signature, uid)
8
- return if !variant.picture.valid?
9
-
10
8
  # create the thumb before uploading
11
9
  # to prevent db race conditions
12
- @thumb = Alchemy::PictureThumb.create_or_find_by!(signature: signature) do |thumb|
13
- thumb.picture = variant.picture
14
- thumb.uid = uid
10
+ thumb = nil
11
+ if variant.picture.valid?
12
+ thumb = Alchemy::PictureThumb.create!(
13
+ picture: variant.picture,
14
+ signature: signature,
15
+ uid: uid,
16
+ )
15
17
  end
16
18
  begin
17
19
  # fetch and process the image
@@ -21,7 +23,7 @@ module Alchemy
21
23
  rescue RuntimeError, Excon::Error => e
22
24
  ErrorTracking.notification_handler.call(e)
23
25
  # destroy the thumb if processing or upload fails
24
- @thumb&.destroy
26
+ thumb&.destroy
25
27
  end
26
28
  end
27
29
  end
@@ -3,7 +3,7 @@
3
3
  module Alchemy
4
4
  module Dragonfly
5
5
  module S3
6
- VERSION = "5.2.1"
6
+ VERSION = "6.0.0"
7
7
  end
8
8
  end
9
9
  end
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: 5.2.1
4
+ version: 6.0.0
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: 2023-02-27 00:00:00.000000000 Z
11
+ date: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.0
19
+ version: 6.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.1'
22
+ version: '7'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.1.0
29
+ version: 6.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.1'
32
+ version: '7'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dragonfly-s3_data_store
35
35
  requirement: !ruby/object:Gem::Requirement