alchemy-dragonfly-s3 6.0.1 → 7.0.1

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: db1e5c08edd7be1ceba98fb77b3882a31f2bdf49b665eed978cfeff75d87163d
4
- data.tar.gz: 354c096e7451931b3db43cc949cf73a1c54a13b389a8707af496c17f0cf85157
3
+ metadata.gz: 2f699a0a68567c941ec4621f8d79d619e7331f41d95a53a6c5ff0fb18c47cd39
4
+ data.tar.gz: a9efc4cb11e5c1023880cd1a40ba0c7c1a8c967acced2f80b7e0978c9c6b702f
5
5
  SHA512:
6
- metadata.gz: a928b88710af67671e36de32a46a68bb3cfdb59198b41dbdddd8eb5ecf3530c6bef7ce43ce8452b7af0a7dbff259269a1e22a3b70be0aadabd37353262fdc1f8
7
- data.tar.gz: cdfc3fafb942ec4645f60760521c3c2bb19e8494c42697da1e4f0812fcbb18c1545fd6c7fd781fcfbc42b1449db970e1f04c62718a0837a5811ae071cd7d9027
6
+ metadata.gz: 59b691ee5fbcba90844105dc74f1354058a290ece9a404762caf400989d4c45e1a4fa0096c38a123290333438aa35d6ad88ed075bfb1b9b93ea1c6c5f63f843a
7
+ data.tar.gz: 980c593b4c73e50aa4a594140d4d5d7a2389fe981c0ac52949aa38326c7a18b243776da68253963e098a9835ed21c78c48c9ae683d0302c620fe387238fc5b54
data/CHANGELOG.md CHANGED
@@ -1,38 +1,151 @@
1
- ## v6.0.1
1
+ # Changelog
2
2
 
3
- - Fix race condition in CreatePictureThumb
3
+ ## [v7.0.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v7.0.1) (2025-01-24)
4
4
 
5
- ## v6.0.0
5
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v7.0.0...v7.0.1)
6
6
 
7
- - Allow Alchemy 6.1
8
- - Drop support for Alchemy 5.x
7
+ **Merged pull requests:**
9
8
 
10
- ## v5.2.0
9
+ - Update test matrix [\#23](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/23) ([tvdeyen](https://github.com/tvdeyen))
11
10
 
12
- - Fix loading of Alchemy factories
13
- - Allow Alchemy 6
14
- - Use config.to_prepare as hook to register classes
11
+ ## [v7.0.0](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v7.0.0) (2023-03-31)
15
12
 
16
- ## v5.1.5
13
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v6.0.1...v7.0.0)
17
14
 
18
- - Prevent db race conditions while creating thumbs
15
+ **Merged pull requests:**
19
16
 
20
- ## v5.1.4
17
+ - Add picture thumb store [\#21](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/21) ([tvdeyen](https://github.com/tvdeyen))
21
18
 
22
- - Include necessary files in gem package
19
+ ## [v6.0.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v6.0.1) (2023-02-27)
23
20
 
24
- ## v5.1.3
21
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.2.1...v6.0.1)
25
22
 
26
- - Use Alchemy 5.1.0.alpha
23
+ **Merged pull requests:**
27
24
 
28
- ## v5.1.2
25
+ - Fix race condition in CreatePictureThumb [\#20](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/20) ([tvdeyen](https://github.com/tvdeyen))
29
26
 
30
- - Add support for file attachments stored on S3
27
+ ## [v5.2.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.2.1) (2023-02-27)
31
28
 
32
- ## v5.1.1
29
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v6.0.0...v5.2.1)
33
30
 
34
- - Ensure to create new thumbs on in memory picture
31
+ ## [v6.0.0](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v6.0.0) (2023-01-20)
35
32
 
36
- ## v5.1.0
33
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.2.0...v6.0.0)
37
34
 
