effective_logging 4.3.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e35081e813792fcd9865ba3eba02cea731a1b51f4a5c011c97af9f3f25e0fc55
4
- data.tar.gz: a1d4917f498c069796790aa020154f6d2b8b7b6f74a7d4185345277351c00de8
3
+ metadata.gz: 4822036f0b48e1a0821851a0822c684660456a901c06bdaa4a311d58fb0021fb
4
+ data.tar.gz: 27456ca9fc65eea77f89ed81699d531aba19d4aab807b38cc278943622f84433
5
5
  SHA512:
6
- metadata.gz: 30a6e493e44048f188b01ec46b143f1a95f0bd05b350ed9749f53ce656e50f198f40a093f6d36051efab553f51f4d8f224c24951cf55e5db3b65614d66413080
7
- data.tar.gz: db74e4b23a36e85c7a7a67e5ff1a48a1c4229db6593b6bf01c725bd8c66e8a79ed2bfa885e8f3945d5f97680587d01d1d539d1fc974d82081d4038ceec0b6eae
6
+ metadata.gz: efc109a5104461e0434689479fc068f530ca3dbeebadc6c63934b61a44866bd3c74334bb3f4c4da506f8954218ac195f894e512ef5e712ccbe94f9c408a940f3
7
+ data.tar.gz: b5fdf769f927ad4708bf6620e739a093a7a66861484b6fd8c451f176dd2988b5247ba1107d3c81f1fc3ac44f7adee805c6c28f6230603b7f3577532f21fd638d
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2023 Code and Effect Inc.
1
+ Copyright 2024 Code and Effect Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EffectiveLogging
2
- VERSION = '4.3.0'.freeze
2
+ VERSION = '4.3.1'.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: 4.3.0
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-06-27 00:00:00.000000000 Z
11
+ date: 2024-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails