effective_logging 3.5.3 → 3.5.4
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/email_logger.rb +3 -7
- data/lib/effective_logging/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b0d07832764f1aca2982e520809195ae26b36c947b04b15f4ae5318ec74b4f7
|
4
|
+
data.tar.gz: 507ff8215257de3ce69a6ded010f18ec123469b111b8cb74f426263cec3e43ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d11842ba982615466b169a5415bed591f7e025cd912a94c0dc1ee4f105ea15b191833a73e78e6e406206c57de9456c5e12c6bc62961c5cb106fd24b4a5677446
|
7
|
+
data.tar.gz: 7f270c7159f350a5de6db15f30e42665a541dd060747a967078212dc4f39b2036ff21b218c209c3d72f14667d26db62c6825fbd7a0493ca0ac2240166935b95f
|
@@ -51,17 +51,13 @@ module EffectiveLogging
|
|
51
51
|
private
|
52
52
|
|
53
53
|
def self.log_email(message, fields, user_klass)
|
54
|
-
tos = Array(message.to) - [nil, '']
|
54
|
+
tos = (Array(message.to) + Array(message.cc)) - [nil, '']
|
55
55
|
|
56
56
|
tos.each do |to|
|
57
57
|
user = (user_klass.where(email: to.downcase).first if user_klass.present?)
|
58
|
+
details = fields.merge(to: to, user: user)
|
58
59
|
|
59
|
-
|
60
|
-
::EffectiveLogger.email("#{message.subject} - #{tos.join(', ')}", user_fields)
|
61
|
-
end
|
62
|
-
|
63
|
-
if tos.blank? && (message.cc.present? || message.bcc.present?)
|
64
|
-
::EffectiveLogger.email("#{message.subject} - multiple recipients", fields)
|
60
|
+
::EffectiveLogger.email("#{message.subject} - #{to}", details)
|
65
61
|
end
|
66
62
|
|
67
63
|
true
|
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.5.
|
4
|
+
version: 3.5.4
|
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: 2023-
|
11
|
+
date: 2023-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
142
|
+
rubygems_version: 3.4.10
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Automatically log all sent emails, user logins, and page views. This also
|