alchemy_cms 4.2.2 → 4.2.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: d15084caa39f27fd7e147a1b8a084703ac45296d8a07eb4beff76b112eefdb0e
4
- data.tar.gz: aa0a0ce5aefb6e4ec8f515ce32dfc4318aa0c4fd0890dcf645e20e848f8a47cb
3
+ metadata.gz: c432458d9763ad886862db55c182c64fe8bde3de0bbd9b2a6b728d45a7ead252
4
+ data.tar.gz: 5b289bfc7967bf6e50d1679a04f56ac3fdab06dde5b3523946ca577a385ceab6
5
5
  SHA512:
6
- metadata.gz: 838e6dabcd215deca170a9a521bd65e409edfe450486c675234c42b49de5303fcdbfb16b842a1fab81e3dd322efcb25176e7f52f6e1b81baa4f910ab873fc02d
7
- data.tar.gz: 6e0e0db13cc814a9956402df065b513858d94e46677ccbe37435b69dd522d096137416d3c75692e990b412d35a01ddb9f95d5aa0a6763c21080a2b3e5509c34f
6
+ metadata.gz: d471ab3d97eed4b8cebcd45b082804de6be2b395b14ce922bebfa948081b6ba48a0c0ef671ce6dd37c39bdd758b1c40384d19255231f5934d2acd657428d9924
7
+ data.tar.gz: 511ffd24ca7857708b3b4a624f1a24fa72d4a053889c37221a0be3464cfc5d60fd7a75e9204c56c8880ddf3f69021e2e7dea1bb4f351d24059855e957eefd6ed
@@ -1,3 +1,10 @@
1
+ ## 4.2.3 (2019-09-27)
2
+
3
+ - Fix Cell Migration to maintain positions [#1625](https://github.com/AlchemyCMS/alchemy_cms/pull/1625) ([mamhoff](https://github.com/mamhoff))
4
+ - Cell Upgrader: Match quotation marks in cell name string [#1624](https://github.com/AlchemyCMS/alchemy_cms/pull/1624) ([mamhoff](https://github.com/mamhoff))
5
+ - Cell Migrator: Maintain element order in fixed elements [#1623](https://github.com/AlchemyCMS/alchemy_cms/pull/1623) ([mamhoff](https://github.com/mamhoff))
6
+ - Enhance cells upgrader to deal with render_elements from_page: x [#1622](https://github.com/AlchemyCMS/alchemy_cms/pull/1622) ([mamhoff](https://github.com/mamhoff))
7
+
1
8
  ## 4.2.2 (2019-08-13)
2
9
 
3
10
  - Fallback to default locale if unavailable locale requested [#1610](https://github.com/AlchemyCMS/alchemy_cms/pull/1610) ([mamhoff](https://github.com/mamhoff))
@@ -27,11 +27,13 @@ module Alchemy::Upgrader::Tasks
27
27
  # bust element definitions insta cache
28
28
  Alchemy::Element.instance_variable_set('@definitions', nil)
29
29
  fixed_element = Alchemy::Element.find_or_initialize_by(fixed: true, name: cell.name, page: cell.page)
30
- elements = Alchemy::Element.where(cell_id: cell.id)
30
+ elements = Alchemy::Element.where(cell_id: cell.id).order(position: :asc)
31
31
 
32
32
  if fixed_element.new_record?
33
- fixed_element.nested_elements = elements
34
33
  fixed_element.save!
34
+ Alchemy::Element.acts_as_list_no_update do
35
+ elements.update_all(parent_element_id: fixed_element.id)
36
+ end
35
37
  puts "Created new fixed element '#{fixed_element.name}' for cell '#{cell.name}'."
36
38
  else
37
39
  puts "Element for cell '#{cell.name}' already present. Skip"
@@ -129,6 +129,7 @@ module Alchemy::Upgrader::Tasks
129
129
  Dir.glob("#{alchemy_views_folder}/**/*").each do |view|
130
130
  next if File.directory?(view)
131
131
  gsub_file(view, /render_cell[\(\s]?([:'"]?[a-z_]+['"]?)\)?/, 'render_elements(only: \1, fixed: true)')
132
+ gsub_file(view, /render_elements[\(\s](.*):?from_cell:?\s?(=>)?\s?(['"][a-z_]+['"])\)?/, 'render_elements(\1only: \3, fixed: true)')
132
133
  end
133
134
  end
134
135
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "4.2.2"
4
+ VERSION = "4.2.3"
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: 4.2.2
4
+ version: 4.2.3
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: 2019-08-13 00:00:00.000000000 Z
16
+ date: 2019-09-27 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: active_model_serializers