effective_logging 3.2.3 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/effective_logging/engine.rb +11 -7
- data/lib/effective_logging/version.rb +1 -1
- data/lib/effective_logging.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddf74b601f163ea150e25b7e529d1e8abf13664ea6d19389efb79a092e67e653
|
4
|
+
data.tar.gz: 99916c1974d5f545b53df560f94969d58a58b0d20381a7623ee97b54c947218e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50589f9370ed4005cabfcaa8cc3377ec845b8800acd8f195434c3a288f123160c7e0636491b5f204d4e6b98d8f50dedc00500a5fba9bcd34be83ee6ccc46523a
|
7
|
+
data.tar.gz: 900e0b21b045f223333e852ba09d66c4e798edf855dd747fe6f251138f341b5d8b03f7d2da37c83a040a9b1b1e3cca941342692a0d065d6fd38f88d5d0639a88
|
@@ -17,7 +17,7 @@ module EffectiveLogging
|
|
17
17
|
# Automatically Log Emails
|
18
18
|
initializer 'effective_logging.emails' do |app|
|
19
19
|
if EffectiveLogging.email_enabled == true
|
20
|
-
|
20
|
+
app.config.to_prepare do
|
21
21
|
ActionMailer::Base.register_interceptor(EffectiveLogging::EmailLogger)
|
22
22
|
end
|
23
23
|
end
|
@@ -25,15 +25,17 @@ module EffectiveLogging
|
|
25
25
|
|
26
26
|
# Include acts_as_loggable concern and allow any ActiveRecord object to call it with log_changes()
|
27
27
|
initializer 'effective_logging.active_record' do |app|
|
28
|
-
|
29
|
-
|
28
|
+
app.config.to_prepare do
|
29
|
+
ActiveSupport.on_load :active_record do
|
30
|
+
ActiveRecord::Base.extend(ActsAsLoggable::Base)
|
31
|
+
end
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
33
35
|
# Log all ActiveStorage downloads
|
34
36
|
initializer 'effective_logging.active_storage' do |app|
|
35
37
|
if EffectiveLogging.active_storage_enabled == true && defined?(ActiveStorage)
|
36
|
-
|
38
|
+
app.config.to_prepare do
|
37
39
|
ActiveStorage::DiskController.include(EffectiveLogging::ActiveStorageLogger)
|
38
40
|
ActiveStorage::DiskController.class_eval { after_action(:track_downloads, only: :show) }
|
39
41
|
end
|
@@ -42,7 +44,7 @@ module EffectiveLogging
|
|
42
44
|
|
43
45
|
# Register the log_page_views concern so that it can be called in ActionController or elsewhere
|
44
46
|
initializer 'effective_logging.log_changes_action_controller' do |app|
|
45
|
-
|
47
|
+
app.config.to_prepare do
|
46
48
|
ActiveSupport.on_load :action_controller do
|
47
49
|
ActionController::Base.include(EffectiveLogging::SetCurrentUser::ActionController)
|
48
50
|
end
|
@@ -51,8 +53,10 @@ module EffectiveLogging
|
|
51
53
|
|
52
54
|
# Register the log_page_views concern so that it can be called in ActionController or elsewhere
|
53
55
|
initializer 'effective_logging.action_controller' do |app|
|
54
|
-
|
55
|
-
|
56
|
+
app.config.to_prepare do
|
57
|
+
ActiveSupport.on_load :action_controller do
|
58
|
+
ActionController::Base.extend(EffectiveLogging::LogPageViews::ActionController)
|
59
|
+
end
|
56
60
|
end
|
57
61
|
end
|
58
62
|
|
data/lib/effective_logging.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|