alchemy_cms 4.6.6 → 4.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/controllers/alchemy/admin/base_controller.rb +9 -3
- data/lib/alchemy/engine.rb +7 -0
- data/lib/alchemy/error_tracking/airbrake_handler.rb +13 -0
- data/lib/alchemy/error_tracking.rb +14 -0
- data/lib/alchemy/upgrader/tasks/cells_migration.rb +1 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca89899748d18f70ee78b29698acf1bf9a768a938ef9bc6b95183eda42fb0e7b
|
4
|
+
data.tar.gz: e8fcc703a6dce815bea12d6af8f9e0307fcf38589a41fb12b96fe223ce09c793
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f653e26248ed2a01b92fcc6b7ded6b4eac3e057b25ad84830a6ba2ca3fa3df8c1d1af722c281bcb89ab273f4a07f5556822e0e27b40ca89d2057a4a9337e174
|
7
|
+
data.tar.gz: 96404109c54eb6c3c12e46bcc925725ccd352041437f895359f8b11e4b10abe93abd039e040868b0bbf5a5716865bcbbcc0662c3e20fd4d5ce636e8a0c5aa465
|
data/CHANGELOG.md
CHANGED
@@ -42,9 +42,7 @@ module Alchemy
|
|
42
42
|
def exception_handler(error)
|
43
43
|
exception_logger(error)
|
44
44
|
show_error_notice(error)
|
45
|
-
|
46
|
-
notify_airbrake(error) unless Rails.env.development? || Rails.env.test?
|
47
|
-
end
|
45
|
+
notify_error_tracker(error)
|
48
46
|
end
|
49
47
|
|
50
48
|
# Displays an error notice in the Alchemy backend.
|
@@ -167,6 +165,14 @@ module Alchemy
|
|
167
165
|
site
|
168
166
|
end
|
169
167
|
end
|
168
|
+
|
169
|
+
def notify_error_tracker(exception)
|
170
|
+
if ::Alchemy::ErrorTracking.notification_handler.respond_to?(:call)
|
171
|
+
::Alchemy::ErrorTracking.notification_handler.call(exception)
|
172
|
+
else
|
173
|
+
Rails.logger.warn("To use the Alchemy::ErrorTracking.notification_handler, it must respond to #call.")
|
174
|
+
end
|
175
|
+
end
|
170
176
|
end
|
171
177
|
end
|
172
178
|
end
|
data/lib/alchemy/engine.rb
CHANGED
@@ -28,5 +28,12 @@ module Alchemy
|
|
28
28
|
config.after_initialize do
|
29
29
|
require_relative './userstamp'
|
30
30
|
end
|
31
|
+
|
32
|
+
initializer "alchemy.error_tracking" do
|
33
|
+
if defined?(Airbrake)
|
34
|
+
require_relative "error_tracking/airbrake_handler"
|
35
|
+
Alchemy::ErrorTracking.notification_handler = Alchemy::ErrorTracking::AirbrakeHandler
|
36
|
+
end
|
37
|
+
end
|
31
38
|
end
|
32
39
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module ErrorTracking
|
5
|
+
class BaseHandler
|
6
|
+
def self.call(exception)
|
7
|
+
# implement your own notification method
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
mattr_accessor :notification_handler
|
12
|
+
@@notification_handler = BaseHandler
|
13
|
+
end
|
14
|
+
end
|
@@ -31,6 +31,7 @@ module Alchemy::Upgrader::Tasks
|
|
31
31
|
elements = Alchemy::Element.where(cell_id: cell.id).order(position: :asc)
|
32
32
|
|
33
33
|
if fixed_element.new_record?
|
34
|
+
fixed_element.autogenerate_nested_elements = false
|
34
35
|
fixed_element.save!
|
35
36
|
Alchemy::Element.acts_as_list_no_update do
|
36
37
|
elements.update_all(parent_element_id: fixed_element.id)
|
data/lib/alchemy/version.rb
CHANGED
data/lib/alchemy_cms.rb
CHANGED
@@ -35,6 +35,7 @@ require_relative 'alchemy/configuration_methods'
|
|
35
35
|
require_relative 'alchemy/controller_actions'
|
36
36
|
require_relative 'alchemy/deprecation'
|
37
37
|
require_relative 'alchemy/elements_finder'
|
38
|
+
require_relative 'alchemy/error_tracking'
|
38
39
|
require_relative 'alchemy/errors'
|
39
40
|
require_relative 'alchemy/essence'
|
40
41
|
require_relative 'alchemy/filetypes'
|
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.6.
|
4
|
+
version: 4.6.7
|
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: 2022-01-23 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -1056,6 +1056,8 @@ files:
|
|
1056
1056
|
- lib/alchemy/deprecation.rb
|
1057
1057
|
- lib/alchemy/elements_finder.rb
|
1058
1058
|
- lib/alchemy/engine.rb
|
1059
|
+
- lib/alchemy/error_tracking.rb
|
1060
|
+
- lib/alchemy/error_tracking/airbrake_handler.rb
|
1059
1061
|
- lib/alchemy/errors.rb
|
1060
1062
|
- lib/alchemy/essence.rb
|
1061
1063
|
- lib/alchemy/filetypes.rb
|