effective_logging 4.3.0 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/lib/effective_logging/email_logger.rb +3 -2
- data/lib/effective_logging/version.rb +1 -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: 4822036f0b48e1a0821851a0822c684660456a901c06bdaa4a311d58fb0021fb
|
4
|
+
data.tar.gz: 27456ca9fc65eea77f89ed81699d531aba19d4aab807b38cc278943622f84433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efc109a5104461e0434689479fc068f530ca3dbeebadc6c63934b61a44866bd3c74334bb3f4c4da506f8954218ac195f894e512ef5e712ccbe94f9c408a940f3
|
7
|
+
data.tar.gz: b5fdf769f927ad4708bf6620e739a093a7a66861484b6fd8c451f176dd2988b5247ba1107d3c81f1fc3ac44f7adee805c6c28f6230603b7f3577532f21fd638d
|
data/MIT-LICENSE
CHANGED
@@ -11,8 +11,7 @@ module EffectiveLogging
|
|
11
11
|
# Add a log header to your mailer to pass some objects or additional things to EffectiveLogger
|
12
12
|
# mail(to: 'admin@example.com', subject: @post.title, log: @post)
|
13
13
|
log = if message.header['log'].present?
|
14
|
-
message.header['log'].instance_variable_get(:@unparsed_value) ||
|
15
|
-
message.header['log'].instance_variable_get(:@value)
|
14
|
+
message.header['log'].instance_variable_get(:@unparsed_value) || message.header['log'].instance_variable_get(:@value)
|
16
15
|
end
|
17
16
|
|
18
17
|
# If we have a logged object, associate it
|
@@ -37,6 +36,8 @@ module EffectiveLogging
|
|
37
36
|
# Parse the content for logging
|
38
37
|
parts = (message.body.try(:parts) || []).map { |part| [part, (part.parts if part.respond_to?(:parts))] }.flatten
|
39
38
|
body = parts.find { |part| part.content_type.to_s.downcase.include?('text/html') } || message.body
|
39
|
+
body = (body.try(:body) || body)
|
40
|
+
|
40
41
|
fields[:email] = "#{message.header}<hr>#{body}"
|
41
42
|
|
42
43
|
# Find the user to associate it with
|
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: 4.3.
|
4
|
+
version: 4.3.1
|
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: 2024-
|
11
|
+
date: 2024-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|