wbase 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: 1539b63fd05a97e79a392a3a9aa689ff1bdf0968
4
- data.tar.gz: e011e2dc58a63c228ce1817a9787a9012e9028b7
3
+ metadata.gz: 97bc7941a0f62a48ec62f39d74f6cf7eef095791
4
+ data.tar.gz: 44810f722383e6df294bf660b15982a5a986634d
5
5
  SHA512:
6
- metadata.gz: b4e6d2dd7b1fb190e084ff29ed201d0b1743ff750fe768186ca9fc42884fb7d9751a29e8b7cae145e6060b1b61a7c338da129baac61f8319f9bfa2e9f34882b2
7
- data.tar.gz: 313a6860215410626a6d3d9642ce8085c5183b4eb6c9c42d1ef27404ed6ce121d89e0679f5927d087b0294486c6717318615f40f8c4d742e5b2183f7a4b39e57
6
+ metadata.gz: f6a0173bf9a1a02c9cc04ed835889e2b002744c8fa735aa15e38366f1a8eda1f640bc17272efc9b0222377814a3ce59135a64ee3c1f1ef2c3f0e1d87b5990208
7
+ data.tar.gz: cefb0aaaf550be8903cf70cdb5dda455fa115dfc996d72a8689879903cf3a275843292f5d7f1404e4df35e56b5b10b01fc155b2f984529a00c68ef26df93f4e4
data/README.md CHANGED
@@ -218,3 +218,11 @@ if Rails.env.development?
218
218
  end
219
219
  mount Wbase::Engine => '/', as: 'wbase'
220
220
  ```
221
+
222
+
223
+ Sendgrid settings:
224
+
225
+ 1. Go to https://app.sendgrid.com/settings/mail_settings
226
+ 2. Turn on Event Notification
227
+ 3. Set HTTP POST URL to `https://www.domain.com/mail_events`
228
+
@@ -1,22 +1,23 @@
1
- class MailEventBatch
2
- def initialize(params)
3
- @params = params
4
- end
1
+ module Wbase
2
+ class MailEventBatch
3
+ def initialize(params)
4
+ @params = params
5
+ end
5
6
 
6
- def save
7
- @params["_json"].each do |ev|
8
- ev.permit!
9
- MailEvent.create(
10
- email: ev[:email],
11
- sg_message_id: ev[:sg_message_id],
12
- timestamp: ev[:timestamp],
13
- smtp_id: ev['smtp-id'],
14
- event: ev[:event],
15
- mail_eventable_id: ev.fetch(:mail_eventable_id, nil),
16
- mail_eventable_type: ev.fetch(:mail_eventable_type, nil),
17
- data: ev.to_json
18
- )
7
+ def save
8
+ @params["_json"].each do |ev|
9
+ ev.permit!
10
+ Wbase::MailEvent.create(
11
+ email: ev[:email],
12
+ sg_message_id: ev[:sg_message_id],
13
+ timestamp: ev[:timestamp],
14
+ smtp_id: ev['smtp-id'],
15
+ event: ev[:event],
16
+ mail_eventable_id: ev.fetch(:mail_eventable_id, nil),
17
+ mail_eventable_type: ev.fetch(:mail_eventable_type, nil),
18
+ data: ev.to_json
19
+ )
20
+ end
19
21
  end
20
22
  end
21
23
  end
22
-
data/lib/wbase/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wbase
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - CJ Avilla