38
- - Alchemy 5.1 support
35
+ **Merged pull requests:**
36
+
37
+ - Allow Alchemy 6.1 [\#19](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/19) ([tvdeyen](https://github.com/tvdeyen))
38
+ - CI: Run on latest ubuntu, update node and test all rubies [\#17](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/17) ([tvdeyen](https://github.com/tvdeyen))
39
+ - Do not create thumbs for invalid pictures [\#16](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/16) ([tvdeyen](https://github.com/tvdeyen))
40
+
41
+ ## [v5.2.0](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.2.0) (2022-05-18)
42
+
43
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.1.5...v5.2.0)
44
+
45
+ **Closed issues:**
46
+
47
+ - Errors when using different data stores based on the environment [\#10](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/issues/10)
48
+ - Error when installing this gem on 4.0-stable [\#9](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/issues/9)
49
+ - Not possible to use it on 4.6 [\#3](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/issues/3)
50
+ - Excon::Error::Forbidden Expected\(200\) \<=\> Actual\(403 Forbidden\) [\#2](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/issues/2)
51
+
52
+ **Merged pull requests:**
53
+
54
+ - Fix loading of Alchemy factories [\#14](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/14) ([tvdeyen](https://github.com/tvdeyen))
55
+ - Reflect AlchemyCMS supported versions in README [\#13](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/13) ([afdev82](https://github.com/afdev82))
56
+ - Change the way we load Alchemy factories in tests [\#8](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/8) ([tvdeyen](https://github.com/tvdeyen))
57
+ - Allow Alchemy 6 [\#7](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/7) ([tvdeyen](https://github.com/tvdeyen))
58
+ - Use config.to\_prepare as hook to register classes [\#6](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/6) ([tvdeyen](https://github.com/tvdeyen))
59
+ - Add more files to packaged Gem [\#4](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/4) ([tvdeyen](https://github.com/tvdeyen))
60
+
61
+ ## [v5.1.5](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.1.5) (2020-07-21)
62
+
63
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v3.6.6...v5.1.5)
64
+
65
+ ## [v3.6.6](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v3.6.6) (2020-07-21)
66
+
67
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v4.0.5...v3.6.6)
68
+
69
+ ## [v4.0.5](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v4.0.5) (2020-07-20)
70
+
71
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.0.6...v4.0.5)
72
+
73
+ ## [v5.0.6](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.0.6) (2020-07-20)
74
+
75
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.1.4...v5.0.6)
76
+
77
+ ## [v5.1.4](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.1.4) (2020-07-17)
78
+
79
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.0.5...v5.1.4)
80
+
81
+ ## [v5.0.5](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.0.5) (2020-07-17)
82
+
83
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v4.0.4...v5.0.5)
84
+
85
+ ## [v4.0.4](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v4.0.4) (2020-07-17)
86
+
87
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v3.6.5...v4.0.4)
88
+
89
+ ## [v3.6.5](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v3.6.5) (2020-07-17)
90
+
91
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v4.0.3...v3.6.5)
92
+
93
+ ## [v4.0.3](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v4.0.3) (2020-07-17)
94
+
95
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v3.6.4...v4.0.3)
96
+
97
+ ## [v3.6.4](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v3.6.4) (2020-07-17)
98
+
99
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.1.3...v3.6.4)
100
+
101
+ ## [v5.1.3](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.1.3) (2020-07-17)
102
+
103
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.0.4...v5.1.3)
104
+
105
+ ## [v5.0.4](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.0.4) (2020-07-16)
106
+
107
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.0.3...v5.0.4)
108
+
109
+ ## [v5.0.3](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.0.3) (2020-07-16)
110
+
111
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.1.2...v5.0.3)
112
+
113
+ ## [v5.1.2](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.1.2) (2020-06-30)
114
+
115
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.0.2...v5.1.2)
116
+
117
+ ## [v5.0.2](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.0.2) (2020-06-30)
118
+
119
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v4.0.2...v5.0.2)
120
+
121
+ ## [v4.0.2](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v4.0.2) (2020-06-30)
122
+
123
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v3.6.3...v4.0.2)
124
+
125
+ ## [v3.6.3](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v3.6.3) (2020-06-30)
126
+
127
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.1.1...v3.6.3)
128
+
129
+ ## [v5.1.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.1.1) (2020-06-25)
130
+
131
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v5.0.1...v5.1.1)
132
+
133
+ ## [v5.0.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v5.0.1) (2020-06-25)
134
+
135
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v3.6.2...v5.0.1)
136
+
137
+ ## [v3.6.2](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v3.6.2) (2020-06-25)
138
+
139
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v4.0.1...v3.6.2)
140
+
141
+ ## [v4.0.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v4.0.1) (2020-06-25)
142
+
143
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v3.6.1...v4.0.1)
144
+
145
+ ## [v3.6.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v3.6.1) (2020-06-23)
146
+
147
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/02ad3d212f611156769ec78a10a3f7332dd23672...v3.6.1)
148
+
149
+
150
+
151
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
@@ -10,11 +10,18 @@ Gem::Specification.new do |s|
10
10
  s.version = Alchemy::Dragonfly::S3::VERSION
