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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2114b22cab5252062e853e2b3ea4e2d30ca37f10d1cc49a321644495af52ac3d
4
- data.tar.gz: 58ece5a7be8ea335944ac21c4004bcd917b88860bef2337fbbe6fa705242651d
3
+ metadata.gz: e9bfd92678d3b4ae867e8c3938a0277d7698fb6fbcfb80a0210f0c4371990486
4
+ data.tar.gz: ce854781846eadaecdbe717ab435a38d357cda54863707b2c62a61cf4730884b
5
5
  SHA512:
6
- metadata.gz: 5c604a56a67a92d16c53e10bd4264394a81a7f6c57fb2fec160ff27f4c70711b4231f7347bf977e2556da43761b3e81a32b2ab090cd9c48d7be0624024fd267a
7
- data.tar.gz: 07b5bde2ada318c77aa0b20d89e96b128da675f07d779c44c28d8dfebc292f7cde24971606958ae3fa3e9d7a9f248358097284efda5f65a6fc5af84107276c00
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
- if block_given?
91
- elements.map.with_index(&blk)
92
- else
93
- elements.map.with_index(&default_rendering)
94
- end.join(options[:separator]).html_safe
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 Alchemy::Content::Factory
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 key that's taken for cache path.
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 cache_key
112
+ def cache_version
113
113
  if Page.current_preview == id
114
- "alchemy/pages/#{id}-#{updated_at}"
114
+ updated_at.to_s
115
115
  else
116
- "alchemy/pages/#{id}-#{published_at}"
116
+ published_at.to_s
117
117
  end
118
118
  end
119
119
 
@@ -122,6 +122,10 @@ module Alchemy
122
122
  )
123
123
  SQL
124
124
  end
125
+
126
+ def ransackable_scopes(_auth_object)
127
+ [:published, :from_current_site, :searchables, :layoutpages]
128
+ end
125
129
  end
126
130
  end
127
131
  end
@@ -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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "6.0.3"
4
+ VERSION = "6.0.4"
5
5
 
6
6
  def self.version
7
7
  VERSION
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alchemy_cms/admin",
3
- "version": "6.0.3",
3
+ "version": "6.0.4",
4
4
  "description": "AlchemyCMS",
5
5
  "browser": "package/admin.js",
6
6
  "files": [
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.3
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-02 00:00:00.000000000 Z
16
+ date: 2022-05-06 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer