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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29a2f35841f2c300e99ba671235f38282574392f3e0ad58ac1a4b19e78603f51
4
- data.tar.gz: 3460cc2ed8dcac7975fe8fe18ed1d111c121499bb540ce1ba587d9420f8d888c
3
+ metadata.gz: 5b0d07832764f1aca2982e520809195ae26b36c947b04b15f4ae5318ec74b4f7
4
+ data.tar.gz: 507ff8215257de3ce69a6ded010f18ec123469b111b8cb74f426263cec3e43ac
5
5
  SHA512:
6
- metadata.gz: a73c5c23e02b3e230e343f32d185231ad30ac8ec2282cea0481d1943c3b7c8887c7245d09e118f946822aac38e175992450be9d12971fdc68fa1bab65d8b6fc3
7
- data.tar.gz: dff10915122c29bf7adc3585550721dcd2ee913c32d9bf7f7443774c44ed367096f227cf0a5e2a6fd0c582f523e2ddcd203323a214836281f6dff41beeef4f2a
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
- user_fields = fields.merge(to: to, user: user)
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveLogging
2
- VERSION = '3.5.3'.freeze
2
+ VERSION = '3.5.4'.freeze
3
3
  end
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.3
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-05-29 00:00:00.000000000 Z
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.1.2
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