mailjet 1.3.5 → 1.3.6

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
  SHA1:
3
- metadata.gz: 71dd59616eccc89d2d9e16c1d3e09568196ab009
4
- data.tar.gz: 6b05a66df8ccfd31b490d4ca4d5eb6185828cbdc
3
+ metadata.gz: 533bf20d607d738f31988d3b98f42e7d19b715ec
4
+ data.tar.gz: 9e4e6f7b922eb63ddf244dd1f55cc20639c996a5
5
5
  SHA512:
6
- metadata.gz: 785c7961b92f6f65b1eb9aafc318b15e73ba9fa3cf6b13b0d12c0612ab880171d6c99b9cc734a756f9664f02d767cf295cb768f1b33baeb0611423c9bceba690
7
- data.tar.gz: 259b2e8b67b99cdcd029c7fe6d195325a33ec51d1e5e6ef0635c49baa1e27d057fb6d1dd1181ac56ce61f4e1ba47a41bf38af981ec9f11c5e594237d38a76643
6
+ metadata.gz: 51fcfca09fd37d58abde540f9b5c7f04babe9a9866e95ea04f771eef8751e2e9d3cb87ab7372540450cc389babf39cea8bf49de1711ea90a646bc568a27ff1e0
7
+ data.tar.gz: de2594137792aecce2fd7e96967f626d89f67683b4758e281c78fb8c75a87a80199e12a173566949014c4555fad67ac29d8edcb8950af4d7d3bc384269216c0d
@@ -84,6 +84,14 @@ module Mailjet
84
84
  # if action method, ammend url to appropriate id
85
85
  self.resource_path = create_action_resource_path(attributes[:id]) if self.action
86
86
 
87
+ if Mailjet.config.default_from
88
+ default_attributes = { :from_email => Mailjet.config.default_from }
89
+ else
90
+ default_attributes = {}
91
+ end
92
+
93
+ attributes = default_attributes.merge(attributes)
94
+
87
95
  self.new(attributes).tap do |resource|
88
96
  resource.save!
89
97
  resource.persisted = true
@@ -252,7 +260,7 @@ module Mailjet
252
260
 
253
261
  def formatted_payload
254
262
  payload = attributes.reject { |k,v| v.blank? }
255
- payload = payload.slice(*resourceprop)
263
+ # payload = payload.slice(*resourceprop)
256
264
  payload = camelcase_keys(payload)
257
265
  payload.inject({}) do |h, (k, v)|
258
266
  v = v.utc.as_json if v.respond_to? :utc
@@ -1,3 +1,3 @@
1
1
  module Mailjet
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6"
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.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Nappy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-03-01 00:00:00.000000000 Z
14
+ date: 2016-03-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport