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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d09503d403038880c93066f8ff4606496ab8023f406c2fdb7fd36dd62749b3d4
4
- data.tar.gz: 97518f445dadcb7fe00626ba6cd5aa78c9e04ef596abdf7229828ebf6dd9644b
3
+ metadata.gz: 35defab4a613fba87ec24e3ba3e9b6f6a9a079282703618c670f0ef3398caf38
4
+ data.tar.gz: 7e4b5c160ecfac06634f9720e4927d70e0517c9b2affa23efd14167c975b8433
5
5
  SHA512:
6
- metadata.gz: 8030842fd29540fa6a7e20e5ad4b5866cb5b8d214911e11a8370c37ae71542c81f65173addcde23ffd3e7c7c01c8f77c15f3934c555c49f03d5b37da7384fd46
7
- data.tar.gz: 200eb39b0a8b6517896e0b799053a1e1d179dab67933b991ac3508370e7e664c7b0eba8bcfc6dbabdaaab4301ba3f6b6e28d84aa34dcdefbf3e9e2513fe8c32b
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))
@@ -131,21 +131,23 @@ module Alchemy
131
131
  end
132
132
 
133
133
  def namespaced_resource_name
134
- @_namespaced_resource_name ||= namespaced_resources_name.singularize
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "4.6.2"
4
+ VERSION = "4.6.3"
5
5
 
6
6
  def self.version
7
7
  VERSION
@@ -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
- locale = language.locale.presence || I18n.default_locale
86
- menu_name = I18n.t('Main Navigation', scope: 'alchemy.menu_names', default: 'Main Navigation', locale: locale)
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.2
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: 2020-09-07 00:00:00.000000000 Z
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.0.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
- ...