11
11
  s.authors = ["Thomas von Deyen"]
12
12
  s.email = ["thomas@vondeyen.com"]
13
- s.homepage = "https://alchemy-cms.com"
13
+ s.homepage = "https://github.com/AlchemyCMS/alchemy-dragonfly-s3"
14
14
  s.summary = "AlchemyCMS Dragonfly S3."
15
15
  s.description = "AlchemyCMS Integration for the Dragonfly S3 datastore."
16
16
  s.license = "MIT"
17
17
 
18
+ s.metadata = {
19
+ "source_code_uri" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3",
20
+ "changelog_uri" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3/blob/main/CHANGELOG.md",
21
+ "bug_tracker_uri" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3/issues",
22
+ "github_repo" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3",
23
+ }
24
+
18
25
  s.files = Dir[
19
26
  "app/**/*",
20
27
  "lib/**/*",
@@ -24,10 +31,11 @@ Gem::Specification.new do |s|
24
31
  "README.md",
25
32
  ]
26
33
 
27
- s.add_dependency "alchemy_cms", [">= 6.0.0", "< 7"]
34
+ s.add_dependency "alchemy_cms", [">= 7.0.0-a", "< 8"]
28
35
  s.add_dependency "dragonfly-s3_data_store", "~> 1.3"
29
36
 
30
- s.add_development_dependency "rspec-rails", "~> 4.0"
37
+ s.add_development_dependency "rspec-rails", "~> 7.1"
31
38
  s.add_development_dependency "factory_bot_rails", "~> 6.0"
39
+ s.add_development_dependency "github_changelog_generator"
32
40
  s.add_development_dependency "simplecov", "~> 0.17"
33
41
  end
@@ -9,7 +9,7 @@ module Alchemy
9
9
  config.to_prepare do
10
10
  Alchemy::Attachment.url_class = Alchemy::Attachment::S3Url
11
11
  Alchemy::Picture.url_class = Alchemy::Picture::S3Url
12
- Alchemy::PictureThumb.generator_class = Alchemy::Dragonfly::S3::CreatePictureThumb
12
+ Alchemy::PictureThumb.storage_class = Alchemy::Dragonfly::S3::Store
13
13
  end
14
14
  end
15
15
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alchemy
4
+ module Dragonfly
5
+ module S3
6
+ class Store
7
+ def self.call(variant, uid)
8
+ # download and process the image
9
+ image = variant.image
10
+ # upload the processed image
11
+ image.store(path: uid)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -3,7 +3,7 @@
3
3
  module Alchemy
4
4
  module Dragonfly
5
5
  module S3
6
- VERSION = "6.0.1"
6
+ VERSION = "7.0.1"
7
7
  end
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "alchemy_cms"
4
- require "alchemy/dragonfly/s3/create_picture_thumb"
4
+ require "alchemy/dragonfly/s3/store"
5
5
  require "alchemy/dragonfly/s3/engine"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-dragonfly-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-02-27 00:00:00.000000000 Z
