alchemy_cms 7.4.11 → 7.4.13

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: 52b2d590102b1bce5b74aa747fdba21f2787e9d7e0c52683f1015b031a1c2a95
4
- data.tar.gz: f6d443d39b565b16749840b5e4fd96008dc3121625dda35c00383fe1fc120547
3
+ metadata.gz: 27f806a1a21492486b1f8bc57ecb2d38c23064f6bf39b489426b1f916b244165
4
+ data.tar.gz: cdd3d19162be0606e8d8a91b00a2ee207670c8dd1065e9a886b832295316b4c8
5
5
  SHA512:
6
- metadata.gz: 1a17e8da83f93f6119043c33551ff650cad6b406df35cd0d3d94c7f2d39c0b091280f88ca12b13860aa81dd951115a4d331ffa9397a621359d73c926a4f74882
7
- data.tar.gz: 49f824b5f3b5ebb98b902e2fd9aac50c1f4449ae2d0b455f4dc897f4b1887edb570c6f5cbc74c6a9b4739c2f7047f4ede2bd9c826fad4bdc2d73abab8cacb208
6
+ metadata.gz: 8e6605933d4e61657bb83dad115f4c29ab676c6eae1df863af973deddedb4c289d8b8b45358b9880aba5ff14b8d73a89a48d9dabc65a721a760c96e3d0d4ce5f
7
+ data.tar.gz: 90cd853afa25f55975d091f57d7c1d4a769f2f6b2ed12a31b201f9d2038f8ab7507b8a046d8e62cce8b81820beea07a60c33c8946c6d2c93f7c1b0713281b250
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.4.13 (2026-02-17)
4
+
5
+ ## What's Changed
6
+ * [7.4-stable] fix(LinkDialog): Fix anchor regex to handle hyphens in URL fragments by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy_cms/pull/3684
7
+
8
+
9
+ **Full Changelog**: https://github.com/AlchemyCMS/alchemy_cms/compare/v7.4.12...v7.4.13
10
+
11
+ ## 7.4.12 (2026-01-19)
12
+
13
+ ## What's Changed
14
+ * Fix flaky picture descriptions spec by @tvdeyen in https://github.com/AlchemyCMS/alchemy_cms/pull/3438
15
+ * [7.4-stable] Fix factories by @alchemycms-ci-bot in https://github.com/AlchemyCMS/alchemy_cms/pull/3462
16
+ * [7.4-stable] fix(seeder): Use YAML.safe_load to load users.yml by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy_cms/pull/3502
17
+ * [7.4-stable] fix(resource_url_proxy): Use send over eval by @alchemycms-ci-bot in https://github.com/AlchemyCMS/alchemy_cms/pull/3564
18
+
19
+
20
+ **Full Changelog**: https://github.com/AlchemyCMS/alchemy_cms/compare/v7.4.11...v7.4.12
21
+
3
22
  ## 7.4.11 (2025-10-27)
4
23
 
