sendgrid_actionmailer_adapter 0.3.0 → 0.3.1

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: cd86c4547fe8aa68707f63e6613531e67e0b8f9b08a454f2bb1d6c4977c2ebf3
4
- data.tar.gz: 24d6b1d4aed6f1f359453e8686fec2cad0af806a9cad03b03624deb01798fa07
3
+ metadata.gz: b18c8a752c45b55008f04261b87761e179e86ff1fee35307d1b06bf3829a7573
4
+ data.tar.gz: 33c3a4e3ecde09efc36807a7c49d1c17bd2e283b8a5578035c9b3b736092a98c
5
5
  SHA512:
6
- metadata.gz: ea3939b006d894a1e29841fd26642f61ac56b3310ad97c7919c7e59d325d3b11e8d0ce6264e25ccb453ddc5078183f603f045f334a9760e4519fe2b12526131a
7
- data.tar.gz: 4ffb01e435809c556efa5290e0bcc2881cd31770c9df4a79cb2b6494a08e49e9c842524e1cec5ff305f386c09abf8661a6179ca574cbc02439fcdc885675acb8
6
+ metadata.gz: 4dfd8da18aa10346ce0f64b0f0441117058e8fbd9a0e14f965e3383bdcbe71fd2818d10f16709f40a76c5e9724a785911b772772509a6a16ee297711dff03605
7
+ data.tar.gz: efb1d7977db06a20409d46062edc55bd3152d596cd7eb2c3ccf59fa1c29a71df56e6de0d6f75b165f12cef2df69d86219c81e935cecc63f9d83eba1fbae90adf
@@ -41,7 +41,7 @@ module SendGridActionMailerAdapter
41
41
  end
42
42
 
43
43
  with_retry(@settings[:retry]) do
44
- @logger.info("Calling sendMail API, #{sendgrid_mail.inspect}")
44
+ @logger.info("Calling sendMail API, #{extract_log_info(sendgrid_mail)}")
45
45
  response = sendgrid_client.mail._('send').post(request_body: sendgrid_mail.to_json)
46
46
  @logger.info("End calling sendMail API, status_code: #{response.status_code}")
47
47
  handle_response!(response)
@@ -87,6 +87,13 @@ module SendGridActionMailerAdapter
87
87
  end
88
88
  end
89
89
 
90
+ def extract_log_info(sendgrid_mail)
91
+ {
92
+ subject: sendgrid_mail.subject,
93
+ personalizations: sendgrid_mail.personalizations,
94
+ }
95
+ end
96
+
90
97
  # @see https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html
91
98
  def handle_response!(response)
92
99
  case response.status_code.to_i
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SendGridActionMailerAdapter
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid_actionmailer_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryu39
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-20 00:00:00.000000000 Z
11
+ date: 2019-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sendgrid-ruby