alchemy_cms 4.6.2 → 4.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/alchemy/resource.rb +6 -4
- data/lib/alchemy/version.rb +1 -1
- data/lib/tasks/alchemy/convert.rake +8 -7
- data/lib/tasks/alchemy/upgrade.rake +5 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35defab4a613fba87ec24e3ba3e9b6f6a9a079282703618c670f0ef3398caf38
|
4
|
+
data.tar.gz: 7e4b5c160ecfac06634f9720e4927d70e0517c9b2affa23efd14167c975b8433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c111055665890647aa60caa158644c1405ba53343f2cc6188b6184746d15353a49124fe49a6d493cfcddce43ab2fe2c433bdfd77b6dbe7fdede4191e96d661f
|
7
|
+
data.tar.gz: 490f3afb8151c0e2e76cc62cc9e7e5bc3c8051b92515ee9c19ed8e757bba235e8b9d675d83c11e1331b3445c61568525a6c1b66e21a8702d8061f41e845db7b4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 4.6.3 (2020-05-06)
|
2
|
+
|
3
|
+
- Use symbols in polymorphic routes for resources [#2087](https://github.com/AlchemyCMS/alchemy_cms/pull/2087) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
- Fix convert:page_trees:to_menus task [#2033](https://github.com/AlchemyCMS/alchemy_cms/pull/2033) ([afdev82](https://github.com/afdev82))
|
5
|
+
- fix 4.6 upgrader tasks [#1995](https://github.com/AlchemyCMS/alchemy_cms/pull/1995) ([afdev82](https://github.com/afdev82))
|
6
|
+
|
1
7
|
## 4.6.2 (2020-09-07)
|
2
8
|
|
3
9
|
- Fix tri-Boolean check in PageNaming Module [#1931](https://github.com/AlchemyCMS/alchemy_cms/pull/1931) ([mamhoff](https://github.com/mamhoff))
|
data/lib/alchemy/resource.rb
CHANGED
@@ -131,21 +131,23 @@ module Alchemy
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def namespaced_resource_name
|
134
|
-
@_namespaced_resource_name ||=
|
134
|
+
@_namespaced_resource_name ||= begin
|
135
|
+
namespaced_resources_name.to_s.singularize
|
136
|
+
end.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes
|
135
137
|
end
|
136
138
|
|
137
139
|
def namespaced_resources_name
|
138
140
|
@_namespaced_resources_name ||= begin
|
139
141
|
resource_name_array = resource_array.dup
|
140
142
|
resource_name_array.delete(engine_name) if in_engine?
|
141
|
-
resource_name_array.join(
|
142
|
-
end
|
143
|
+
resource_name_array.join("_")
|
144
|
+
end.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes
|
143
145
|
end
|
144
146
|
|
145
147
|
def namespace_for_scope
|
146
148
|
namespace_array = namespace_diff
|
147
149
|
namespace_array.delete(engine_name) if in_engine?
|
148
|
-
namespace_array
|
150
|
+
namespace_array.map(&:to_sym) # Rails >= 6.0.3.7 needs symbols in polymorphic routes
|
149
151
|
end
|
150
152
|
|
151
153
|
# Returns an array of underscored association names
|
data/lib/alchemy/version.rb
CHANGED
@@ -60,15 +60,17 @@ namespace :alchemy do
|
|
60
60
|
def convert_to_nodes(children, node:)
|
61
61
|
children.each do |page|
|
62
62
|
has_children = page.children.any?
|
63
|
-
next unless page.visible || has_children
|
64
63
|
|
65
64
|
Alchemy::Deprecation.silence do
|
65
|
+
next unless page.visible || has_children
|
66
|
+
|
66
67
|
new_node = node.children.create!(
|
67
68
|
name: name_for_node(page),
|
68
69
|
page: page_for_node(page),
|
69
|
-
url: page.definition['redirects_to_external'] ? page.urlname : nil,
|
70
|
-
external: page.definition['redirects_to_external'] && Alchemy::Config.get(:open_external_links_in_new_tab),
|
71
|
-
language_id: page.language_id
|
70
|
+
url: !!page.definition['redirects_to_external'] ? page.urlname : nil,
|
71
|
+
external: !!page.definition['redirects_to_external'] && Alchemy::Config.get(:open_external_links_in_new_tab),
|
72
|
+
language_id: page.language_id,
|
73
|
+
site_id: page.language.site_id
|
72
74
|
)
|
73
75
|
print "."
|
74
76
|
if has_children
|
@@ -82,9 +84,8 @@ namespace :alchemy do
|
|
82
84
|
puts "\n- Converting #{menu_count} page #{'tree'.pluralize(menu_count)} into #{'menu'.pluralize(menu_count)}."
|
83
85
|
Alchemy::BaseRecord.transaction do
|
84
86
|
Alchemy::Language.all.each do |language|
|
85
|
-
|
86
|
-
|
87
|
-
root_node = Alchemy::Node.create(language: language, name: menu_name)
|
87
|
+
menu_name = 'main_menu'
|
88
|
+
root_node = Alchemy::Node.create(language: language, name: menu_name, site: language.site, external: false)
|
88
89
|
language.pages.language_roots.each do |root_page|
|
89
90
|
convert_to_nodes(root_page.children, node: root_node)
|
90
91
|
end
|
@@ -143,7 +143,11 @@ namespace :alchemy do
|
|
143
143
|
desc "Upgrade Alchemy to v4.6"
|
144
144
|
task "4.6" => [
|
145
145
|
"alchemy:upgrade:prepare",
|
146
|
-
|
146
|
+
"alchemy:upgrade:4.6:run",
|
147
|
+
"alchemy:upgrade:4.6:todo",
|
148
|
+
] do
|
149
|
+
Alchemy::Upgrader.display_todos
|
150
|
+
end
|
147
151
|
|
148
152
|
namespace "4.6" do
|
149
153
|
task run: []
|
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: 4.6.
|
4
|
+
version: 4.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -10,10 +10,10 @@ authors:
|
|
10
10
|
- Hendrik Mans
|
11
11
|
- Carsten Fregin
|
12
12
|
- Martin Meyerhoff
|
13
|
-
autorequire:
|
13
|
+
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -1244,9 +1244,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1244
1244
|
version: '0'
|
1245
1245
|
requirements:
|
1246
1246
|
- ImageMagick (libmagick), v6.6 or greater.
|
1247
|
-
rubygems_version: 3.
|
1248
|
-
signing_key:
|
1247
|
+
rubygems_version: 3.1.4
|
1248
|
+
signing_key:
|
1249
1249
|
specification_version: 4
|
1250
1250
|
summary: A powerful, userfriendly and flexible CMS for Rails 5
|
1251
1251
|
test_files: []
|
1252
|
-
...
|