5
24
  - [7.4-stable] Only sanitize filenames if not nil [#3437](https://github.com/AlchemyCMS/alchemy_cms/pull/3437) ([tvdeyen](https://github.com/tvdeyen))
@@ -103,7 +103,7 @@ module Alchemy
103
103
  action_controller = url.gsub(/\A\//, "").split("/")
104
104
  [
105
105
  action_controller.last.to_sym,
106
- action_controller[0..action_controller.length - 2].join("_").to_sym
106
+ action_controller[0..-2].join("_").to_sym
107
107
  ]
108
108
  end
109
109
  end
@@ -1,6 +1,11 @@
1
1
  import { translate } from "alchemy_admin/i18n"
2
2
  import { Dialog } from "alchemy_admin/dialog"
3
3
 
4
+ // Matches a URL fragment (#anchor) at the end of a string.
5
+ // Covers RFC 3986 unreserved characters (ALPHA, DIGIT, "-", ".", "_", "~")
6
+ // which are the characters valid in URL fragments and common in DOM element IDs.
7
+ const ANCHOR_REGEX = /#[\w.~-]+$/
8
+
4
9
  // Represents the link Dialog that appears, if a user clicks the link buttons
5
10
  // in TinyMCE or on an Ingredient that has links enabled (e.g. Picture)
6
11
  //
@@ -103,7 +108,7 @@ export class LinkDialog extends Dialog {
103
108
 
104
109
  if (linkType === "internal" && elementAnchor.value !== "") {
105
110
  // remove possible fragments on the url and attach the fragment (which contains the #)
106
- url = url.replace(/#\w+$/, "") + elementAnchor.value
111
+ url = url.replace(ANCHOR_REGEX, "") + elementAnchor.value
107
112
  } else if (linkType === "external" && !url.match(Alchemy.link_url_regexp)) {
108
113
  // show validation error and prevent link creation
109
114
  this.#showValidationError()
@@ -23,7 +23,7 @@ module Alchemy
23
23
 
24
24
  def resource_url_proxy
25
25
  if resource_handler.in_engine?
26
- eval(resource_handler.engine_name) # rubocop:disable Security/Eval
26
+ public_send(resource_handler.engine_name)
27
27
  else
28
28
  main_app
29
29
  end
@@ -68,7 +68,7 @@ module Alchemy
68
68
  "Please use `rake db:reset' if you want to rebuild your database.", :skip
69
69
  false
70
70
  else
71
- users = YAML.load_file(user_seeds_file)
71
+ users = load_yaml_file(user_seeds_file)
72
72
  users.each do |draft|
73
73
  user = Alchemy.user_class.create!(draft)
74
74
  log "Created user: #{user.try(:email) || user.try(:login) || user.id}"
@@ -83,9 +83,15 @@ module Alchemy
83
83
  end
84
84
 
85
85
  def page_yml
86
- @_page_yml ||= YAML.safe_load(
87
- page_seeds_file.read,
88
- permitted_classes: [Date],
86
+ @_page_yml ||= load_yaml_file(
87
+ page_seeds_file
88
+ )
89
+ end
90
+
91
+ def load_yaml_file(file)
92
+ YAML.safe_load_file(
93
+ file,
94
+ permitted_classes: [Date, Symbol],
89
95
  aliases: true
90
96
  )
91
97
  end
@@ -3,7 +3,8 @@
3
3
  FactoryBot.define do
4
4
  factory :alchemy_language, class: "Alchemy::Language" do
5
5
  name { "Your Language" }
6
- code { ::I18n.available_locales.first.to_s }
6
+ language_code { "en" }
7
+ locale { ::I18n.default_locale }
7
8
  default { true }
8
9
  frontpage_name { "Intro" }
9
10
  page_layout { Alchemy::Config.get(:default_language)["page_layout"] }
@@ -14,20 +15,23 @@ FactoryBot.define do
14
15
 
15
16
  trait :klingon do
16
17
  name { "Klingon" }
17
- code { "kl" }
18
+ language_code { "kl" }
19
+ locale { :kl }
18
20
  frontpage_name { "Tuq" }
19
21
  default { false }
20
22
  end
21
23
 
22
24
  trait :english do
23
25
  name { "English" }
24
- code { "en" }
26
+ language_code { "en" }
27
+ locale { :en }
25
28
  default { false }
26
29
  end
27
30
 
28
31
  trait :german do
29
32
  name { "Deutsch" }
30
- code { "de" }
33
+ language_code { "de" }
34
+ locale { :de }
31
35
  default { false }
32
36
  end
33
37
  end
@@ -33,6 +33,7 @@ FactoryBot.define do
33
33
  public_on { Time.current }
34
34
  public_until { nil }
35
35
  end
36
+ published_at { Time.current }
36
37
  after(:build) do |page, evaluator|
37
38
  page.build_public_version(
38
39
  public_on: evaluator.public_on,
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.4.11"
4
+ VERSION = "7.4.13"
5
5
 
6
6
  def self.version
7
7
  VERSION
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: 7.4.11
4
+ version: 7.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -1409,7 +1409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1409
1409
  version: '0'
1410
1410
  requirements:
1411
1411
  - ImageMagick (libmagick), v6.6 or greater.
1412
- rubygems_version: 3.6.9
1412
+ rubygems_version: 4.0.3
1413
1413
  specification_version: 4
1414
1414
  summary: A powerful, userfriendly and flexible CMS for Rails
1415
1415
  test_files: []