griddler-mailgun 1.0.3 → 1.1.0

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: f41f83fbfcb706db836f08b8bd1452aefbc68373
4
- data.tar.gz: d67ba9fbcea79255087036e2a3104da2c6ebf17c
3
+ metadata.gz: b1ad7c97a897d626e8cf2bf9e0623c93fe81a808
4
+ data.tar.gz: 12296b79140d523dc29ee20d63b887d8c3b476f8
5
5
  SHA512:
6
- metadata.gz: 7363af24241d91f4030a9fa81e3411884766777b1f32d6d1632bb2433b135aecc871ee561f64f541ad4f55ab2bd5042db4aad320c5b5420426a95550005c1f91
7
- data.tar.gz: af65fc016ac75f4599548a08fa07de8e05362b736e8c2d5081fba68e8d8661917b14b1cf5da5ee962a2073b53a88ece65bd34869f331d95f4780ce4b1891ebed
6
+ metadata.gz: ed26a42688a47aadb79fda83f3c8ac02cff8b6c3aa6b0d94f5d73ab04dce18137c74e45e8d73492593b524da75127e5a5ae1a86e4f9d52e5845241aa961906ab
7
+ data.tar.gz: 5f7a3401e88f4ba3cbc7baae333415b1d0998cee25c992a07e9bc72068d8ee04510721aeb1351f7ddd67e1e802388ab11aceb854373fbc26a3c453eed813c29d
@@ -22,7 +22,12 @@ module Griddler
22
22
  text: params['body-plain'],
23
23
  html: params['body-html'],
24
24
  attachments: attachment_files,
25
- headers: serialized_headers
25
+ headers: serialized_headers,
26
+ vendor_specific: {
27
+ stripped_text: params["stripped-text"],
28
+ stripped_signature: params["stripped-signature"],
29
+ stripped_html: params["stripped-html"]
30
+ }
26
31
  }
27
32
  end
28
33
 
@@ -1,5 +1,5 @@
1
1
  module Griddler
2
2
  module Mailgun
3
- VERSION = "1.0.3"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -93,6 +93,33 @@ describe Griddler::Mailgun::Adapter, '.normalize_params' do
93
93
  expect(normalized_params[:bcc]).to eq ['bcc@example.com']
94
94
  end
95
95
 
96
+ it "adds stripped-signature as a vendor specific param" do
97
+ params = default_params.merge(
98
+ "stripped-signature" => "The Lannisters send their regards"
99
+ )
100
+ normalized_params = Griddler::Mailgun::Adapter.normalize_params(params)
101
+ expect(normalized_params[:vendor_specific][:stripped_signature]).
102
+ to eq "The Lannisters send their regards"
103
+ end
104
+
105
+ it "adds stripped-text as a vendor specific param" do
106
+ params = default_params.merge(
107
+ "stripped-text" => "Lorem ipsum dolor sit amet."
108
+ )
109
+ normalized_params = Griddler::Mailgun::Adapter.normalize_params(params)
110
+ expect(normalized_params[:vendor_specific][:stripped_text]).
111
+ to eq "Lorem ipsum dolor sit amet."
112
+ end
113
+
114
+ it "adds stripped-html as a vendor specific param" do
115
+ params = default_params.merge(
116
+ "stripped-html" => "<div>Lorem ipsum dolor sit amet.</div>"
117
+ )
118
+ normalized_params = Griddler::Mailgun::Adapter.normalize_params(params)
119
+ expect(normalized_params[:vendor_specific][:stripped_html]).
120
+ to eq "<div>Lorem ipsum dolor sit amet.</div>"
121
+ end
122
+
96
123
  it 'bcc is empty array when it missing' do
97
124
  normalized_params = Griddler::Mailgun::Adapter.normalize_params(default_params)
98
125
  expect(normalized_params[:bcc]).to eq []
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: griddler-mailgun
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Pauly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2019-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake