alchemy_cms 7.0.6 → 7.0.8

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.

Potentially problematic release.


This version of alchemy_cms might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c585dd53e50006dabd57cbac098ba15c8acc5dc0ea9dd18a432df5feeca4dc89
4
- data.tar.gz: 19518e22d715dfc11dbc46dfbd72245bd8a88156360bb8702e345bdc5d52ff7f
3
+ metadata.gz: 4e20dfb7c8a1477928f962a4494fb7f3856a84a718a90474d21604617cfa6999
4
+ data.tar.gz: d4f9e69df4d2ce7916a778e16102eb235c1d92b51a617df339ed33afb45e4cf0
5
5
  SHA512:
6
- metadata.gz: d721b898bf3a4c76daf7ec9a925d76d9782252751355b797922fc5c0d2a3a95e97e1e05a5f9fe6b01f670d2453c7b63bcdc54d64f0c845c0145817fc517fd577
7
- data.tar.gz: 4867e081525cc3ff481dcadb7d5625a3ddaade4e030ed46522ddd0d8d71c65c55a403d9599a7b4adbef3027e06947bcbfd6386aee4470669bc1e13650d671d74
6
+ metadata.gz: 8cbafabbd80e853cf661a7ec3b88777c21d4a445ccd6076683780cc0da0c7164b7747a9504ceebf44bd35207dc969d302d158680c6feffe78da34118c12351de
7
+ data.tar.gz: ebcdcd1bc921de896168dd5acc71f87f6f3a05c28fea381da3fad15e0245400c61956c1062b2a89444a333e458f5db196fdc97f6d252f0ef1f7152105de50e9a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.0.8 (2023-12-28)
4
+
5
+ - [7.0-stable] Merge pull request #2658 from tvdeyen/fix-contactform-mailer [#2660](https://github.com/AlchemyCMS/alchemy_cms/pull/2660) ([alchemycms-bot](https://github.com/alchemycms-bot))
6
+ - [7.0] Fix humanization for add nested element button [#2659](https://github.com/AlchemyCMS/alchemy_cms/pull/2659) ([tvdeyen](https://github.com/tvdeyen))
7
+
8
+ ## 7.0.7 (2023-11-28)
9
+
10
+ - [7.0] Disable Turbolinks on menubar [#2622](https://github.com/AlchemyCMS/alchemy_cms/pull/2622) ([tvdeyen](https://github.com/tvdeyen))
11
+ - [7.0-stable] Merge pull request #2617 from kennyadsl/patch-1 [#2618](https://github.com/AlchemyCMS/alchemy_cms/pull/2618) ([alchemycms-bot](https://github.com/alchemycms-bot))
12
+
3
13
  ## 7.0.6 (2023-11-15)
4
14
 
5
15
  - [7.0-stable] Merge pull request #2612 from sascha-karnatz/harden-page-publisher [#2613](https://github.com/AlchemyCMS/alchemy_cms/pull/2613) ([alchemycms-bot](https://github.com/alchemycms-bot))
@@ -34,16 +34,16 @@ module Alchemy
34
34
  respond_to do |format|
35
35
  format.html do
36
36
  items = items.page(params[:page] || 1).per(items_per_page)
37
- instance_variable_set("@#{resource_handler.resources_name}", items)
37
+ instance_variable_set(:"@#{resource_handler.resources_name}", items)
38
38
  end
39
39
  format.csv do
40
- instance_variable_set("@#{resource_handler.resources_name}", items)
40
+ instance_variable_set(:"@#{resource_handler.resources_name}", items)
41
41
  end
42
42
  end
43
43
  end
44
44
 
45
45
  def new
46
- instance_variable_set("@#{resource_handler.resource_name}", resource_handler.model.new)
46
+ instance_variable_set(:"@#{resource_handler.resource_name}", resource_handler.model.new)
47
47
  end
48
48
 
49
49
  def show
@@ -54,7 +54,7 @@ module Alchemy
54
54
  end
55
55
 
56
56
  def create
57
- instance_variable_set("@#{resource_handler.resource_name}", resource_handler.model.new(resource_params))
57
+ instance_variable_set(:"@#{resource_handler.resource_name}", resource_handler.model.new(resource_params))
58
58
  resource_instance_variable.save
59
59
  render_errors_or_redirect(
60
60
  resource_instance_variable,
@@ -169,7 +169,7 @@ module Alchemy
169
169
  end
170
170
 
171
171
  def load_resource
172
- instance_variable_set("@#{resource_handler.resource_name}", resource_handler.model.find(params[:id]))
172
+ instance_variable_set(:"@#{resource_handler.resource_name}", resource_handler.model.find(params[:id]))
173
173
  end
174
174
 
175
175
  def authorize_resource
@@ -77,15 +77,15 @@ module Alchemy
77
77
  end
78
78
 
79
79
  def mail_to
80
- @element.ingredient(:mail_to) || mailer_config["mail_to"]
80
+ @element.value_for(:mail_to) || mailer_config["mail_to"]
81
81
  end
82
82
 
83
83
  def mail_from
84
- @element.ingredient(:mail_from) || mailer_config["mail_from"]
84
+ @element.value_for(:mail_from) || mailer_config["mail_from"]
85
85
  end
86
86
 
87
87
  def subject
88
- @element.ingredient(:subject) || mailer_config["subject"]
88
+ @element.value_for(:subject) || mailer_config["subject"]
89
89
  end
90
90
 
91
91
  def redirect_to_success_page
@@ -104,7 +104,7 @@ module Alchemy
104
104
  end
105
105
 
106
106
  def success_page
107
- @_success_page ||= @element.ingredient(:success_page)
107
+ @_success_page ||= @element.value_for(:success_page)
108
108
  end
109
109
 
110
110
  def success_page_urlname
@@ -158,8 +158,8 @@ module Alchemy
158
158
  "#{name}.#{role}.#{error}",
159
159
  scope: "ingredient_validations",
160
160
  default: [
161
- "fields.#{role}.#{error}".to_sym,
162
- "errors.#{error}".to_sym
161
+ :"fields.#{role}.#{error}",
162
+ :"errors.#{error}"
163
163
  ],
164
164
  field: Alchemy::Ingredient.translated_label_for(role, name)
165
165
  )
@@ -45,14 +45,14 @@ module Alchemy
45
45
  # @param [String] The class name of the related object
46
46
  def related_object_alias(name, class_name:)
47
47
  alias_method name, :related_object
48
- alias_method "#{name}=", :related_object=
48
+ alias_method :"#{name}=", :related_object=
49
49
 
50
50
  # Somehow Rails STI does not allow us to use `alias_method` for the related_object_id
51
- define_method "#{name}_id" do
51
+ define_method :"#{name}_id" do
52
52
  related_object_id
53
53
  end
54
54
 
55
- define_method "#{name}_id=" do |id|
55
+ define_method :"#{name}_id=" do |id|
56
56
  self.related_object_id = id
57
57
  self.related_object_type = class_name
58
58
  end
@@ -51,10 +51,10 @@ module Alchemy
51
51
  validations.each do |validation|
52
52
  if validation.respond_to?(:keys)
53
53
  validation.map do |key, value|
54
- send("validate_#{key}", value)
54
+ send(:"validate_#{key}", value)
55
55
  end
56
56
  else
57
- send("validate_#{validation}")
57
+ send(:"validate_#{validation}")
58
58
  end
59
59
  end
60
60
  end
@@ -581,7 +581,7 @@ module Alchemy
581
581
 
582
582
  def set_fixed_attributes
583
583
  fixed_attributes.all.each do |attribute, value|
584
- send("#{attribute}=", value)
584
+ send(:"#{attribute}=", value)
585
585
  end
586
586
  end
587
587
 
@@ -168,7 +168,7 @@ module Alchemy
168
168
  def fix_crop_values
169
169
  %i[crop_from crop_size].each do |crop_value|
170
170
  if public_send(crop_value).is_a?(String)
171
- public_send("#{crop_value}=", normalize_crop_value(crop_value))
171
+ public_send(:"#{crop_value}=", normalize_crop_value(crop_value))
172
172
  end
173
173
  end
174
174
  end
@@ -1,5 +1,5 @@
1
1
  <% if !@preview_mode && @page && can?(:edit_content, @page) %>
2
- <div id="alchemy_menubar" style="display: none" data-turbo="false">
2
+ <div id="alchemy_menubar" style="display: none" data-turbo="false" data-turbolinks="false">
3
3
  <ul>
4
4
  <li><%= link_to Alchemy.t(:to_alchemy), alchemy.admin_dashboard_url %></li>
5
5
  <li><%= link_to Alchemy.t(:edit_page), alchemy.edit_admin_page_url(@page) %></li>
@@ -1,7 +1,7 @@
1
1
  <%= content_tag :div, class: 'add-nested-element', data: { element_id: element.id } do %>
2
2
  <% if element.expanded? || element.fixed? %>
3
- <% if element.nestable_elements.length == 1 &&
4
- (nestable_element = element.nestable_elements.first) &&
3
+ <% if element.nestable_elements.length == 1 &&
4
+ (nestable_element = element.nestable_elements.first) &&
5
5
  Alchemy::Element.all_from_clipboard_for_parent_element(get_clipboard("elements"), element).none?
6
6
  %>
7
7
  <%= form_for [:admin, Alchemy::Element.new(name: nestable_element)],
@@ -10,11 +10,11 @@
10
10
  <%= f.hidden_field :page_version_id, value: element.page_version_id %>
11
11
  <%= f.hidden_field :parent_element_id, value: element.id %>
12
12
  <button class="button add-nestable-element-button" data-alchemy-button>
13
- <%= Alchemy.t(:add_nested_element, name: Alchemy.t(nestable_element, scope: 'element_names')) %>
13
+ <%= Alchemy.t(:add_nested_element, name: Alchemy.t(nestable_element.to_sym, scope: 'element_names')) %>
14
14
  </button>
15
15
  <% end %>
16
16
  <% else %>
17
- <%= link_to_dialog (nestable_element ? Alchemy.t(:add_nested_element, name: Alchemy.t(nestable_element, scope: 'element_names')) : Alchemy.t("New Element")),
17
+ <%= link_to_dialog (nestable_element ? Alchemy.t(:add_nested_element, name: Alchemy.t(nestable_element.to_sym, scope: 'element_names')) : Alchemy.t("New Element")),
18
18
  alchemy.new_admin_element_path(
19
19
  parent_element_id: element.id,
20
20
  page_version_id: element.page_version_id
@@ -24,4 +24,4 @@
24
24
  }, class: "button add-nestable-element-button" %>
25
25
  <% end %>
26
26
  <% end %>
27
- <% end %>
27
+ <% end %>
@@ -108,7 +108,7 @@ module Alchemy
108
108
  def initialize(controller_path, module_definition = nil, custom_model = nil)
109
109
  @controller_path = controller_path
110
110
  @module_definition = module_definition
111
- @model = (custom_model || guess_model_from_controller_path)
111
+ @model = custom_model || guess_model_from_controller_path
112
112
  if model.respond_to?(:alchemy_resource_relations)
113
113
  if !model.respond_to?(:reflect_on_all_associations)
114
114
  raise MissingActiveRecordAssociation
@@ -320,7 +320,7 @@ module Alchemy
320
320
  model.alchemy_resource_relations.each do |name, options|
321
321
  relation_name = name.to_s.gsub(/_id$/, "") # ensure that we don't have an id
322
322
  association = association_from_relation_name(relation_name)
323
- foreign_key = association.options[:foreign_key] || "#{association.name}_id".to_sym
323
+ foreign_key = association.options[:foreign_key] || :"#{association.name}_id"
324
324
  collection = options[:collection] || resource_relation_class(association).all
325
325
  resource_relations[foreign_key] = options.merge(
326
326
  model_association: association,
@@ -14,11 +14,11 @@ module Alchemy
14
14
  end
15
15
 
16
16
  def resource_instance_variable
17
- instance_variable_get("@#{resource_handler.resource_name}")
17
+ instance_variable_get(:"@#{resource_handler.resource_name}")
18
18
  end
19
19
 
20
20
  def resources_instance_variable
21
- instance_variable_get("@#{resource_handler.resources_name}")
21
+ instance_variable_get(:"@#{resource_handler.resources_name}")
22
22
  end
23
23
 
24
24
  def resource_url_proxy
@@ -46,7 +46,7 @@ module Alchemy
46
46
  end
47
47
 
48
48
  def edit_resource_path(resource = nil, options = {})
49
- path_segments = (resource_scope + [resource] || resource_handler.resource_array)
49
+ path_segments = resource_scope + [resource] || resource_handler.resource_array
50
50
  edit_polymorphic_path path_segments, options
51
51
  end
52
52
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.0.6"
4
+ VERSION = "7.0.8"
5
5
 
6
6
  def self.version
7
7
  VERSION
@@ -114,7 +114,6 @@ module Alchemy
114
114
  rake("alchemy:install:migrations", abort_on_failure: true)
115
115
  rake("db:migrate", abort_on_failure: true)
116
116
  install_tasks.inject_seeder
117
- rake("db:seed", abort_on_failure: true)
118
117
  end
119
118
 
120
119
  def finalize
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.0.6
4
+ version: 7.0.8
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-11-15 00:00:00.000000000 Z
16
+ date: 2023-12-28 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer
@@ -1449,7 +1449,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1449
1449
  version: '0'
1450
1450
  requirements:
1451
1451
  - ImageMagick (libmagick), v6.6 or greater.
1452
- rubygems_version: 3.4.17
1452
+ rubygems_version: 3.5.3
1453
1453
  signing_key:
1454
1454
  specification_version: 4
1455
1455
  summary: A powerful, userfriendly and flexible CMS for Rails