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