alchemy_cms 5.1.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -1
- data/CHANGELOG.md +51 -0
- data/Gemfile +2 -1
- data/alchemy_cms.gemspec +2 -2
- data/app/assets/stylesheets/alchemy/_variables.scss +2 -0
- data/app/assets/stylesheets/alchemy/elements.scss +38 -5
- data/app/controllers/alchemy/admin/base_controller.rb +1 -0
- data/app/controllers/alchemy/admin/trash_controller.rb +2 -0
- data/app/decorators/alchemy/content_editor.rb +64 -0
- data/app/decorators/alchemy/element_editor.rb +67 -0
- data/app/helpers/alchemy/admin/contents_helper.rb +3 -8
- data/app/helpers/alchemy/elements_helper.rb +0 -18
- data/app/helpers/alchemy/pages_helper.rb +3 -1
- data/app/models/alchemy/attachment.rb +4 -0
- data/app/models/alchemy/content.rb +7 -0
- data/app/models/alchemy/element.rb +38 -0
- data/app/models/alchemy/element/definitions.rb +5 -22
- data/app/models/alchemy/page/page_elements.rb +9 -2
- data/app/models/alchemy/picture_variant.rb +1 -1
- data/app/views/alchemy/admin/elements/_element.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element_footer.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element_header.html.erb +2 -0
- data/app/views/alchemy/admin/elements/_element_toolbar.html.erb +1 -1
- data/config/brakeman.ignore +305 -17
- data/config/locales/alchemy.en.yml +40 -24
- data/lib/alchemy/deprecation.rb +1 -1
- data/lib/alchemy/element_definition.rb +70 -0
- data/lib/alchemy/elements_finder.rb +6 -2
- data/lib/alchemy/essence.rb +4 -4
- data/lib/alchemy/filetypes.rb +13 -0
- data/lib/alchemy/forms/builder.rb +1 -1
- data/lib/alchemy/i18n.rb +4 -5
- data/lib/alchemy/page_layout.rb +1 -0
- data/lib/alchemy/resource.rb +5 -3
- data/lib/alchemy/test_support.rb +18 -0
- data/lib/alchemy/test_support/essence_shared_examples.rb +0 -3
- data/lib/alchemy/test_support/factories.rb +11 -0
- data/lib/alchemy/test_support/factories/attachment_factory.rb +0 -2
- data/lib/alchemy/test_support/factories/content_factory.rb +0 -6
- data/lib/alchemy/test_support/factories/dummy_user_factory.rb +0 -2
- data/lib/alchemy/test_support/factories/element_factory.rb +0 -3
- data/lib/alchemy/test_support/factories/essence_file_factory.rb +0 -3
- data/lib/alchemy/test_support/factories/essence_page_factory.rb +0 -3
- data/lib/alchemy/test_support/factories/essence_picture_factory.rb +0 -4
- data/lib/alchemy/test_support/factories/essence_text_factory.rb +0 -2
- data/lib/alchemy/test_support/factories/language_factory.rb +0 -3
- data/lib/alchemy/test_support/factories/node_factory.rb +0 -4
- data/lib/alchemy/test_support/factories/page_factory.rb +0 -3
- data/lib/alchemy/test_support/factories/picture_factory.rb +0 -2
- data/lib/alchemy/test_support/factories/picture_thumb_factory.rb +0 -3
- data/lib/alchemy/test_support/factories/site_factory.rb +0 -2
- data/lib/alchemy/test_support/integration_helpers.rb +5 -5
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- metadata +8 -6
@@ -1,9 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "factory_bot"
|
4
|
-
require "alchemy/test_support/factories/language_factory"
|
5
|
-
require "alchemy/test_support/factories/page_factory"
|
6
|
-
|
7
3
|
FactoryBot.define do
|
8
4
|
factory :alchemy_node, class: "Alchemy::Node" do
|
9
5
|
language { Alchemy::Language.default || create(:alchemy_language) }
|
@@ -6,16 +6,16 @@ module Alchemy
|
|
6
6
|
# This file is included in spec_helper.rb
|
7
7
|
#
|
8
8
|
module IntegrationHelpers
|
9
|
-
# Used to stub the
|
9
|
+
# Used to stub the current_user in integration specs
|
10
10
|
#
|
11
11
|
# Pass either a user object or a symbol in the format of ':as_admin'.
|
12
|
-
# The browser language is set to english ('en')
|
13
12
|
#
|
14
13
|
def authorize_user(user_or_role = nil)
|
15
|
-
|
16
|
-
|
17
|
-
else
|
14
|
+
case user_or_role
|
15
|
+
when Symbol, String
|
18
16
|
user = build(:alchemy_dummy_user, user_or_role)
|
17
|
+
else
|
18
|
+
user = user_or_role
|
19
19
|
end
|
20
20
|
allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user)
|
21
21
|
end
|
data/lib/alchemy/version.rb
CHANGED
data/lib/alchemy_cms.rb
CHANGED
@@ -35,6 +35,7 @@ require_relative "alchemy/config"
|
|
35
35
|
require_relative "alchemy/configuration_methods"
|
36
36
|
require_relative "alchemy/controller_actions"
|
37
37
|
require_relative "alchemy/deprecation"
|
38
|
+
require_relative "alchemy/element_definition"
|
38
39
|
require_relative "alchemy/elements_finder"
|
39
40
|
require_relative "alchemy/errors"
|
40
41
|
require_relative "alchemy/essence"
|
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: 5.
|
4
|
+
version: 5.2.0
|
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:
|
16
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -276,7 +276,7 @@ dependencies:
|
|
276
276
|
version: '1.8'
|
277
277
|
- - "<"
|
278
278
|
- !ruby/object:Gem::Version
|
279
|
-
version:
|
279
|
+
version: 2.4.2
|
280
280
|
type: :runtime
|
281
281
|
prerelease: false
|
282
282
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -286,7 +286,7 @@ dependencies:
|
|
286
286
|
version: '1.8'
|
287
287
|
- - "<"
|
288
288
|
- !ruby/object:Gem::Version
|
289
|
-
version:
|
289
|
+
version: 2.4.2
|
290
290
|
- !ruby/object:Gem::Dependency
|
291
291
|
name: request_store
|
292
292
|
requirement: !ruby/object:Gem::Requirement
|
@@ -513,14 +513,14 @@ dependencies:
|
|
513
513
|
requirements:
|
514
514
|
- - "~>"
|
515
515
|
- !ruby/object:Gem::Version
|
516
|
-
version: 0.
|
516
|
+
version: '0.20'
|
517
517
|
type: :development
|
518
518
|
prerelease: false
|
519
519
|
version_requirements: !ruby/object:Gem::Requirement
|
520
520
|
requirements:
|
521
521
|
- - "~>"
|
522
522
|
- !ruby/object:Gem::Version
|
523
|
-
version: 0.
|
523
|
+
version: '0.20'
|
524
524
|
- !ruby/object:Gem::Dependency
|
525
525
|
name: webdrivers
|
526
526
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1086,6 +1086,7 @@ files:
|
|
1086
1086
|
- lib/alchemy/configuration_methods.rb
|
1087
1087
|
- lib/alchemy/controller_actions.rb
|
1088
1088
|
- lib/alchemy/deprecation.rb
|
1089
|
+
- lib/alchemy/element_definition.rb
|
1089
1090
|
- lib/alchemy/elements_finder.rb
|
1090
1091
|
- lib/alchemy/engine.rb
|
1091
1092
|
- lib/alchemy/errors.rb
|
@@ -1110,6 +1111,7 @@ files:
|
|
1110
1111
|
- lib/alchemy/shell.rb
|
1111
1112
|
- lib/alchemy/taggable.rb
|
1112
1113
|
- lib/alchemy/tasks/tidy.rb
|
1114
|
+
- lib/alchemy/test_support.rb
|
1113
1115
|
- lib/alchemy/test_support/config_stubbing.rb
|
1114
1116
|
- lib/alchemy/test_support/essence_shared_examples.rb
|
1115
1117
|
- lib/alchemy/test_support/factories.rb
|