alchemy_cms 6.0.6 → 6.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/models/alchemy/page.rb +6 -0
- data/lib/alchemy/page_layout.rb +8 -6
- data/lib/alchemy/version.rb +1 -1
- data/lib/tasks/alchemy/thumbnails.rake +9 -0
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0fce84117963b495d370420cf9284024ee5f64b9016c19d711611e73ab7c37b
|
4
|
+
data.tar.gz: 693fbc3e13673bb75eef4defb7c660b20840b27fee01730f73ab7946fa7cb823
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77b35133d99ad3458fe8c1c37abb70dc120841844f7dfeabde471fbc3740d551d726057b1f306c1890dcc39c1e89fe0e16d6fb18ebfda23888da8b3c5d4178f4
|
7
|
+
data.tar.gz: 0e34ec1637dcfe6a580f3f846b4237859efbdd0c415b0d7dda109a1eac4d0553cd7206a52c31b5396834334931a862879e49fe52f69424a69ec8891b2c98fc02
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 6.0.7 (2022-06-04)
|
2
|
+
|
3
|
+
- Eagerly generate thumbs for srcset images in task as well [#2344](https://github.com/AlchemyCMS/alchemy_cms/pull/2344) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
- Use HashWithIndifferentAccess for Page definition. Key hint translation by page_layout [#2343](https://github.com/AlchemyCMS/alchemy_cms/pull/2343) ([dbwinger](https://github.com/dbwinger))
|
5
|
+
|
1
6
|
## 6.0.6 (2022-05-30)
|
2
7
|
|
3
8
|
- Add task to eagerly generate ingredients pictures thumbnails [#2342](https://github.com/AlchemyCMS/alchemy_cms/pull/2342) ([tvdeyen](https://github.com/tvdeyen))
|
data/app/models/alchemy/page.rb
CHANGED
@@ -565,6 +565,12 @@ module Alchemy
|
|
565
565
|
locker.try(:name) || Alchemy.t("unknown")
|
566
566
|
end
|
567
567
|
|
568
|
+
# Key hint translations by page layout, rather than the default name.
|
569
|
+
#
|
570
|
+
def hint_translation_attribute
|
571
|
+
page_layout
|
572
|
+
end
|
573
|
+
|
568
574
|
# Menus (aka. root nodes) this page is attached to
|
569
575
|
#
|
570
576
|
def menus
|
data/lib/alchemy/page_layout.rb
CHANGED
@@ -8,7 +8,7 @@ module Alchemy
|
|
8
8
|
# They are defined in +config/alchemy/page_layout.yml+ file.
|
9
9
|
#
|
10
10
|
def all
|
11
|
-
@definitions ||= read_definitions_file
|
11
|
+
@definitions ||= read_definitions_file.map(&:with_indifferent_access)
|
12
12
|
end
|
13
13
|
|
14
14
|
# Add additional page definitions to collection.
|
@@ -151,11 +151,13 @@ module Alchemy
|
|
151
151
|
#
|
152
152
|
def read_definitions_file
|
153
153
|
if File.exist?(layouts_file_path)
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
154
|
+
Array.wrap(
|
155
|
+
YAML.safe_load(
|
156
|
+
ERB.new(File.read(layouts_file_path)).result,
|
157
|
+
permitted_classes: YAML_PERMITTED_CLASSES,
|
158
|
+
aliases: true,
|
159
|
+
) || []
|
160
|
+
)
|
159
161
|
else
|
160
162
|
raise LoadError, "Could not find page_layouts.yml file! Please run `rails generate alchemy:install`"
|
161
163
|
end
|
data/lib/alchemy/version.rb
CHANGED
@@ -6,6 +6,7 @@ namespace :alchemy do
|
|
6
6
|
task thumbnails: [
|
7
7
|
"alchemy:generate:picture_thumbnails",
|
8
8
|
"alchemy:generate:essence_picture_thumbnails",
|
9
|
+
"alchemy:generate:ingredient_picture_thumbnails",
|
9
10
|
]
|
10
11
|
|
11
12
|
desc "Generates thumbnails for Alchemy Pictures."
|
@@ -31,6 +32,10 @@ namespace :alchemy do
|
|
31
32
|
essence_pictures.find_each do |essence_picture|
|
32
33
|
puts essence_picture.picture_url
|
33
34
|
puts essence_picture.thumbnail_url
|
35
|
+
|
36
|
+
essence_picture.settings.fetch(:srcset, []).each do |src|
|
37
|
+
puts essence_picture.picture_url(src)
|
38
|
+
end
|
34
39
|
end
|
35
40
|
|
36
41
|
puts "Done!"
|
@@ -55,6 +60,10 @@ namespace :alchemy do
|
|
55
60
|
ingredient_pictures.find_each do |ingredient_picture|
|
56
61
|
puts ingredient_picture.picture_url
|
57
62
|
puts ingredient_picture.thumbnail_url
|
63
|
+
|
64
|
+
ingredient_picture.settings.fetch(:srcset, []).each do |src|
|
65
|
+
puts ingredient_picture.picture_url(src)
|
66
|
+
end
|
58
67
|
end
|
59
68
|
|
60
69
|
puts "Done!"
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2022-
|
16
|
+
date: 2022-06-04 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|