10
+ date: 2025-01-24 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: alchemy_cms
@@ -16,20 +15,20 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 6.0.0
18
+ version: 7.0.0.pre.a
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
- version: '7'
21
+ version: '8'
23
22
  type: :runtime
24
23
  prerelease: false
25
24
  version_requirements: !ruby/object:Gem::Requirement
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: 6.0.0
28
+ version: 7.0.0.pre.a
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
- version: '7'
31
+ version: '8'
33
32
  - !ruby/object:Gem::Dependency
34
33
  name: dragonfly-s3_data_store
35
34
  requirement: !ruby/object:Gem::Requirement
@@ -50,14 +49,14 @@ dependencies:
50
49
  requirements:
51
50
  - - "~>"
52
51
  - !ruby/object:Gem::Version
53
- version: '4.0'
52
+ version: '7.1'
54
53
  type: :development
55
54
  prerelease: false
56
55
  version_requirements: !ruby/object:Gem::Requirement
57
56
  requirements:
58
57
  - - "~>"
59
58
  - !ruby/object:Gem::Version
60
- version: '4.0'
59
+ version: '7.1'
61
60
  - !ruby/object:Gem::Dependency
62
61
  name: factory_bot_rails
63
62
  requirement: !ruby/object:Gem::Requirement
@@ -72,6 +71,20 @@ dependencies:
72
71
  - - "~>"
73
72
  - !ruby/object:Gem::Version
74
73
  version: '6.0'
74
+ - !ruby/object:Gem::Dependency
75
+ name: github_changelog_generator
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ type: :development
82
+ prerelease: false
83
+ version_requirements: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
75
88
  - !ruby/object:Gem::Dependency
76
89
  name: simplecov
77
90
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +113,17 @@ files:
100
113
  - app/models/alchemy/attachment/s3_url.rb
101
114
  - app/models/alchemy/picture/s3_url.rb
102
115
  - lib/alchemy-dragonfly-s3.rb
103
- - lib/alchemy/dragonfly/s3/create_picture_thumb.rb
104
116
  - lib/alchemy/dragonfly/s3/engine.rb
117
+ - lib/alchemy/dragonfly/s3/store.rb
105
118
  - lib/alchemy/dragonfly/s3/version.rb
106
- homepage: https://alchemy-cms.com
119
+ homepage: https://github.com/AlchemyCMS/alchemy-dragonfly-s3
107
120
  licenses:
108
121
  - MIT
109
- metadata: {}
110
- post_install_message:
122
+ metadata:
123
+ source_code_uri: https://github.com/AlchemyCMS/alchemy-dragonfly-s3
124
+ changelog_uri: https://github.com/AlchemyCMS/alchemy-dragonfly-s3/blob/main/CHANGELOG.md
125
+ bug_tracker_uri: https://github.com/AlchemyCMS/alchemy-dragonfly-s3/issues
126
+ github_repo: https://github.com/AlchemyCMS/alchemy-dragonfly-s3
111
127
  rdoc_options: []
112
128
  require_paths:
113
129
  - lib
@@ -122,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
138
  - !ruby/object:Gem::Version
123
139
  version: '0'
124
140
  requirements: []
125
- rubygems_version: 3.3.26
126
- signing_key:
141
+ rubygems_version: 3.6.3
127
142
  specification_version: 4
128
143
  summary: AlchemyCMS Dragonfly S3.
129
144
  test_files: []
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Alchemy
4
- module Dragonfly
5
- module S3
6
- class CreatePictureThumb
7
- def self.call(variant, signature, uid)
8
- return if !variant.picture.valid?
9
-
10
- # create the thumb before uploading
11
- # 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
15
- end
16
- begin
17
- # fetch and process the image
18
- image = variant.image
19
- # upload the processed image
20
- image.store(path: uid)
21
- rescue RuntimeError, Excon::Error => e
22
- ErrorTracking.notification_handler.call(e)
23
- # destroy the thumb if processing or upload fails
24
- @thumb&.destroy
25
- end
26
- end
27
- end
28
- end
29
- end
30
- end