alchemy_cms 4.0.0.rc1 → 4.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/alchemy_cms.gemspec +1 -1
- data/app/controllers/alchemy/base_controller.rb +0 -6
- data/app/controllers/alchemy/messages_controller.rb +5 -1
- data/app/controllers/alchemy/pages_controller.rb +1 -7
- data/app/helpers/alchemy/base_helper.rb +0 -5
- data/app/helpers/alchemy/pages_helper.rb +0 -1
- data/app/helpers/alchemy/url_helper.rb +0 -30
- data/app/models/alchemy/content.rb +1 -4
- data/app/models/alchemy/element_to_page.rb +1 -1
- data/app/models/alchemy/essence_picture_view.rb +0 -7
- data/lib/alchemy/i18n.rb +0 -5
- data/lib/alchemy/version.rb +1 -1
- metadata +3 -4
- data/app/helpers/alchemy/deprecated_pages_helper.rb +0 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2602c152298a64524d0219dae9612ddd13bb7909
|
4
|
+
data.tar.gz: ff1579cc4c0db34cfa5d1620426bba1622a72739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 475e535fdb68297c36fe5fa013ede09be2555d03fbc58bdff079d9978f79b6d8ce4c3ec23c4b063e563d647c028eb3762d16a564831c09a8dc2b97c40f2d64b7
|
7
|
+
data.tar.gz: c86d7978a829bef8c50446e5df3c7fa1e5abcfb7e1d52479603a66d780c27359349b5654ee1cef201ebee8b0b6dafe576427db9a6a1907d7888d2c6277116165
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## 4.0.0.
|
3
|
+
## 4.0.0.rc2 (2017-08-18)
|
4
|
+
|
5
|
+
* Removed deprecated `:image_size` option from `EssencePicture`
|
6
|
+
Use `:size` instead.
|
7
|
+
* Remove deprecated `take_me_for_preview` content definition option
|
8
|
+
Use `as_element_title` instead.
|
9
|
+
* Removed deprecated picture url helpers `show_alchemy_picture_path` and `show_alchemy_picture_url`
|
10
|
+
Use `picture.url` instead.
|
11
|
+
* Removed deprecated pages helper module.
|
12
|
+
* Removed deprecated translation methods `_t` and `Alchemy::I18n.t`.
|
13
|
+
Use `Alchemy.t` instead.
|
14
|
+
* Removed deprecated `redirect_index` configuration
|
15
|
+
Use `redirect_to_public_child` configuration instead.
|
16
|
+
|
17
|
+
## 4.0.0.rc1 (2017-08-17)
|
4
18
|
|
5
19
|
* Removed `merge_params` from `Alchemy::Admin::BaseHelper`
|
6
20
|
Use `ActionController::Parameters#merge` instead
|
data/alchemy_cms.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |gem|
|
|
31
31
|
gem.add_runtime_dependency 'jquery-rails', ['~> 4.0']
|
32
32
|
gem.add_runtime_dependency 'jquery-ui-rails', ['~> 5.0.0']
|
33
33
|
gem.add_runtime_dependency 'kaminari', ['~> 0.15']
|
34
|
-
gem.add_runtime_dependency '
|
34
|
+
gem.add_runtime_dependency 'originator', ['~> 3.0']
|
35
35
|
gem.add_runtime_dependency 'non-stupid-digest-assets', ['~> 1.0.8']
|
36
36
|
gem.add_runtime_dependency 'rails', ['~> 5.0.0']
|
37
37
|
gem.add_runtime_dependency 'ransack', ['~> 1.4']
|
@@ -33,12 +33,6 @@ module Alchemy
|
|
33
33
|
raise ActionController::RoutingError, msg
|
34
34
|
end
|
35
35
|
|
36
|
-
# Shortcut for Alchemy::I18n.translate method
|
37
|
-
def _t(key, *args)
|
38
|
-
ActiveSupport::Deprecation.warn("Alchemys `_t` method is deprecated! Use `Alchemy.t` instead.", caller.unshift)
|
39
|
-
Alchemy.t(key, *args)
|
40
|
-
end
|
41
|
-
|
42
36
|
# Store current request path into session,
|
43
37
|
# so we can later redirect to it.
|
44
38
|
def store_location
|
@@ -61,7 +61,7 @@ module Alchemy
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def create #:nodoc:
|
64
|
-
@message = Message.new(
|
64
|
+
@message = Message.new(message_params)
|
65
65
|
@message.ip = request.remote_ip
|
66
66
|
@element = Element.find_by(id: @message.contact_form_id)
|
67
67
|
if @element.nil?
|
@@ -117,5 +117,9 @@ module Alchemy
|
|
117
117
|
end
|
118
118
|
@root_page = @page.get_language_root
|
119
119
|
end
|
120
|
+
|
121
|
+
def message_params
|
122
|
+
params.require(:message).permit(*mailer_config['fields'])
|
123
|
+
end
|
120
124
|
end
|
121
125
|
end
|
@@ -51,13 +51,7 @@ module Alchemy
|
|
51
51
|
# If no public page can be found it renders a 404 error.
|
52
52
|
#
|
53
53
|
def index
|
54
|
-
|
55
|
-
ActiveSupport::Deprecation.warn("The configuration option `redirect_index` is deprecated and will be removed with the release of Alchemy v4.0")
|
56
|
-
raise "Remove deprecated `redirect_index` configuration!" if Alchemy.version == "4.0.0.rc1"
|
57
|
-
redirect_permanently_to page_redirect_url
|
58
|
-
else
|
59
|
-
show
|
60
|
-
end
|
54
|
+
show
|
61
55
|
end
|
62
56
|
|
63
57
|
# == The show action gets invoked if one requests '/:urlname' or '/:locale/:urlname'
|
@@ -2,11 +2,6 @@
|
|
2
2
|
|
3
3
|
module Alchemy
|
4
4
|
module BaseHelper
|
5
|
-
def _t(key, *args)
|
6
|
-
ActiveSupport::Deprecation.warn("Alchemys `_t` method is deprecated! Use `Alchemy.t` instead.", caller.unshift)
|
7
|
-
Alchemy.t(key, *args)
|
8
|
-
end
|
9
|
-
|
10
5
|
# An alias for truncate.
|
11
6
|
# Left here for downwards compatibilty.
|
12
7
|
def shorten(text, length)
|
@@ -16,36 +16,6 @@ module Alchemy
|
|
16
16
|
alchemy.show_page_url(show_page_path_params(page, optional_params))
|
17
17
|
end
|
18
18
|
|
19
|
-
# This helper returns a path to picture for use inside a image_tag helper.
|
20
|
-
#
|
21
|
-
# Any additional options are passed to the url_helper, so you can add arguments to your url.
|
22
|
-
#
|
23
|
-
# Example:
|
24
|
-
#
|
25
|
-
# <%= image_tag show_alchemy_picture_path(picture, size: '320x200', format: :png) %>
|
26
|
-
#
|
27
|
-
# @deprecated Use Alchemy::Picture#url instead
|
28
|
-
#
|
29
|
-
def show_alchemy_picture_path(picture, optional_params = {})
|
30
|
-
ActiveSupport::Deprecation.warn("`show_alchemy_picture_path` helper is deprecated and will be removed in Alchemy 4.0. Please use the `picture.url` method instead.")
|
31
|
-
picture.url(optional_params)
|
32
|
-
end
|
33
|
-
|
34
|
-
# This helper returns an url to picture for use inside a image_tag helper.
|
35
|
-
#
|
36
|
-
# Any additional options are passed to the url_helper, so you can add arguments to your url.
|
37
|
-
#
|
38
|
-
# Example:
|
39
|
-
#
|
40
|
-
# <%= image_tag show_alchemy_picture_url(picture, size: '320x200', format: :png) %>
|
41
|
-
#
|
42
|
-
# @deprecated Use Alchemy::Picture#url instead
|
43
|
-
#
|
44
|
-
def show_alchemy_picture_url(picture, optional_params = {})
|
45
|
-
ActiveSupport::Deprecation.warn("`show_alchemy_picture_url` helper is deprecated and will be removed in Alchemy 4.0. Please use the `picture.url` method instead.")
|
46
|
-
picture.url(optional_params)
|
47
|
-
end
|
48
|
-
|
49
19
|
# Returns the correct params-hash for passing to show_page_path
|
50
20
|
def show_page_path_params(page, optional_params = {})
|
51
21
|
raise ArgumentError, 'Page is nil' if page.nil?
|
@@ -219,10 +219,7 @@ module Alchemy
|
|
219
219
|
|
220
220
|
# Returns true if this content should be taken for element preview.
|
221
221
|
def preview_content?
|
222
|
-
|
223
|
-
ActiveSupport::Deprecation.warn("Content definition's `take_me_for_preview` key is deprecated. Please use `as_element_title` instead.")
|
224
|
-
end
|
225
|
-
!!definition['take_me_for_preview'] || !!definition['as_element_title']
|
222
|
+
!!definition['as_element_title']
|
226
223
|
end
|
227
224
|
|
228
225
|
# Proxy method that returns the preview text from essence.
|
@@ -19,13 +19,6 @@ module Alchemy
|
|
19
19
|
def initialize(content, options = {}, html_options = {})
|
20
20
|
@content = content
|
21
21
|
@options = DEFAULT_OPTIONS.merge(content.settings).merge(options)
|
22
|
-
if @options[:image_size].present?
|
23
|
-
ActiveSupport::Deprecation.warn(
|
24
|
-
"Passing `image_size` to EssencePicture is deprecated. Please use `size` instead.",
|
25
|
-
caller.unshift
|
26
|
-
)
|
27
|
-
@options[:size] = @options.delete(:image_size)
|
28
|
-
end
|
29
22
|
@html_options = html_options
|
30
23
|
@essence = content.essence
|
31
24
|
@picture = essence.picture
|
data/lib/alchemy/i18n.rb
CHANGED
@@ -19,11 +19,6 @@ module Alchemy
|
|
19
19
|
|
20
20
|
module I18n
|
21
21
|
class << self
|
22
|
-
def t(msg, *args)
|
23
|
-
ActiveSupport::Deprecation.warn('`Alchemy::I18n.t` is deprecated! Use `Alchemy.t` instead.', caller.unshift)
|
24
|
-
Alchemy::I18n.translate(msg, *args)
|
25
|
-
end
|
26
|
-
|
27
22
|
# Alchemy translation methods
|
28
23
|
#
|
29
24
|
# Instead of having to translate strings and defining a default value:
|
data/lib/alchemy/version.rb
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: 4.0.0.
|
4
|
+
version: 4.0.0.rc2
|
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: 2017-08-
|
16
|
+
date: 2017-08-18 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -198,7 +198,7 @@ dependencies:
|
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '0.15'
|
200
200
|
- !ruby/object:Gem::Dependency
|
201
|
-
name:
|
201
|
+
name: originator
|
202
202
|
requirement: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
204
|
- - "~>"
|
@@ -499,7 +499,6 @@ files:
|
|
499
499
|
- app/helpers/alchemy/admin/pictures_helper.rb
|
500
500
|
- app/helpers/alchemy/admin/tags_helper.rb
|
501
501
|
- app/helpers/alchemy/base_helper.rb
|
502
|
-
- app/helpers/alchemy/deprecated_pages_helper.rb
|
503
502
|
- app/helpers/alchemy/elements_block_helper.rb
|
504
503
|
- app/helpers/alchemy/elements_helper.rb
|
505
504
|
- app/helpers/alchemy/essences_helper.rb
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Alchemy
|
4
|
-
module DeprecatedPagesHelper
|
5
|
-
# All these helper methods are deprecated.
|
6
|
-
# They are mixed into Alchemy::PagesHelper but will be removed in the future.
|
7
|
-
|
8
|
-
def alchemy_preview_mode_code
|
9
|
-
ActiveSupport::Deprecation.warn('PageHelper `alchemy_preview_mode_code` is deprecated and will be removed with Alchemy v4.0. Please use `render "alchemy/preview_mode_code"` in your layout instead.')
|
10
|
-
render "alchemy/preview_mode_code"
|
11
|
-
end
|
12
|
-
|
13
|
-
def render_meta_data(options = {})
|
14
|
-
ActiveSupport::Deprecation.warn('PageHelper `render_meta_data` is deprecated and will be removed with Alchemy v4.0. Please use `render "alchemy/pages/meta_data"` in your view instead.')
|
15
|
-
render "alchemy/pages/meta_data", options
|
16
|
-
end
|
17
|
-
|
18
|
-
def render_page_title(options = {})
|
19
|
-
ActiveSupport::Deprecation.warn('PageHelper `render_page_title` is deprecated and will be removed with Alchemy v4.0. Please use `render "alchemy/pages/meta_data"` in your view instead.')
|
20
|
-
return "" if @page.title.blank?
|
21
|
-
options = {
|
22
|
-
prefix: "",
|
23
|
-
separator: ""
|
24
|
-
}.update(options)
|
25
|
-
title_parts = [options[:prefix]]
|
26
|
-
if response.status == 200
|
27
|
-
title_parts << @page.title
|
28
|
-
else
|
29
|
-
title_parts << response.status
|
30
|
-
end
|
31
|
-
title_parts.join(options[:separator]).html_safe
|
32
|
-
end
|
33
|
-
|
34
|
-
def render_title_tag(options = {})
|
35
|
-
ActiveSupport::Deprecation.warn('PageHelper `render_title_tag` is deprecated and will be removed with Alchemy v4.0. Please use `render "alchemy/pages/meta_data"` in your view instead.')
|
36
|
-
default_options = {
|
37
|
-
prefix: "",
|
38
|
-
separator: ""
|
39
|
-
}
|
40
|
-
options = default_options.merge(options)
|
41
|
-
content_tag(:title, render_page_title(options))
|
42
|
-
end
|
43
|
-
|
44
|
-
def render_meta_tag(options = {})
|
45
|
-
ActiveSupport::Deprecation.warn('PageHelper `render_meta_tag` is deprecated and will be removed with Alchemy v4.0. Please use `tag()` instead. (http://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-tag)')
|
46
|
-
default_options = {
|
47
|
-
name: "",
|
48
|
-
default_language: "de",
|
49
|
-
content: ""
|
50
|
-
}
|
51
|
-
options = default_options.merge(options)
|
52
|
-
lang = (@page.language.blank? ? options[:default_language] : @page.language.code)
|
53
|
-
tag(:meta, name: options[:name], content: options[:content], lang: lang)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|