emailbutler 0.8.12 → 0.9.0

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: 3e041b4eb9f94cb8591b0bdd439eb35ea40f9f2806e065feb13e65d3ea217191
4
- data.tar.gz: 33f46385632a0c85e219aa3d55731d53ee548e4cb6fdc932a05c5e4fa77759ad
3
+ metadata.gz: 0d6612dd1009249a9314d73130f50e552ca2617ac9e9396321d838097847b2b4
4
+ data.tar.gz: e844f163ca10039a3214b441fce3ce1036e1d621c75719af5b45f0c6301d4a98
5
5
  SHA512:
6
- metadata.gz: cff7daacc6e23cc0d01b17762ccd23eac8305f58f4756687f3efed466e45e2f19cdf6e93ddaadca99c15912b52eb8d071255fccf68f34f64f5a59ff0c1330fe6
7
- data.tar.gz: d32be30b001977e334190dc8b07dad3c900177642b8fc6eef21a0ed3f733f10c211c3a48be138663753ac2c1e725e9a5b896fb60abe3fc1a4c3b38d8374bd8d7
6
+ metadata.gz: bded1db47fe2574726f9b695154b96a18c51cf639c1a0f54d4fe561ed7932b681bbe069c463c905c00f7ef8b1b9f2f58b8a710fd638d40a9b24b1046280c3ef6
7
+ data.tar.gz: 8e889730f6f8d5e14e70c327b9e627c57daba2200113b924ef4adbd71ff84960a3ff12913e8a5cc00111b62526278e8d6007dbefbe1fab429c63a854cc140c7a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emailbutler
4
- VERSION = '0.8.12'
4
+ VERSION = '0.9.0'
5
5
  end
@@ -14,6 +14,7 @@ module Emailbutler
14
14
  payload.stringify_keys!
15
15
  # message-id contains data like <uuid>
16
16
  message_uuid = payload['Message_GUID']
17
+ message_uuid = message_uuid[1..-2] if message_uuid.starts_with?('<') && message_uuid.ends_with?('>')
17
18
  status = DELIVERABILITY_MAPPER[payload['event']] || Emailbutler::Message::FAILED
18
19
  return [] if message_uuid.nil?
19
20
 
@@ -14,6 +14,7 @@ module Emailbutler
14
14
  payload['events'].filter_map { |message|
15
15
  message.stringify_keys!
16
16
  message_uuid = message['message_id']
17
+ message_uuid = message_uuid[1..-2] if message_uuid.starts_with?('<') && message_uuid.ends_with?('>')
17
18
  status = DELIVERABILITY_MAPPER[message['event']] || Emailbutler::Message::FAILED
18
19
  next if message_uuid.nil?
19
20
 
@@ -14,6 +14,7 @@ module Emailbutler
14
14
  payload['mandrill_events'].filter_map { |message|
15
15
  message.stringify_keys!
16
16
  message_uuid = message['_id']
17
+ message_uuid = message_uuid[1..-2] if message_uuid.starts_with?('<') && message_uuid.ends_with?('>')
17
18
  status = DELIVERABILITY_MAPPER[message['event']] || Emailbutler::Message::FAILED
18
19
  next if message_uuid.nil?
19
20
 
@@ -14,6 +14,7 @@ module Emailbutler
14
14
  def call(payload:)
15
15
  payload.stringify_keys!
16
16
  message_uuid = payload.dig('data', 'email_id')
17
+ message_uuid = message_uuid[1..-2] if message_uuid.starts_with?('<') && message_uuid.ends_with?('>')
17
18
  status = DELIVERABILITY_MAPPER[payload['type']] || Emailbutler::Message::FAILED
18
19
  return [] if message_uuid.nil?
19
20
 
@@ -11,10 +11,11 @@ module Emailbutler
11
11
  'click' => 'delivered'
12
12
  }.freeze
13
13
 
14
- def call(payload:)
14
+ def call(payload:) # rubocop: disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
15
15
  payload['_json'].filter_map { |message|
16
16
  message.stringify_keys!
17
17
  message_uuid = message['smtp-id'] || message['sg_message_id']
18
+ message_uuid = message_uuid[1..-2] if message_uuid.starts_with?('<') && message_uuid.ends_with?('>')
18
19
  status = DELIVERABILITY_MAPPER[message['event']] || Emailbutler::Message::FAILED
19
20
  next if message_uuid.nil? || status.nil?
20
21
 
@@ -14,7 +14,8 @@ module Emailbutler
14
14
  def call(payload:)
15
15
  payload.stringify_keys!
16
16
  # message-id contains data like <uuid>
17
- message_uuid = payload['message-id'][1..-2]
17
+ message_uuid = payload['message-id']
18
+ message_uuid = message_uuid[1..-2] if message_uuid.starts_with?('<') && message_uuid.ends_with?('>')
18
19
  status = DELIVERABILITY_MAPPER[payload['event']] || Emailbutler::Message::FAILED
19
20
  return [] if message_uuid.nil?
20
21
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emailbutler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.12
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdanov Anton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-03 00:00:00.000000000 Z
11
+ date: 2026-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-container