alchemy-dragonfly-s3 7.0.1 → 8.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f699a0a68567c941ec4621f8d79d619e7331f41d95a53a6c5ff0fb18c47cd39
4
- data.tar.gz: a9efc4cb11e5c1023880cd1a40ba0c7c1a8c967acced2f80b7e0978c9c6b702f
3
+ metadata.gz: 1b5d878109d3124b1e7707426ace682ffa996f55517c19a1b62737cb619e399c
4
+ data.tar.gz: 4c4deb19d084cfe051e1950e06a026f2556271d62e80e0c54c857cb5ea441638
5
5
  SHA512:
6
- metadata.gz: 59b691ee5fbcba90844105dc74f1354058a290ece9a404762caf400989d4c45e1a4fa0096c38a123290333438aa35d6ad88ed075bfb1b9b93ea1c6c5f63f843a
7
- data.tar.gz: 980c593b4c73e50aa4a594140d4d5d7a2389fe981c0ac52949aa38326c7a18b243776da68253963e098a9835ed21c78c48c9ae683d0302c620fe387238fc5b54
6
+ metadata.gz: 5d64dd4eb3065cbbd508021b723a37b6e59ee6f4f8f065fcbe4513935aa2786c9b277de3edeca2fb1b427ad93f3cdc1c340a11198b64d10dcf5d750a862886e4
7
+ data.tar.gz: 1ca420102a17034babcebc43ae90f73dd6bd35969144e2448a19643f5f765565d2791dc66ae9a8ce83deeeefcc7025fb3d2dd35c97a18cdfc98537d999f00a51
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v8.0.0](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v8.0.0) (2025-11-19)
4
+
5
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v7.0.1...v8.0.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Adjust to Alchemy 8.0 Dragonfly Storage Adapter [\#25](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/pull/25) ([tvdeyen](https://github.com/tvdeyen))
10
+
3
11
  ## [v7.0.1](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/tree/v7.0.1) (2025-01-24)
4
12
 
5
13
  [Full Changelog](https://github.com/AlchemyCMS/alchemy-dragonfly-s3/compare/v7.0.0...v7.0.1)
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  "source_code_uri" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3",
20
20
  "changelog_uri" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3/blob/main/CHANGELOG.md",
21
21
  "bug_tracker_uri" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3/issues",
22
- "github_repo" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3",
22
+ "github_repo" => "https://github.com/AlchemyCMS/alchemy-dragonfly-s3"
23
23
  }
24
24
 
25
25
  s.files = Dir[
@@ -28,13 +28,13 @@ Gem::Specification.new do |s|
28
28
  "alchemy-dragonfly-s3.gemspec",
29
29
  "CHANGELOG.md",
30
30
  "MIT-LICENSE",
31
- "README.md",
31
+ "README.md"
32
32
  ]
33
33
 
34
- s.add_dependency "alchemy_cms", [">= 7.0.0-a", "< 8"]
34
+ s.add_dependency "alchemy_cms", [">= 8.0.0.a", "< 9"]
35
35
  s.add_dependency "dragonfly-s3_data_store", "~> 1.3"
36
36
 
37
- s.add_development_dependency "rspec-rails", "~> 7.1"
37
+ s.add_development_dependency "rspec-rails", "~> 8.0"
38
38
  s.add_development_dependency "factory_bot_rails", "~> 6.0"
39
39
  s.add_development_dependency "github_changelog_generator"
40
40
  s.add_development_dependency "simplecov", "~> 0.17"
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alchemy
4
+ module Dragonfly
5
+ module S3
6
+ class AttachmentUrl < StorageAdapter::Dragonfly::AttachmentUrl
7
+ def call(*)
8
+ attachment.file&.remote_url
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alchemy
4
+ module Dragonfly
5
+ module S3
6
+ class PictureUrl < StorageAdapter::Dragonfly::PictureUrl
7
+ def call(variant_options = {})
8
+ set_variant(variant_options)
9
+ return variant.image.remote_url unless processible_image?
10
+
11
+ ::Dragonfly.app(:alchemy_pictures).remote_url_for(uid)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -7,9 +7,10 @@ module Alchemy
7
7
  engine_name "alchemy_dragonfly_s3"
8
8
 
9
9
  config.to_prepare do
10
- Alchemy::Attachment.url_class = Alchemy::Attachment::S3Url
11
- Alchemy::Picture.url_class = Alchemy::Picture::S3Url
12
- Alchemy::PictureThumb.storage_class = Alchemy::Dragonfly::S3::Store
10
+ # Configure Alchemy to use our S3Url classes for generating urls.
11
+ StorageAdapter::Dragonfly.attachment_url_class = AttachmentUrl
12
+ StorageAdapter::Dragonfly.picture_url_class = PictureUrl
13
+ PictureThumb.storage_class = Store
13
14
  end
14
15
  end
15
16
  end
@@ -3,7 +3,7 @@
3
3
  module Alchemy
4
4
  module Dragonfly
5
5
  module S3
6
- VERSION = "7.0.1"
6
+ VERSION = "8.0.0"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-dragonfly-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.1
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: alchemy_cms
@@ -15,20 +15,20 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 7.0.0.pre.a
18
+ version: 8.0.0.a
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
- version: '8'
21
+ version: '9'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 7.0.0.pre.a
28
+ version: 8.0.0.a
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
- version: '8'
31
+ version: '9'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: dragonfly-s3_data_store
34
34
  requirement: !ruby/object:Gem::Requirement
@@ -49,14 +49,14 @@ dependencies:
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: '7.1'
52
+ version: '8.0'
53
53
  type: :development
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '7.1'
59
+ version: '8.0'
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: factory_bot_rails
62
62
  requirement: !ruby/object:Gem::Requirement
@@ -110,8 +110,8 @@ files:
110
110
  - MIT-LICENSE
111
111
  - README.md
112
112
  - alchemy-dragonfly-s3.gemspec
113
- - app/models/alchemy/attachment/s3_url.rb
114
- - app/models/alchemy/picture/s3_url.rb
113
+ - app/models/alchemy/dragonfly/s3/attachment_url.rb
114
+ - app/models/alchemy/dragonfly/s3/picture_url.rb
115
115
  - lib/alchemy-dragonfly-s3.rb
116
116
  - lib/alchemy/dragonfly/s3/engine.rb
117
117
  - lib/alchemy/dragonfly/s3/store.rb
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.6.3
141
+ rubygems_version: 3.7.2
142
142
  specification_version: 4
143
143
  summary: AlchemyCMS Dragonfly S3.
144
144
  test_files: []
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Alchemy
4
- class Attachment < BaseRecord
5
- class S3Url < Url
6
- def call(*)
7
- @attachment.file.remote_url
8
- end
9
- end
10
- end
11
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Alchemy
4
- class Picture < BaseRecord
5
- class S3Url < Url
6
- def call(*)
7
- return variant.image.remote_url unless processible_image?
8
-
9
- ::Dragonfly.app(:alchemy_pictures).remote_url_for(uid)
10
- end
11
- end
12
- end
13
- end