alchemy_cms 6.1.3 → 6.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -0
- data/app/controllers/alchemy/pages_controller.rb +5 -19
- data/app/models/alchemy/element.rb +1 -0
- data/app/models/alchemy/picture.rb +3 -2
- data/config/locales/alchemy.en.yml +1 -1
- data/lib/alchemy/seeder.rb +8 -2
- data/lib/alchemy/version.rb +1 -1
- data/package.json +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a020fff31bc399c4927b5f6c4757d3f8ec8c24b76e42d6f352a5687e1feb0924
|
4
|
+
data.tar.gz: ae7367b2543dbfde31a5a7f09418e68bb94e2d40626eebd650aca7f14d5bd0cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c572d21fa3d5adb4de20649bfe1e8fa127805a82b2852f310ed6dd850797094e7cbbac5c8d5e8061600d88e54548f14753a543c8af6dc2cd0c227bb45e22818
|
7
|
+
data.tar.gz: 0e75de36f74f9b1c7c37cf12785c154dc2ed987e377fe355a9b98c3821f63302a60f8ee03e06e6bc84e04703a20d8f200236f4370ecbb6f599c0c89f3bb10389
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 6.1.5 (2023-05-26)
|
4
|
+
|
5
|
+
- [6.1] Fix page seeder [#2482](https://github.com/AlchemyCMS/alchemy_cms/pull/2482) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
|
7
|
+
## 6.1.4 (2023-05-18)
|
8
|
+
|
9
|
+
- [6.1] Revert "Preload related objects in Alchemy::PagesController" [#2473](https://github.com/AlchemyCMS/alchemy_cms/pull/2473) ([tvdeyen](https://github.com/tvdeyen))
|
10
|
+
|
3
11
|
## 6.1.3 (2023-03-29)
|
4
12
|
|
5
13
|
- Fix installer: Add seeds file if not exists [#2446](https://github.com/AlchemyCMS/alchemy_cms/pull/2446) ([tvdeyen](https://github.com/tvdeyen))
|
data/Gemfile
CHANGED
@@ -19,6 +19,7 @@ group :development, :test do
|
|
19
19
|
# in our case the culprit is `handlebars-assets`. The changes between 2.7.0 and 2.8.0 are
|
20
20
|
# minimal, but breaking.
|
21
21
|
gem "execjs", "= 2.8.1"
|
22
|
+
gem "selenium-webdriver", "< 4.9.1" # until https://github.com/teamcapybara/capybara/pull/2665 got merged
|
22
23
|
|
23
24
|
if ENV["GITHUB_ACTIONS"]
|
24
25
|
# Necessary because GH Actions gem cache does not have this "Bundled with Ruby" gem installed
|
@@ -104,14 +104,7 @@ module Alchemy
|
|
104
104
|
# If no index page and no admin users are present we show the "Welcome to Alchemy" page.
|
105
105
|
#
|
106
106
|
def load_index_page
|
107
|
-
@page ||=
|
108
|
-
Alchemy::Page.
|
109
|
-
contentpages.
|
110
|
-
language_roots.
|
111
|
-
where(language: Language.current).
|
112
|
-
includes(page_includes).
|
113
|
-
first
|
114
|
-
end
|
107
|
+
@page ||= Language.current_root_page
|
115
108
|
render template: "alchemy/welcome", layout: false if signup_required?
|
116
109
|
end
|
117
110
|
|
@@ -127,13 +120,10 @@ module Alchemy
|
|
127
120
|
def load_page
|
128
121
|
page_not_found! unless Language.current
|
129
122
|
|
130
|
-
@page ||=
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
includes(page_includes).
|
135
|
-
find_by(urlname: params[:urlname])
|
136
|
-
end
|
123
|
+
@page ||= Language.current.pages.contentpages.find_by(
|
124
|
+
urlname: params[:urlname],
|
125
|
+
language_code: params[:locale] || Language.current.code,
|
126
|
+
)
|
137
127
|
end
|
138
128
|
|
139
129
|
def enforce_locale
|
@@ -244,9 +234,5 @@ module Alchemy
|
|
244
234
|
def page_not_found!
|
245
235
|
not_found_error!("Alchemy::Page not found \"#{request.fullpath}\"")
|
246
236
|
end
|
247
|
-
|
248
|
-
def page_includes
|
249
|
-
Alchemy::EagerLoading.page_includes(version: :public_version)
|
250
|
-
end
|
251
237
|
end
|
252
238
|
end
|
@@ -21,6 +21,7 @@
|
|
21
21
|
#
|
22
22
|
|
23
23
|
require_dependency "alchemy/element/definitions"
|
24
|
+
require_dependency "alchemy/element/dom_id"
|
24
25
|
require_dependency "alchemy/element/element_contents"
|
25
26
|
require_dependency "alchemy/element/element_ingredients"
|
26
27
|
require_dependency "alchemy/element/element_essences"
|
@@ -136,14 +136,15 @@ module Alchemy
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def alchemy_resource_filters
|
139
|
+
@_file_formats ||= distinct.pluck(:image_file_format).compact.presence || []
|
139
140
|
[
|
140
141
|
{
|
141
142
|
name: :by_file_format,
|
142
|
-
values:
|
143
|
+
values: @_file_formats,
|
143
144
|
},
|
144
145
|
{
|
145
146
|
name: :misc,
|
146
|
-
values: %w(recent last_upload without_tag),
|
147
|
+
values: %w(recent last_upload without_tag deletable),
|
147
148
|
},
|
148
149
|
]
|
149
150
|
end
|
@@ -128,6 +128,7 @@ en:
|
|
128
128
|
last_upload: Last upload only
|
129
129
|
recent: Recently uploaded only
|
130
130
|
without_tag: Without tag
|
131
|
+
deletable: Not linked by file content
|
131
132
|
attachment:
|
132
133
|
by_file_type:
|
133
134
|
name: File Type
|
@@ -139,7 +140,6 @@ en:
|
|
139
140
|
last_upload: Last upload only
|
140
141
|
recent: Recently uploaded only
|
141
142
|
without_tag: Without tag
|
142
|
-
deletable: Not linked by file content
|
143
143
|
|
144
144
|
# === Translations for content validations
|
145
145
|
# Used when a user did not enter (correct) values to the content field.
|
data/lib/alchemy/seeder.rb
CHANGED
@@ -82,7 +82,11 @@ module Alchemy
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def page_yml
|
85
|
-
@_page_yml ||= YAML.
|
85
|
+
@_page_yml ||= YAML.safe_load(
|
86
|
+
page_seeds_file.read,
|
87
|
+
permitted_classes: [Date],
|
88
|
+
aliases: true
|
89
|
+
)
|
86
90
|
end
|
87
91
|
|
88
92
|
def contentpages
|
@@ -99,7 +103,9 @@ module Alchemy
|
|
99
103
|
|
100
104
|
def create_page(draft, attributes = {})
|
101
105
|
children = draft.delete("children") || []
|
102
|
-
page = Alchemy::Page.
|
106
|
+
page = Alchemy::Page.new(draft.merge(attributes))
|
107
|
+
page.versions.build
|
108
|
+
page.save!
|
103
109
|
log "Created page: #{page.name}"
|
104
110
|
children.each do |child|
|
105
111
|
create_page(child, parent: page, language: page.language)
|
data/lib/alchemy/version.rb
CHANGED
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.1.
|
4
|
+
version: 6.1.5
|
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: 2023-
|
16
|
+
date: 2023-05-26 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|
@@ -1525,7 +1525,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1525
1525
|
version: '0'
|
1526
1526
|
requirements:
|
1527
1527
|
- ImageMagick (libmagick), v6.6 or greater.
|
1528
|
-
rubygems_version: 3.4.
|
1528
|
+
rubygems_version: 3.4.12
|
1529
1529
|
signing_key:
|
1530
1530
|
specification_version: 4
|
1531
1531
|
summary: A powerful, userfriendly and flexible CMS for Rails
|