emailbutler 0.5.5 → 0.5.7

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: d1e2b122e8e4459543113fe69f86983bbfc5ad1f75d643e294adf7591b01e86e
4
- data.tar.gz: b8c2389404296471aeefdbdcb6f669d647ce73993c9d4ba1c62cdc9090b23f3a
3
+ metadata.gz: e6e807c1f5296032d8b8c8f43a4b3951043cd381f650476fc1c1089ad7abd997
4
+ data.tar.gz: e7c80bca2d6753a787eadfc19254fb98c7c3b876c641d9f3c566bae5e05c78e2
5
5
  SHA512:
6
- metadata.gz: 5f3f5778451f7a7d464202ae84e7dfb10869b9996f7c257e3cfed64aa6a59389a0f1b016d97021a93a335b282dc4a5e7f2b845970af6f402304577023922f1f4
7
- data.tar.gz: 6e32a46bbc9769875bb4dbd954224aea55f598c158b0f1ca66f63b0ded7de29140cb38c2de6b5bc816589f53e6e573a65916c5745ca7b9f7afc634b8593c0d9b
6
+ metadata.gz: b7aba7d1c2d0cfc65d421218ca59c4cb9481649923dad6c5e19720602cf3be80145a9ebdae54ad512c5341cf0b8f849b0495e4cd9e48b0f4b9c243c87c5bf760
7
+ data.tar.gz: deec7c601e36ac1157bceab45a0b3d66aa5a861d8756af4d113c3821be2a5b960854ea98deab0a6cfc23ce5aab3e409ab8232aaddd47fcc94f1b15719daa87b3
@@ -16,7 +16,7 @@ module Emailbutler
16
16
  private
17
17
 
18
18
  def receiver_params
19
- params.permit('_json' => %w[smtp-id event])
19
+ params.permit('_json' => %w[smtp-id event timestamp])
20
20
  end
21
21
  end
22
22
  end
@@ -1,6 +1,5 @@
1
1
  class CreateEmailbutlerTables < ActiveRecord::Migration[7.0]
2
2
  def self.up
3
- enable_extension 'pgcrypto' unless extensions.include?('pgcrypto')
4
3
  enable_extension 'uuid-ossp' unless extensions.include?('uuid-ossp')
5
4
 
6
5
  create_table :emailbutler_messages do |t|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emailbutler
4
- VERSION = '0.5.5'
4
+ VERSION = '0.5.7'
5
5
  end
@@ -7,9 +7,12 @@ module Emailbutler
7
7
  DELIVERABILITY_MAPPER = {
8
8
  'processed' => 'processed',
9
9
  'delivered' => 'delivered',
10
+ 'open' => 'delivered',
11
+ 'click' => 'delivered',
10
12
  'deferred' => 'failed',
11
13
  'bounce' => 'failed',
12
- 'dropped' => 'failed'
14
+ 'dropped' => 'failed',
15
+ 'spamreport' => 'failed'
13
16
  }.freeze
14
17
 
15
18
  def self.call(...)
@@ -16,6 +16,8 @@ module Emailbutler
16
16
  .call(payload: payload)
17
17
  .each { |event|
18
18
  message = Emailbutler.find_message_by(uuid: event.delete(:message_uuid))
19
+ next unless message
20
+
19
21
  Emailbutler.update_message(message, event)
20
22
  }
21
23
  end
@@ -1,6 +1,5 @@
1
1
  class CreateEmailbutlerTables < ActiveRecord::Migration<%= migration_version %>
2
2
  def self.up
3
- enable_extension 'pgcrypto' unless extensions.include?('pgcrypto')
4
3
  enable_extension 'uuid-ossp' unless extensions.include?('uuid-ossp')
5
4
 
6
5
  create_table :emailbutler_messages do |t|
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.5.5
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdanov Anton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-12 00:00:00.000000000 Z
11
+ date: 2023-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pagy