mailjet 1.8.2 → 1.8.3

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: d54cf6674adadbb1dd8a8c8bf2ce842a77227ecc06bfddd461e966afb28a6be0
4
- data.tar.gz: 2dc9a441b19debbe344d99929f5cef00d6dc815dd3f08f100b489bbfbecacf16
3
+ metadata.gz: d20c3811d37360e2c0da2176c227b7328f3e4f329fd36c1e91c723e28b3946d9
4
+ data.tar.gz: d13fbd83f731ddcb162ac9776af0261971bba3d0dac4887d7088c4f1b788c110
5
5
  SHA512:
6
- metadata.gz: a86bc5f7940f9edd25d946ae98acf323a9aa3707693d8548c100684a8fe8ffb692ad45b208e7f321b30735cd23146263dc3e3d7d8c1065464a8e050f12b024bc
7
- data.tar.gz: 1c00d516a00931715017eac97473ec89c4afa179d65291384b237045dd56e44d09b628dec2c611fa053c3a03da68a58b85c8418dfa6678c45d20ffe1ea07d4ca
6
+ metadata.gz: 7780c42117a2b9e6601f18a9480c0368cf33f4e7723091970dd28817affe727de3540d19c849daa56c1e3c65e0e9d8d4703e9765a73b0344cbc9263be37eae2a
7
+ data.tar.gz: 5aa121079dc94441e0bd876b7090ceac961a6a84c6264f73d8f65bd1242ff1182b2796d2b7dc0c2dc0b727159e10155c85c969b095df8cc101bab088a416d194
data/README.md CHANGED
@@ -498,7 +498,7 @@ Mailjet::ContactPii.delete(contact_ID)
498
498
 
499
499
  You can setup your Rack application in order to receive feedback on emails you sent (clicks, etc.)
500
500
 
501
- First notify Mailjet of your desired endpoint (say: 'http://www.my_domain.com/mailjet/callback') at https://www.mailjet.com/account/triggers
501
+ First notify Mailjet of your desired endpoint (say: 'http://www.my_domain.com/mailjet/callback') at https://app.mailjet.com/account/triggers
502
502
 
503
503
  Then configure Mailjet's Rack application to catch these callbacks.
504
504
 
@@ -80,13 +80,14 @@ module Mailjet
80
80
  end
81
81
 
82
82
  def handle_exception(e, additional_headers, payload = {})
83
- return e.response_body if e.response_headers[:content_type].include?("text/plain")
83
+ response_content_type = e.response_headers&.[](:content_type) || ''
84
+ return e.response_body if response_content_type.include?("text/plain")
84
85
 
85
86
  params = additional_headers[:params] || {}
86
87
  formatted_payload = (additional_headers[:content_type] == :json) ? Yajl::Parser.parse(payload) : payload
87
88
  params = params.merge!(formatted_payload) if formatted_payload.is_a?(Hash)
88
89
 
89
- response_body = if e.response_headers[:content_type].include?("application/json")
90
+ response_body = if response_content_type.include?("application/json")
90
91
  e.response_body
91
92
  else
92
93
  "{}"
@@ -3,6 +3,7 @@ require 'yajl'
3
3
  require 'active_support'
4
4
  require 'active_support/core_ext/string'
5
5
  require 'active_support/core_ext/hash/indifferent_access'
6
+ require 'active_support/core_ext/object/blank'
6
7
 
7
8
 
8
9
 
@@ -1,3 +1,3 @@
1
1
  module Mailjet
2
- VERSION = "1.8.2"
2
+ VERSION = "1.8.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailjet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Nappy