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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac4238ff0e22f613444f1ae9124a20bf4e884f2f7c4f8fe05c1e8d0bd147cad7
4
- data.tar.gz: 02e2877398db81eb4c58a1afbad4c0355020da0fb7505c895d493d40a93223d7
3
+ metadata.gz: b0fce84117963b495d370420cf9284024ee5f64b9016c19d711611e73ab7c37b
4
+ data.tar.gz: 693fbc3e13673bb75eef4defb7c660b20840b27fee01730f73ab7946fa7cb823
5
5
  SHA512:
6
- metadata.gz: 2bacfe8d1e126cc3a3e31f5dfdb1346efb1398adf33dac32e4e58731bcfd11580d51544797a59d563361ee28c5d4a37a76a7659b7534651a574c7903820cc994
7
- data.tar.gz: '04198e8f916fd87a5a1587129b86480cde12cbab889acfa2baaf23a34ed966292cc24312c1b731648c556e27fc3045b0a5b56d43ab6124abacbcb33cdf05fab2'
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))
@@ -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
@@ -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
- YAML.safe_load(
155
- ERB.new(File.read(layouts_file_path)).result,
156
- permitted_classes: YAML_PERMITTED_CLASSES,
157
- aliases: true,
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "6.0.6"
4
+ VERSION = "6.0.7"
5
5
 
6
6
  def self.version
7
7
  VERSION
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alchemy_cms/admin",
3
- "version": "6.0.6",
3
+ "version": "6.0.7",
4
4
  "description": "AlchemyCMS",
5
5
  "browser": "package/admin.js",
6
6
  "files": [
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.6
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-05-30 00:00:00.000000000 Z
16
+ date: 2022-06-04 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer