alchemy_cms 4.0.0.rc1 → 4.0.0.rc2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8546e849610240faac00b1a77f937ea2514d97a0
4
- data.tar.gz: e81fd54feadee4000618c71b6a3a424695647dc8
3
+ metadata.gz: 2602c152298a64524d0219dae9612ddd13bb7909
4
+ data.tar.gz: ff1579cc4c0db34cfa5d1620426bba1622a72739
5
5
  SHA512:
6
- metadata.gz: 350b2a2ba22bec1183a4fd76d25d4de7f2e6e564d0cc51a7eb064a5e3f5c572406294e858e5010838760228024623aee4a662dc7778514a49c5c127d050a7637
7
- data.tar.gz: 92088cb21c0643a53d87115521ca377d8dd2993dcf25737828fda5397111da952eb5804d9bcd6786973f0be4613058ead98c6cd145b3ff91224d3caeee049d9e
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.rc1 (2017-0817)
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 'magiclabs-userstamp', ['~> 3.0']
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(params[:message])
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
- if Alchemy::Config.get(:redirect_index)
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)
@@ -4,7 +4,6 @@ module Alchemy
4
4
  module PagesHelper
5
5
  include Alchemy::BaseHelper
6
6
  include Alchemy::ElementsHelper
7
- include Alchemy::DeprecatedPagesHelper
8
7
 
9
8
  def picture_essence_caption(content)
10
9
  content.try(:essence).try(:caption)
@@ -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
- if definition['take_me_for_preview']
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.
@@ -3,7 +3,7 @@
3
3
  module Alchemy
4
4
  class ElementToPage
5
5
  def self.table_name
6
- [Element.table_name, Page.table_name].join('_')
6
+ [Alchemy::Element.table_name, Alchemy::Page.table_name].join('_')
7
7
  end
8
8
  end
9
9
  end
@@ -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:
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "4.0.0.rc1"
4
+ VERSION = "4.0.0.rc2"
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.0.0.rc1
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-17 00:00:00.000000000 Z
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: magiclabs-userstamp
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