mailgun-ruby 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/Gemfile +4 -0
- data/LICENSE +191 -0
- data/MessageBuilder.md +85 -0
- data/Messages.md +77 -0
- data/OptInHandler.md +103 -0
- data/README.md +150 -0
- data/Rakefile +33 -0
- data/Snippets.md +506 -0
- data/lib/mailgun.rb +227 -0
- data/lib/mailgun/exceptions/exceptions.rb +27 -0
- data/lib/mailgun/lists/opt_in_handler.rb +46 -0
- data/lib/mailgun/messages/batch_message.rb +139 -0
- data/lib/mailgun/messages/message_builder.rb +321 -0
- data/lib/mailgun/version.rb +5 -0
- data/mailgun.gemspec +42 -0
- data/spec/integration/mailgun_spec.rb +598 -0
- data/spec/integration/messages/sample_data/mime.txt +38 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/unit/connection/test_client.rb +143 -0
- data/spec/unit/lists/opt_in_handler_spec.rb +22 -0
- data/spec/unit/mailgun_spec.rb +131 -0
- data/spec/unit/messages/batch_message_spec.rb +130 -0
- data/spec/unit/messages/message_builder_spec.rb +359 -0
- data/spec/unit/messages/sample_data/mailgun_icon.png +0 -0
- data/spec/unit/messages/sample_data/mime.txt +38 -0
- data/spec/unit/messages/sample_data/rackspace_logo.jpg +0 -0
- metadata +171 -0
@@ -0,0 +1,359 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'MessageBuilder attribute readers' do
|
4
|
+
it 'should be readable' do
|
5
|
+
@mb_obj = Mailgun::MessageBuilder.new()
|
6
|
+
@mb_obj.should respond_to(:message)
|
7
|
+
@mb_obj.should respond_to(:counters)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'The instantiation of MessageBuilder' do
|
12
|
+
|
13
|
+
before(:each) do
|
14
|
+
@mb_obj = Mailgun::MessageBuilder.new()
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'contains Message, which should be of type Multimap and empty' do
|
18
|
+
@mb_obj.message.should be_a(Multimap)
|
19
|
+
@mb_obj.message.length.should eq(0)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'contains counters, which should be of type hash and contain several important counters' do
|
23
|
+
@mb_obj.counters.should be_a(Hash)
|
24
|
+
@mb_obj.counters.should include(:recipients)
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'contains counters, which should be of type hash and contain several important counters' do
|
28
|
+
@mb_obj.counters.should be_a(Hash)
|
29
|
+
@mb_obj.counters.should include(:recipients)
|
30
|
+
@mb_obj.counters[:recipients].should include(:to)
|
31
|
+
@mb_obj.counters[:recipients].should include(:cc)
|
32
|
+
@mb_obj.counters[:recipients].should include(:bcc)
|
33
|
+
@mb_obj.counters.should include(:attributes)
|
34
|
+
@mb_obj.counters[:attributes].should include(:attachment)
|
35
|
+
@mb_obj.counters[:attributes].should include(:campaign_id)
|
36
|
+
@mb_obj.counters[:attributes].should include(:custom_option)
|
37
|
+
@mb_obj.counters[:attributes].should include(:tag)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'The method add_recipient' do
|
42
|
+
before(:each) do
|
43
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
44
|
+
@address = 'jane@example.com'
|
45
|
+
@variables = {'first' => 'Jane', 'last' => 'Doe'}
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'adds a "to" recipient type to the message body and counter is incremented' do
|
49
|
+
recipient_type = :to
|
50
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
51
|
+
@mb_obj.message[recipient_type][0].should eq("'#{@variables['first']} #{@variables['last']}' <#{@address}>")
|
52
|
+
@mb_obj.counters[:recipients][recipient_type].should eq(1)
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'adds a "cc" recipient type to the message body and counter is incremented' do
|
56
|
+
recipient_type = :cc
|
57
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
58
|
+
@mb_obj.message[recipient_type][0].should eq("'#{@variables['first']} #{@variables['last']}' <#{@address}>")
|
59
|
+
@mb_obj.counters[:recipients][recipient_type].should eq(1)
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'adds a "bcc" recipient type to the message body and counter is incremented' do
|
63
|
+
recipient_type = :bcc
|
64
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
65
|
+
@mb_obj.message[recipient_type][0].should eq("'#{@variables['first']} #{@variables['last']}' <#{@address}>")
|
66
|
+
@mb_obj.counters[:recipients][recipient_type].should eq(1)
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'adds a "h:reply-to" recipient type to the message body and counters are not incremented' do
|
70
|
+
recipient_type = 'h:reply-to'
|
71
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
72
|
+
@mb_obj.message[recipient_type][0].should eq("'#{@variables['first']} #{@variables['last']}' <#{@address}>")
|
73
|
+
@mb_obj.counters[:recipients].each_value{|value| value.should eq(0)}
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'ensures a random recipient type is added to the message body and counters are not incremented' do
|
77
|
+
recipient_type = 'im-not-really-real'
|
78
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
79
|
+
@mb_obj.message[recipient_type][0].should eq("'#{@variables['first']} #{@variables['last']}' <#{@address}>")
|
80
|
+
@mb_obj.counters[:recipients].each_value{|value| value.should eq(0)}
|
81
|
+
end
|
82
|
+
it 'adds too many to recipients and raises an exception.' do
|
83
|
+
recipient_type = :to
|
84
|
+
expect{
|
85
|
+
1001.times do
|
86
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
87
|
+
end }.to raise_error(Mailgun::ParameterError)
|
88
|
+
end
|
89
|
+
it 'adds too many cc recipients and raises an exception.' do
|
90
|
+
recipient_type = :cc
|
91
|
+
expect{
|
92
|
+
1001.times do
|
93
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
94
|
+
end }.to raise_error(Mailgun::ParameterError)
|
95
|
+
end
|
96
|
+
it 'adds too many bcc recipients and raises an exception.' do
|
97
|
+
recipient_type = :bcc
|
98
|
+
expect{
|
99
|
+
1001.times do
|
100
|
+
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
101
|
+
end }.to raise_error(Mailgun::ParameterError)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe 'The method set_subject' do
|
106
|
+
before(:each) do
|
107
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
108
|
+
end
|
109
|
+
it 'sets the message subject to blank if called and no parameters are provided' do
|
110
|
+
@mb_obj.set_subject
|
111
|
+
@mb_obj.message[:subject][0].should eq('')
|
112
|
+
end
|
113
|
+
it 'sets the message subject if called with the subject parameter' do
|
114
|
+
the_subject = 'This is my subject!'
|
115
|
+
@mb_obj.set_subject(the_subject)
|
116
|
+
@mb_obj.message[:subject][0].should eq(the_subject)
|
117
|
+
end
|
118
|
+
it 'ensures no duplicate subjects can exist and last setter is stored' do
|
119
|
+
the_first_subject = 'This is my first subject!'
|
120
|
+
the_second_subject = 'This is my second subject!'
|
121
|
+
@mb_obj.set_subject(the_first_subject)
|
122
|
+
@mb_obj.set_subject(the_second_subject)
|
123
|
+
@mb_obj.message[:subject].length.should eq(1)
|
124
|
+
@mb_obj.message[:subject][0].should eq(the_second_subject)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
describe 'The method set_text_body' do
|
129
|
+
before(:each) do
|
130
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
131
|
+
end
|
132
|
+
it 'sets the text_body to blank if called and no parameters are provided' do
|
133
|
+
@mb_obj.set_text_body
|
134
|
+
@mb_obj.message[:text] = ''
|
135
|
+
end
|
136
|
+
it 'sets the message text if called with the text_body parameter' do
|
137
|
+
the_text = 'Don\'t mess with Texas!'
|
138
|
+
@mb_obj.set_text_body(the_text)
|
139
|
+
@mb_obj.message[:text] = the_text
|
140
|
+
end
|
141
|
+
it 'ensures no duplicate text bodies can exist and last setter is stored' do
|
142
|
+
the_first_text = 'Mess with Texas!'
|
143
|
+
the_second_text = 'Don\'t mess with Texas!'
|
144
|
+
@mb_obj.set_text_body(the_first_text)
|
145
|
+
@mb_obj.set_text_body(the_second_text)
|
146
|
+
@mb_obj.message[:text].length.should eq(1)
|
147
|
+
@mb_obj.message[:text][0].should eq(the_second_text)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe 'The method add_attachment' do
|
152
|
+
before(:each) do
|
153
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
154
|
+
end
|
155
|
+
it 'adds a few file paths to the message object' do
|
156
|
+
|
157
|
+
file1 = File.dirname(__FILE__) + "/sample_data/mailgun_icon.png"
|
158
|
+
file2 = File.dirname(__FILE__) + "/sample_data/rackspace_logo.jpg"
|
159
|
+
|
160
|
+
file_paths = [file1, file2]
|
161
|
+
|
162
|
+
file_paths.each {|item| @mb_obj.add_attachment(item)}
|
163
|
+
@mb_obj.message[:attachment].length.should eq(2)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
describe 'The method add_inline_image' do
|
168
|
+
before(:each) do
|
169
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
170
|
+
end
|
171
|
+
it 'adds a few file paths to the message object' do
|
172
|
+
file1 = File.dirname(__FILE__) + "/sample_data/mailgun_icon.png"
|
173
|
+
file2 = File.dirname(__FILE__) + "/sample_data/rackspace_logo.jpg"
|
174
|
+
|
175
|
+
file_paths = [file1, file2]
|
176
|
+
|
177
|
+
file_paths.each {|item| @mb_obj.add_inline_image(item)}
|
178
|
+
@mb_obj.message[:inline].length.should eq(2)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
describe 'The method set_test_mode' do
|
183
|
+
before(:each) do
|
184
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
185
|
+
end
|
186
|
+
it 'turns on test mode with boolean true' do
|
187
|
+
@mb_obj.set_test_mode(true)
|
188
|
+
@mb_obj.message["o:testmode"][0].should eq ("yes")
|
189
|
+
end
|
190
|
+
it 'turns on test mode with string true' do
|
191
|
+
@mb_obj.set_test_mode("true")
|
192
|
+
@mb_obj.message["o:testmode"][0].should eq ("yes")
|
193
|
+
end
|
194
|
+
it 'turns off test mode with boolean false' do
|
195
|
+
@mb_obj.set_test_mode(false)
|
196
|
+
@mb_obj.message["o:testmode"][0].should eq ("no")
|
197
|
+
end
|
198
|
+
it 'turns off test mode with string false' do
|
199
|
+
@mb_obj.set_test_mode("false")
|
200
|
+
@mb_obj.message["o:testmode"][0].should eq ("no")
|
201
|
+
end
|
202
|
+
it 'does not allow multiple values' do
|
203
|
+
@mb_obj.set_test_mode("false")
|
204
|
+
@mb_obj.set_test_mode("true")
|
205
|
+
@mb_obj.set_test_mode("false")
|
206
|
+
@mb_obj.message["o:testmode"].length.should eq(1)
|
207
|
+
@mb_obj.message["o:testmode"][0].should eq ("no")
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
describe 'The method set_dkim' do
|
212
|
+
before(:each) do
|
213
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
214
|
+
end
|
215
|
+
it 'turns on dkim with boolean true' do
|
216
|
+
@mb_obj.set_dkim(true)
|
217
|
+
@mb_obj.message["o:dkim"][0].should eq ("yes")
|
218
|
+
end
|
219
|
+
it 'turns on dkim with string true' do
|
220
|
+
@mb_obj.set_dkim("true")
|
221
|
+
@mb_obj.message["o:dkim"][0].should eq ("yes")
|
222
|
+
end
|
223
|
+
it 'turns off dkim with boolean false' do
|
224
|
+
@mb_obj.set_dkim(false)
|
225
|
+
@mb_obj.message["o:dkim"][0].should eq ("no")
|
226
|
+
end
|
227
|
+
it 'turns off dkim with string false' do
|
228
|
+
@mb_obj.set_dkim("false")
|
229
|
+
@mb_obj.message["o:dkim"][0].should eq ("no")
|
230
|
+
end
|
231
|
+
it 'does not allow multiple values' do
|
232
|
+
@mb_obj.set_dkim("false")
|
233
|
+
@mb_obj.set_dkim("true")
|
234
|
+
@mb_obj.set_dkim("false")
|
235
|
+
@mb_obj.message["o:dkim"].length.should eq(1)
|
236
|
+
@mb_obj.message["o:dkim"][0].should eq ("no")
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
describe 'The method add_campaign_id' do
|
241
|
+
before(:each) do
|
242
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
243
|
+
end
|
244
|
+
it 'adds a campaign ID to the message' do
|
245
|
+
@mb_obj.add_campaign_id('My-Campaign-Id-1')
|
246
|
+
@mb_obj.message["o:campaign"][0].should eq ("My-Campaign-Id-1")
|
247
|
+
end
|
248
|
+
it 'adds a few more campaign IDs to the message' do
|
249
|
+
@mb_obj.add_campaign_id('My-Campaign-Id-1')
|
250
|
+
@mb_obj.add_campaign_id('My-Campaign-Id-2')
|
251
|
+
@mb_obj.add_campaign_id('My-Campaign-Id-3')
|
252
|
+
@mb_obj.message["o:campaign"][0].should eq ("My-Campaign-Id-1")
|
253
|
+
@mb_obj.message["o:campaign"][1].should eq ("My-Campaign-Id-2")
|
254
|
+
@mb_obj.message["o:campaign"][2].should eq ("My-Campaign-Id-3")
|
255
|
+
end
|
256
|
+
it 'adds too many campaign IDs to the message' do
|
257
|
+
expect{
|
258
|
+
10.times do
|
259
|
+
@mb_obj.add_campaign_id('Test-Campaign-ID')
|
260
|
+
end }.to raise_error(Mailgun::ParameterError)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
describe 'The method add_tag' do
|
265
|
+
before(:each) do
|
266
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
267
|
+
end
|
268
|
+
it 'adds a tag to the message' do
|
269
|
+
@mb_obj.add_tag('My-Tag-1')
|
270
|
+
@mb_obj.message["o:tag"][0].should eq ("My-Tag-1")
|
271
|
+
end
|
272
|
+
it 'adds a few more tags to the message' do
|
273
|
+
@mb_obj.add_tag('My-Tag-1')
|
274
|
+
@mb_obj.add_tag('My-Tag-2')
|
275
|
+
@mb_obj.add_tag('My-Tag-3')
|
276
|
+
@mb_obj.message["o:tag"][0].should eq ("My-Tag-1")
|
277
|
+
@mb_obj.message["o:tag"][1].should eq ("My-Tag-2")
|
278
|
+
@mb_obj.message["o:tag"][2].should eq ("My-Tag-3")
|
279
|
+
end
|
280
|
+
it 'adds too many tags to the message' do
|
281
|
+
expect{
|
282
|
+
10.times do
|
283
|
+
@mb_obj.add_tag('My-Tag')
|
284
|
+
end }.to raise_error(Mailgun::ParameterError)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
describe 'The method set_open_tracking' do
|
289
|
+
before(:each) do
|
290
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
291
|
+
end
|
292
|
+
it 'enables/disables open tracking on a per message basis.' do
|
293
|
+
@mb_obj.set_open_tracking('Yes')
|
294
|
+
@mb_obj.message["o:tracking-opens"][0].should eq ("yes")
|
295
|
+
@mb_obj.set_open_tracking('No')
|
296
|
+
@mb_obj.message["o:tracking-opens"][0].should eq ("no")
|
297
|
+
@mb_obj.set_open_tracking(true)
|
298
|
+
@mb_obj.message["o:tracking-opens"][0].should eq ("yes")
|
299
|
+
@mb_obj.set_open_tracking(false)
|
300
|
+
@mb_obj.message["o:tracking-opens"][0].should eq ("no")
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
describe 'The method set_click_tracking' do
|
305
|
+
before(:each) do
|
306
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
307
|
+
end
|
308
|
+
it 'enables/disables click tracking on a per message basis.' do
|
309
|
+
@mb_obj.set_click_tracking('Yes')
|
310
|
+
@mb_obj.message["o:tracking-clicks"][0].should eq ("yes")
|
311
|
+
@mb_obj.set_click_tracking('No')
|
312
|
+
@mb_obj.message["o:tracking-clicks"][0].should eq ("no")
|
313
|
+
@mb_obj.set_click_tracking(true)
|
314
|
+
@mb_obj.message["o:tracking-clicks"][0].should eq ("yes")
|
315
|
+
@mb_obj.set_click_tracking(false)
|
316
|
+
@mb_obj.message["o:tracking-clicks"][0].should eq ("no")
|
317
|
+
@mb_obj.set_click_tracking('html')
|
318
|
+
@mb_obj.message["o:tracking-clicks"][0].should eq ("html")
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
describe 'The method set_delivery_time' do
|
323
|
+
before(:each) do
|
324
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
325
|
+
end
|
326
|
+
it 'defines a time/date to deliver a message in RFC2822 format.' do
|
327
|
+
@mb_obj.set_delivery_time('October 25, 2013 10:00PM CST')
|
328
|
+
@mb_obj.message["o:deliverytime"][0].should eq ("Fri, 25 Oct 2013 22:00:00 -0600")
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
describe 'The method set_custom_data' do
|
333
|
+
before(:each) do
|
334
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
335
|
+
end
|
336
|
+
it 'accepts valid JSON and appends as data to the message.' do
|
337
|
+
@mb_obj.set_custom_data('my-data', '{"key":"value"}')
|
338
|
+
@mb_obj.message["v:my-data"][0].should eq ("{\"key\":\"value\"}")
|
339
|
+
end
|
340
|
+
it 'accepts a hash and appends as data to the message.' do
|
341
|
+
data = {'key'=> 'value'}
|
342
|
+
@mb_obj.set_custom_data('my-data', data)
|
343
|
+
@mb_obj.message["v:my-data"][0].should eq ("{\"key\":\"value\"}")
|
344
|
+
end
|
345
|
+
it 'throws an exception on broken JSON.' do
|
346
|
+
data = 'This is some crappy JSON.'
|
347
|
+
expect {@mb_obj.set_custom_data('my-data', data)}.to raise_error(Mailgun::ParameterError)
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
describe 'The method add_custom_parameter' do
|
352
|
+
before(:each) do
|
353
|
+
@mb_obj = Mailgun::MessageBuilder.new
|
354
|
+
end
|
355
|
+
it 'adds an undefined parameter to the message.' do
|
356
|
+
@mb_obj.add_custom_parameter('h:my-sweet-header', 'datagoeshere')
|
357
|
+
@mb_obj.message["h:my-sweet-header"][0].should eq ("datagoeshere")
|
358
|
+
end
|
359
|
+
end
|
Binary file
|
@@ -0,0 +1,38 @@
|
|
1
|
+
X-SBRS: 5.6
|
2
|
+
X-SenderGroup: WHITELIST
|
3
|
+
X-MailFlowPolicy: $TRUSTED
|
4
|
+
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=trstx.com; q=dns/txt; s=mx;
|
5
|
+
t=1381182797; h=Mime-Version: Content-Type: Subject: From: To:
|
6
|
+
Message-Id: Date: Sender: Content-Transfer-Encoding;
|
7
|
+
bh=r6P1omjKL3m7gDuZC6dZEJU6trgWm1IRwAJb8h4wtfg=; b=UPFaFGiuDx2yZjCmiMEji0fIXvGMNwXUsuaX4Ss9p5EUkqE25eYjeJaJZ5w5FK+t0jsUPZqu
|
8
|
+
FIH6sftQv7GBEbSktY6sv7dgv5q2yVlY8YNG7CXvUZdWmvwfQVvfL9j1RHJo9H3QpXT9c8bZ
|
9
|
+
p9rpYmqZtZEz2ZesPj4kzUaB0lU=
|
10
|
+
DomainKey-Signature: a=rsa-sha1; c=nofws; d=trstx.com; s=mx; q=dns;
|
11
|
+
h=Mime-Version: Content-Type: Subject: From: To: Message-Id: Date:
|
12
|
+
Sender: Content-Transfer-Encoding;
|
13
|
+
b=QUYQf9OP16DphNAjeF95+G7V6DaqL4FA+m1sjIEWHdLzrGTQkiYTpzJdne3lzSypB0DwaG
|
14
|
+
AT9zOhjjN64DWFOkJD2Ce5t6vfHa/GC3FCUMq3xz/Big94g+kOciawkHyUhCrmPyh/D7kWx1
|
15
|
+
J75UIAdmE9XQ9bCSPhZ2MRaOv7b8c=
|
16
|
+
Received: by luna.mailgun.net with HTTP; Mon, 07 Oct 2013 21:53:16 +0000
|
17
|
+
Content-Type: text/plain; charset="ascii"
|
18
|
+
Subject: Test Subject
|
19
|
+
From: <joe@example.com>
|
20
|
+
To: <bob@sample.com>
|
21
|
+
Message-ID: <20131007215316.27052.7818@example.com>
|
22
|
+
X-Mailgun-Sid: WyI4MzY1OSIsICJ0cmF2aXMuc3dpZW50ZWtAcmFja3NwYWasdfewNvbSIsICJjZjQ4Il0=
|
23
|
+
Date: Mon, 7 Oct 2013 21:53:17 +0000
|
24
|
+
Sender: <joe@example.com>
|
25
|
+
Content-Transfer-Encoding: 7bit
|
26
|
+
MIME-Version: 1.0
|
27
|
+
|
28
|
+
--3a8c26e9f23c4ac193606295aa17fa6f
|
29
|
+
Content-Type: text/plain; charset="ascii"
|
30
|
+
Content-Transfer-Encoding: 7bit
|
31
|
+
|
32
|
+
Testing some Mailgun awesomness!
|
33
|
+
--3a8c26e9f23c4ac193606295aa17fa6f
|
34
|
+
Content-Type: text/html; charset="ascii"
|
35
|
+
Content-Transfer-Encoding: 7bit
|
36
|
+
|
37
|
+
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">Test
|
38
|
+
--3a8c26e9f23c4ac193606295aa17fa6f--
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mailgun-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mailgun
|
8
|
+
- Travis Swientek
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.3'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.3'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rspec
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2.14'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '2.14'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rake
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '10.1'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '10.1'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rest-client
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.6'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.6'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: json
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '1.8'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.8'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: multimap
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '1.1'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '1.1'
|
98
|
+
description: This Gem allows you to interact with Mailgun's API. A few utilities are
|
99
|
+
included!
|
100
|
+
email: support@mailgunhq.com
|
101
|
+
executables: []
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files: []
|
104
|
+
files:
|
105
|
+
- .gitignore
|
106
|
+
- Gemfile
|
107
|
+
- LICENSE
|
108
|
+
- MessageBuilder.md
|
109
|
+
- Messages.md
|
110
|
+
- OptInHandler.md
|
111
|
+
- README.md
|
112
|
+
- Rakefile
|
113
|
+
- Snippets.md
|
114
|
+
- lib/mailgun.rb
|
115
|
+
- lib/mailgun/exceptions/exceptions.rb
|
116
|
+
- lib/mailgun/lists/opt_in_handler.rb
|
117
|
+
- lib/mailgun/messages/batch_message.rb
|
118
|
+
- lib/mailgun/messages/message_builder.rb
|
119
|
+
- lib/mailgun/version.rb
|
120
|
+
- mailgun.gemspec
|
121
|
+
- spec/integration/mailgun_spec.rb
|
122
|
+
- spec/integration/messages/sample_data/mime.txt
|
123
|
+
- spec/spec_helper.rb
|
124
|
+
- spec/unit/connection/test_client.rb
|
125
|
+
- spec/unit/lists/opt_in_handler_spec.rb
|
126
|
+
- spec/unit/mailgun_spec.rb
|
127
|
+
- spec/unit/messages/batch_message_spec.rb
|
128
|
+
- spec/unit/messages/message_builder_spec.rb
|
129
|
+
- spec/unit/messages/sample_data/mailgun_icon.png
|
130
|
+
- spec/unit/messages/sample_data/mime.txt
|
131
|
+
- spec/unit/messages/sample_data/rackspace_logo.jpg
|
132
|
+
homepage: http://www.mailgun.com
|
133
|
+
licenses:
|
134
|
+
- Apache
|
135
|
+
metadata: {}
|
136
|
+
post_install_message: "\n ---------------------------------------------------------------\n
|
137
|
+
\ Congrats, you've successfully installed the Mailgun SDK! \n Check out our
|
138
|
+
documentation at http://documentation.mailgun.com\n\n Contact us at support@mailgunhq.com
|
139
|
+
with any questions.\n ----------------------------------------------------------------\n
|
140
|
+
\ "
|
141
|
+
rdoc_options: []
|
142
|
+
require_paths:
|
143
|
+
- lib
|
144
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - '>='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
requirements: []
|
155
|
+
rubyforge_project:
|
156
|
+
rubygems_version: 2.1.11
|
157
|
+
signing_key:
|
158
|
+
specification_version: 4
|
159
|
+
summary: Mailgun's Official Ruby SDK
|
160
|
+
test_files:
|
161
|
+
- spec/integration/mailgun_spec.rb
|
162
|
+
- spec/integration/messages/sample_data/mime.txt
|
163
|
+
- spec/spec_helper.rb
|
164
|
+
- spec/unit/connection/test_client.rb
|
165
|
+
- spec/unit/lists/opt_in_handler_spec.rb
|
166
|
+
- spec/unit/mailgun_spec.rb
|
167
|
+
- spec/unit/messages/batch_message_spec.rb
|
168
|
+
- spec/unit/messages/message_builder_spec.rb
|
169
|
+
- spec/unit/messages/sample_data/mailgun_icon.png
|
170
|
+
- spec/unit/messages/sample_data/mime.txt
|
171
|
+
- spec/unit/messages/sample_data/rackspace_logo.jpg
|