alchemy_cms 6.0.3 → 6.0.4
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/app/helpers/alchemy/elements_helper.rb +7 -5
- data/app/models/alchemy/content.rb +3 -1
- data/app/models/alchemy/page/page_natures.rb +5 -5
- data/app/models/alchemy/page/page_scopes.rb +4 -0
- data/config/alchemy/config.yml +1 -1
- data/lib/alchemy/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9bfd92678d3b4ae867e8c3938a0277d7698fb6fbcfb80a0210f0c4371990486
|
4
|
+
data.tar.gz: ce854781846eadaecdbe717ab435a38d357cda54863707b2c62a61cf4730884b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51391e56da530c900189d8c16b756d9084fac351cfc50ebc2ee9b7181d7148c826daf39bdd284100261aa6e4ae5c1a4f28eb266c1a31d9fd1ad31f21e2cda398
|
7
|
+
data.tar.gz: 244eb43ca4783a572c5885c69571264a50d4154a5ccfc8b5af806f1343497cc38a8157a1b8c039262d60ea8f4cd6a3a19777943ca9b1c0654a6cd473d3f9f025
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 6.0.4 (2022-05-06)
|
2
|
+
|
3
|
+
- Add support for Rails' recycable cache keys [#2334](https://github.com/AlchemyCMS/alchemy_cms/pull/2334) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
- Make Alchemy::Content::Factory reloadable [#2333](https://github.com/AlchemyCMS/alchemy_cms/pull/2333) ([tvdeyen](https://github.com/tvdeyen))
|
5
|
+
- Wrap the result of rendering into an ActiveSupport::SafeBuffer [#2332](https://github.com/AlchemyCMS/alchemy_cms/pull/2332) ([mamhoff](https://github.com/mamhoff))
|
6
|
+
- Override Alchemy::Page.ransackable_scopes [#2328](https://github.com/AlchemyCMS/alchemy_cms/pull/2328) ([mamhoff](https://github.com/mamhoff))
|
7
|
+
- Default Link Format matcher: Allow tel: protocol [#2327](https://github.com/AlchemyCMS/alchemy_cms/pull/2327) ([mamhoff](https://github.com/mamhoff))
|
8
|
+
|
1
9
|
## 6.0.3 (2022-05-02)
|
2
10
|
|
3
11
|
- Add Support for MariaDB [#2326](https://github.com/AlchemyCMS/alchemy_cms/pull/2326) ([mamhoff](https://github.com/mamhoff))
|
@@ -87,11 +87,13 @@ module Alchemy
|
|
87
87
|
elements = finder.elements(page_version: page_version)
|
88
88
|
|
89
89
|
default_rendering = ->(element, i) { render_element(element, options, i + 1) }
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
90
|
+
capture do
|
91
|
+
if block_given?
|
92
|
+
elements.map.with_index(&blk)
|
93
|
+
else
|
94
|
+
elements.map.with_index(&default_rendering)
|
95
|
+
end.join(options[:separator]).html_safe
|
96
|
+
end
|
95
97
|
end
|
96
98
|
|
97
99
|
# This helper renders a {Alchemy::Element} view partial.
|
@@ -16,13 +16,15 @@
|
|
16
16
|
# updater_id :integer
|
17
17
|
#
|
18
18
|
|
19
|
+
require_dependency "alchemy/content/factory"
|
20
|
+
|
19
21
|
module Alchemy
|
20
22
|
class Content < BaseRecord
|
21
23
|
include Alchemy::Logger
|
22
24
|
include Alchemy::Hints
|
23
25
|
|
24
26
|
# Concerns
|
25
|
-
include
|
27
|
+
include Factory
|
26
28
|
|
27
29
|
belongs_to :essence, polymorphic: true, dependent: :destroy, inverse_of: :content
|
28
30
|
belongs_to :element, touch: true, inverse_of: :contents
|
@@ -103,17 +103,17 @@ module Alchemy
|
|
103
103
|
page_layout.parameterize.underscore
|
104
104
|
end
|
105
105
|
|
106
|
-
# Returns the
|
106
|
+
# Returns the version that's taken for Rails' recycable cache key.
|
107
107
|
#
|
108
108
|
# Uses the +published_at+ value that's updated when the user publishes the page.
|
109
109
|
#
|
110
|
-
# If the page is the current preview it uses the updated_at value as cache key.
|
110
|
+
# If the page is the current preview it uses the +updated_at+ value as cache key.
|
111
111
|
#
|
112
|
-
def
|
112
|
+
def cache_version
|
113
113
|
if Page.current_preview == id
|
114
|
-
|
114
|
+
updated_at.to_s
|
115
115
|
else
|
116
|
-
|
116
|
+
published_at.to_s
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
data/config/alchemy/config.yml
CHANGED
@@ -200,7 +200,7 @@ link_target_options: [blank]
|
|
200
200
|
format_matchers:
|
201
201
|
email: !ruby/regexp '/\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/'
|
202
202
|
url: !ruby/regexp '/\A[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?\z/ix'
|
203
|
-
link_url: !ruby/regexp '/^(mailto:|\/|[a-z]+:\/\/)/'
|
203
|
+
link_url: !ruby/regexp '/^(tel:|mailto:|\/|[a-z]+:\/\/)/'
|
204
204
|
|
205
205
|
# The layout used for rendering the +alchemy/admin/pages#show+ action.
|
206
206
|
admin_page_preview_layout: application
|
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.0.
|
4
|
+
version: 6.0.4
|
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: 2022-05-
|
16
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|