mailgun-ruby 1.2.0 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/mailgun/client.rb +8 -5
- data/lib/mailgun/messages/batch_message.rb +1 -0
- data/lib/mailgun/messages/message_builder.rb +10 -3
- data/lib/mailgun/suppressions.rb +4 -1
- data/lib/mailgun/version.rb +1 -1
- data/lib/railgun/mailer.rb +3 -1
- data/mailgun.gemspec +1 -1
- data/spec/integration/suppressions_spec.rb +18 -2
- data/spec/unit/messages/batch_message_spec.rb +1 -0
- data/spec/unit/messages/message_builder_spec.rb +29 -9
- data/spec/unit/messages/sample_data/unknown.type +0 -0
- data/spec/unit/railgun/mailer_spec.rb +12 -0
- data/vcr_cassettes/suppressions.yml +66 -15
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fec3197ad0202b588d430e3bbbc96e822961e0213a9b45882e5f6490bd9b5bf
|
4
|
+
data.tar.gz: 8db91a5a020812f436900efb0d181baede311ed6a6d8390a28fa907a32099897
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 164c3e148cd16078ad96c2f60620720e754a412dc8ae69bb0248b1e0dc599e5f570314e5b668a356ff90e3e12e1e72879276c9ccf91901c9502ad98cf56a7781
|
7
|
+
data.tar.gz: be6d57fca9b0224ddc99a17831bef724e05a6e63dfef177c9d478bec8efefe943bf3f07886902da015474d0e5c2a33ddf797cf7ba11db1c7ce2eda8648b0ea35
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ gem install mailgun-ruby
|
|
19
19
|
Gemfile:
|
20
20
|
|
21
21
|
```ruby
|
22
|
-
gem 'mailgun-ruby', '~>1.
|
22
|
+
gem 'mailgun-ruby', '~>1.2.3'
|
23
23
|
```
|
24
24
|
|
25
25
|
Usage
|
@@ -56,6 +56,12 @@ domain = 'example.com'
|
|
56
56
|
result = mg_client.get("#{domain}/events", {:event => 'delivered'})
|
57
57
|
```
|
58
58
|
|
59
|
+
If you're using the EU domains, make sure you specify it when creating the client:
|
60
|
+
|
61
|
+
```
|
62
|
+
mg_client = Mailgun::Client.new 'your-api-key', 'api.eu.mailgun.net'
|
63
|
+
```
|
64
|
+
|
59
65
|
Rails
|
60
66
|
-----
|
61
67
|
|
@@ -74,6 +80,7 @@ and replace `api-myapikey` and `mydomain.com` with your secret API key and domai
|
|
74
80
|
config.action_mailer.mailgun_settings = {
|
75
81
|
api_key: 'api-myapikey',
|
76
82
|
domain: 'mydomain.com',
|
83
|
+
# api_host: 'api.eu.mailgun.net' # Uncomment this line for EU region domains
|
77
84
|
}
|
78
85
|
```
|
79
86
|
|
data/lib/mailgun/client.rb
CHANGED
@@ -17,12 +17,15 @@ module Mailgun
|
|
17
17
|
test_mode = false,
|
18
18
|
timeout = nil)
|
19
19
|
|
20
|
+
rest_client_params = {
|
21
|
+
user: 'api',
|
22
|
+
password: api_key,
|
23
|
+
user_agent: "mailgun-sdk-ruby/#{Mailgun::VERSION}"
|
24
|
+
}
|
25
|
+
rest_client_params[:timeout] = timeout if timeout
|
26
|
+
|
20
27
|
endpoint = endpoint_generator(api_host, api_version, ssl)
|
21
|
-
@http_client = RestClient::Resource.new(endpoint,
|
22
|
-
user: 'api',
|
23
|
-
password: api_key,
|
24
|
-
user_agent: "mailgun-sdk-ruby/#{Mailgun::VERSION}",
|
25
|
-
timeout: timeout)
|
28
|
+
@http_client = RestClient::Resource.new(endpoint, rest_client_params)
|
26
29
|
@test_mode = test_mode
|
27
30
|
end
|
28
31
|
|
@@ -111,6 +111,7 @@ module Mailgun
|
|
111
111
|
# This method resets the message object to prepare for the next batch
|
112
112
|
# of recipients.
|
113
113
|
def reset_message
|
114
|
+
@recipient_variables = {}
|
114
115
|
@message.delete('recipient-variables')
|
115
116
|
@message.delete(:to)
|
116
117
|
@message.delete(:cc)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'mime/types'
|
1
2
|
require 'time'
|
2
3
|
|
3
4
|
module Mailgun
|
@@ -197,7 +198,7 @@ module Mailgun
|
|
197
198
|
# @param [Boolean] tracking Boolean true or false.
|
198
199
|
# @return [void]
|
199
200
|
def track_opens(mode)
|
200
|
-
|
201
|
+
set_single('o:tracking-opens', bool_lookup(mode))
|
201
202
|
end
|
202
203
|
|
203
204
|
# Deprecated: 'set_open_tracking' is deprecated. Please use 'track_opens' instead.
|
@@ -211,7 +212,7 @@ module Mailgun
|
|
211
212
|
# @param [String] mode True, False, or HTML (for HTML only tracking)
|
212
213
|
# @return [void]
|
213
214
|
def track_clicks(mode)
|
214
|
-
|
215
|
+
set_single('o:tracking-clicks', bool_lookup(mode))
|
215
216
|
end
|
216
217
|
|
217
218
|
# Depreciated: 'set_click_tracking. is deprecated. Please use 'track_clicks' instead.
|
@@ -389,7 +390,7 @@ module Mailgun
|
|
389
390
|
full_name = "#{vars['first']} #{vars['last']}".strip
|
390
391
|
end
|
391
392
|
|
392
|
-
return "'#{full_name}' <#{address}>" if
|
393
|
+
return "'#{full_name}' <#{address}>" if full_name
|
393
394
|
address
|
394
395
|
end
|
395
396
|
|
@@ -409,6 +410,12 @@ module Mailgun
|
|
409
410
|
'Unable to access attachment file object.'
|
410
411
|
) unless attachment.respond_to?(:read)
|
411
412
|
|
413
|
+
if attachment.respond_to?(:path) && !attachment.respond_to?(:content_type)
|
414
|
+
mime_types = MIME::Types.type_for(attachment.path)
|
415
|
+
content_type = mime_types.empty? ? 'application/octet-stream' : mime_types[0].content_type
|
416
|
+
attachment.instance_eval "def content_type; '#{content_type}'; end"
|
417
|
+
end
|
418
|
+
|
412
419
|
unless filename.nil?
|
413
420
|
attachment.instance_variable_set :@original_filename, filename
|
414
421
|
attachment.instance_eval 'def original_filename; @original_filename; end'
|
data/lib/mailgun/suppressions.rb
CHANGED
@@ -157,7 +157,10 @@ module Mailgun
|
|
157
157
|
|
158
158
|
unsubscribe.each do |k, v|
|
159
159
|
# Hash values MUST be strings.
|
160
|
-
|
160
|
+
# However, unsubscribes contain an array of tags
|
161
|
+
if v.is_a? Array
|
162
|
+
unsubscribe[k] = v.map(&:to_s)
|
163
|
+
elsif !v.is_a? String
|
161
164
|
unsubscribe[k] = v.to_s
|
162
165
|
end
|
163
166
|
end
|
data/lib/mailgun/version.rb
CHANGED
data/lib/railgun/mailer.rb
CHANGED
@@ -32,6 +32,8 @@ module Railgun
|
|
32
32
|
config[:api_host] || 'api.mailgun.net',
|
33
33
|
config[:api_version] || 'v3',
|
34
34
|
config[:api_ssl].nil? ? true : config[:api_ssl],
|
35
|
+
false,
|
36
|
+
config[:timeout],
|
35
37
|
)
|
36
38
|
@domain = @config[:domain]
|
37
39
|
|
@@ -83,7 +85,7 @@ module Railgun
|
|
83
85
|
|
84
86
|
# o:* attributes (options)
|
85
87
|
mail.mailgun_options.try(:each) do |k, v|
|
86
|
-
message["o:#{k}"] = v
|
88
|
+
message["o:#{k}"] = v.dup
|
87
89
|
end
|
88
90
|
|
89
91
|
# support for using ActionMailer's `headers()` inside of the mailer
|
data/mailgun.gemspec
CHANGED
@@ -32,6 +32,6 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency 'vcr', '~> 3.0.3'
|
33
33
|
spec.add_development_dependency 'simplecov', '~> 0.16.1'
|
34
34
|
spec.add_development_dependency 'rails'
|
35
|
-
spec.add_dependency 'rest-client', '
|
35
|
+
spec.add_dependency 'rest-client', '>= 2.0.2'
|
36
36
|
|
37
37
|
end
|
@@ -52,7 +52,7 @@ describe 'For the suppressions handling class', order: :defined, vcr: vcr_opts d
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
it 'can batch-add unsubscribes' do
|
55
|
+
it 'can batch-add unsubscribes with tags as string' do
|
56
56
|
unsubscribes = []
|
57
57
|
@addresses.each do |addr|
|
58
58
|
unsubscribes.push({
|
@@ -69,6 +69,23 @@ describe 'For the suppressions handling class', order: :defined, vcr: vcr_opts d
|
|
69
69
|
expect(nested.length).to eq(0)
|
70
70
|
end
|
71
71
|
|
72
|
+
it 'can batch-add unsubscribes with tags as array' do
|
73
|
+
unsubscribes = []
|
74
|
+
@addresses.each do |addr|
|
75
|
+
unsubscribes.push({
|
76
|
+
:address => addr,
|
77
|
+
:tags => ['integration'],
|
78
|
+
})
|
79
|
+
end
|
80
|
+
|
81
|
+
response, nested = @suppress.create_unsubscribes unsubscribes
|
82
|
+
response.to_h!
|
83
|
+
|
84
|
+
expect(response.code).to eq(200)
|
85
|
+
expect(response.body['message']).to eq('4 addresses have been added to the unsubscribes table')
|
86
|
+
expect(nested.length).to eq(0)
|
87
|
+
end
|
88
|
+
|
72
89
|
it 'raises ParameterError if no unsubscribe[:address] is present' do
|
73
90
|
unsubscribes = []
|
74
91
|
unsubscribes.push({
|
@@ -123,4 +140,3 @@ describe 'For the suppressions handling class', order: :defined, vcr: vcr_opts d
|
|
123
140
|
|
124
141
|
# TODO: Add tests for pagination support.
|
125
142
|
end
|
126
|
-
|
@@ -95,6 +95,7 @@ describe 'The method add_recipient' do
|
|
95
95
|
expect(@mb_obj.counters[:recipients][recipient_type]).to eq(1000)
|
96
96
|
@mb_obj.finalize
|
97
97
|
|
98
|
+
expect(@mb_obj.recipient_variables).to eq({})
|
98
99
|
expect(@mb_obj.message['recipient-variables'].length).to eq(0)
|
99
100
|
expect(@mb_obj.message[:to].length).to eq(0)
|
100
101
|
expect(@mb_obj.counters[:recipients][recipient_type]).to eq(0)
|
@@ -50,6 +50,16 @@ describe 'The method add_recipient' do
|
|
50
50
|
expect(@mb_obj.counters[:recipients][recipient_type]).to eq(1)
|
51
51
|
end
|
52
52
|
|
53
|
+
context 'when variables is empty and recepeint type - "to"' do
|
54
|
+
it 'adds email address as "to" recipient type and increments counter' do
|
55
|
+
recipient_type = :to
|
56
|
+
@mb_obj.add_recipient(recipient_type, @address, {})
|
57
|
+
|
58
|
+
expect(@mb_obj.message[recipient_type][0]).to eq("#{@address}")
|
59
|
+
expect(@mb_obj.counters[:recipients][recipient_type]).to eq(1)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
53
63
|
it 'adds a "cc" recipient type to the message body and counter is incremented' do
|
54
64
|
recipient_type = :cc
|
55
65
|
@mb_obj.add_recipient(recipient_type, @address, @variables)
|
@@ -246,6 +256,16 @@ describe 'The method add_attachment' do
|
|
246
256
|
expect(@mb_obj.message[:attachment].length).to eq(1)
|
247
257
|
expect(@mb_obj.message[:attachment].first.original_filename).to eq 'mailgun_icon.png'
|
248
258
|
end
|
259
|
+
|
260
|
+
context 'when attachment has unknown type' do
|
261
|
+
it 'sets content type application/octet-stream for attachment' do
|
262
|
+
file = File.dirname(__FILE__) + "/sample_data/unknown.type"
|
263
|
+
|
264
|
+
@mb_obj.add_attachment(file)
|
265
|
+
|
266
|
+
expect(@mb_obj.message[:attachment][0].content_type).to eq('application/octet-stream')
|
267
|
+
end
|
268
|
+
end
|
249
269
|
end
|
250
270
|
|
251
271
|
describe 'The method add_inline_image' do
|
@@ -440,19 +460,19 @@ describe 'The method track_opens' do
|
|
440
460
|
it 'enables/disables open tracking on a per message basis.' do
|
441
461
|
@mb_obj.track_opens('Yes')
|
442
462
|
|
443
|
-
expect(@mb_obj.message["o:tracking-opens"]
|
463
|
+
expect(@mb_obj.message["o:tracking-opens"]).to eq("yes")
|
444
464
|
|
445
465
|
@mb_obj.track_opens('No')
|
446
466
|
|
447
|
-
expect(@mb_obj.message["o:tracking-opens"]
|
467
|
+
expect(@mb_obj.message["o:tracking-opens"]).to eq("no")
|
448
468
|
|
449
469
|
@mb_obj.track_opens(true)
|
450
470
|
|
451
|
-
expect(@mb_obj.message["o:tracking-opens"]
|
471
|
+
expect(@mb_obj.message["o:tracking-opens"]).to eq("yes")
|
452
472
|
|
453
473
|
@mb_obj.track_opens(false)
|
454
474
|
|
455
|
-
expect(@mb_obj.message["o:tracking-opens"]
|
475
|
+
expect(@mb_obj.message["o:tracking-opens"]).to eq("no")
|
456
476
|
end
|
457
477
|
end
|
458
478
|
|
@@ -471,23 +491,23 @@ describe 'The method track_clicks' do
|
|
471
491
|
it 'enables/disables click tracking on a per message basis.' do
|
472
492
|
@mb_obj.track_clicks('Yes')
|
473
493
|
|
474
|
-
expect(@mb_obj.message["o:tracking-clicks"]
|
494
|
+
expect(@mb_obj.message["o:tracking-clicks"]).to eq("yes")
|
475
495
|
|
476
496
|
@mb_obj.track_clicks('No')
|
477
497
|
|
478
|
-
expect(@mb_obj.message["o:tracking-clicks"]
|
498
|
+
expect(@mb_obj.message["o:tracking-clicks"]).to eq("no")
|
479
499
|
|
480
500
|
@mb_obj.track_clicks(true)
|
481
501
|
|
482
|
-
expect(@mb_obj.message["o:tracking-clicks"]
|
502
|
+
expect(@mb_obj.message["o:tracking-clicks"]).to eq("yes")
|
483
503
|
|
484
504
|
@mb_obj.track_clicks(false)
|
485
505
|
|
486
|
-
expect(@mb_obj.message["o:tracking-clicks"]
|
506
|
+
expect(@mb_obj.message["o:tracking-clicks"]).to eq("no")
|
487
507
|
|
488
508
|
@mb_obj.track_clicks('html')
|
489
509
|
|
490
|
-
expect(@mb_obj.message["o:tracking-clicks"]
|
510
|
+
expect(@mb_obj.message["o:tracking-clicks"]).to eq("html")
|
491
511
|
end
|
492
512
|
end
|
493
513
|
|
File without changes
|
@@ -72,6 +72,18 @@ describe 'Railgun::Mailer' do
|
|
72
72
|
expect(body['o:tracking-opens']).to eq('true')
|
73
73
|
end
|
74
74
|
|
75
|
+
it 'accepts frozen options to message body' do
|
76
|
+
message = UnitTestMailer.plain_message('test@example.org', '', {})
|
77
|
+
message.mailgun_options ||= {
|
78
|
+
'tags' => ['some-tag']
|
79
|
+
}
|
80
|
+
|
81
|
+
body = Railgun.transform_for_mailgun(message)
|
82
|
+
|
83
|
+
expect(body).to include('o:tags')
|
84
|
+
expect(body['o:tags']).to eq(['some-tag'])
|
85
|
+
end
|
86
|
+
|
75
87
|
it 'adds variables to message body' do
|
76
88
|
message = UnitTestMailer.plain_message('test@example.org', '', {})
|
77
89
|
message.mailgun_variables ||= {
|
@@ -49,7 +49,7 @@ http_interactions:
|
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
51
|
string: '{"message":"4 addresses have been added to the bounces table"}'
|
52
|
-
http_version:
|
52
|
+
http_version:
|
53
53
|
recorded_at: Wed, 30 Nov 2016 20:53:49 GMT
|
54
54
|
- request:
|
55
55
|
method: delete
|
@@ -93,7 +93,7 @@ http_interactions:
|
|
93
93
|
encoding: UTF-8
|
94
94
|
string: '{"address":"test1@example.com","message":"Bounced address has been
|
95
95
|
removed"}'
|
96
|
-
http_version:
|
96
|
+
http_version:
|
97
97
|
recorded_at: Wed, 30 Nov 2016 20:53:49 GMT
|
98
98
|
- request:
|
99
99
|
method: delete
|
@@ -137,7 +137,7 @@ http_interactions:
|
|
137
137
|
encoding: UTF-8
|
138
138
|
string: '{"address":"test2@example.org","message":"Bounced address has been
|
139
139
|
removed"}'
|
140
|
-
http_version:
|
140
|
+
http_version:
|
141
141
|
recorded_at: Wed, 30 Nov 2016 20:53:50 GMT
|
142
142
|
- request:
|
143
143
|
method: delete
|
@@ -181,7 +181,7 @@ http_interactions:
|
|
181
181
|
encoding: UTF-8
|
182
182
|
string: '{"address":"test3@example.net","message":"Bounced address has been
|
183
183
|
removed"}'
|
184
|
-
http_version:
|
184
|
+
http_version:
|
185
185
|
recorded_at: Wed, 30 Nov 2016 20:53:50 GMT
|
186
186
|
- request:
|
187
187
|
method: delete
|
@@ -225,7 +225,7 @@ http_interactions:
|
|
225
225
|
encoding: UTF-8
|
226
226
|
string: '{"address":"test4@example.info","message":"Bounced address has been
|
227
227
|
removed"}'
|
228
|
-
http_version:
|
228
|
+
http_version:
|
229
229
|
recorded_at: Wed, 30 Nov 2016 20:53:50 GMT
|
230
230
|
- request:
|
231
231
|
method: post
|
@@ -274,7 +274,7 @@ http_interactions:
|
|
274
274
|
body:
|
275
275
|
encoding: UTF-8
|
276
276
|
string: '{"message":"4 addresses have been added to the unsubscribes table"}'
|
277
|
-
http_version:
|
277
|
+
http_version:
|
278
278
|
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
279
279
|
- request:
|
280
280
|
method: delete
|
@@ -318,7 +318,7 @@ http_interactions:
|
|
318
318
|
encoding: UTF-8
|
319
319
|
string: '{"address":"test1@example.com","message":"Unsubscribe event has been
|
320
320
|
removed"}'
|
321
|
-
http_version:
|
321
|
+
http_version:
|
322
322
|
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
323
323
|
- request:
|
324
324
|
method: delete
|
@@ -362,7 +362,7 @@ http_interactions:
|
|
362
362
|
encoding: UTF-8
|
363
363
|
string: '{"address":"test2@example.org","message":"Unsubscribe event has been
|
364
364
|
removed"}'
|
365
|
-
http_version:
|
365
|
+
http_version:
|
366
366
|
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
367
367
|
- request:
|
368
368
|
method: delete
|
@@ -406,7 +406,7 @@ http_interactions:
|
|
406
406
|
encoding: UTF-8
|
407
407
|
string: '{"address":"test3@example.net","message":"Unsubscribe event has been
|
408
408
|
removed"}'
|
409
|
-
http_version:
|
409
|
+
http_version:
|
410
410
|
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
411
411
|
- request:
|
412
412
|
method: delete
|
@@ -450,7 +450,7 @@ http_interactions:
|
|
450
450
|
encoding: UTF-8
|
451
451
|
string: '{"address":"test4@example.info","message":"Unsubscribe event has been
|
452
452
|
removed"}'
|
453
|
-
http_version:
|
453
|
+
http_version:
|
454
454
|
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
455
455
|
- request:
|
456
456
|
method: post
|
@@ -498,7 +498,7 @@ http_interactions:
|
|
498
498
|
encoding: UTF-8
|
499
499
|
string: '{"message":"4 complaint addresses have been added to the complaints
|
500
500
|
table"}'
|
501
|
-
http_version:
|
501
|
+
http_version:
|
502
502
|
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
503
503
|
- request:
|
504
504
|
method: delete
|
@@ -541,7 +541,7 @@ http_interactions:
|
|
541
541
|
body:
|
542
542
|
encoding: UTF-8
|
543
543
|
string: '{"address":"test1@example.com","message":"Spam complaint has been removed"}'
|
544
|
-
http_version:
|
544
|
+
http_version:
|
545
545
|
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
546
546
|
- request:
|
547
547
|
method: delete
|
@@ -584,7 +584,7 @@ http_interactions:
|
|
584
584
|
body:
|
585
585
|
encoding: UTF-8
|
586
586
|
string: '{"address":"test2@example.org","message":"Spam complaint has been removed"}'
|
587
|
-
http_version:
|
587
|
+
http_version:
|
588
588
|
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
589
589
|
- request:
|
590
590
|
method: delete
|
@@ -627,7 +627,7 @@ http_interactions:
|
|
627
627
|
body:
|
628
628
|
encoding: UTF-8
|
629
629
|
string: '{"address":"test3@example.net","message":"Spam complaint has been removed"}'
|
630
|
-
http_version:
|
630
|
+
http_version:
|
631
631
|
recorded_at: Wed, 30 Nov 2016 20:53:53 GMT
|
632
632
|
- request:
|
633
633
|
method: delete
|
@@ -671,6 +671,57 @@ http_interactions:
|
|
671
671
|
encoding: UTF-8
|
672
672
|
string: '{"address":"test4@example.info","message":"Spam complaint has been
|
673
673
|
removed"}'
|
674
|
-
http_version:
|
674
|
+
http_version:
|
675
675
|
recorded_at: Wed, 30 Nov 2016 20:53:53 GMT
|
676
|
+
- request:
|
677
|
+
method: post
|
678
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/unsubscribes
|
679
|
+
body:
|
680
|
+
encoding: UTF-8
|
681
|
+
string: '[{"address":"test4@example.info","tag":"integration"},{"address":"test3@example.net","tag":"integration"},{"address":"test2@example.org","tag":"integration"},{"address":"test1@example.com","tag":"integration"}]'
|
682
|
+
headers:
|
683
|
+
Accept:
|
684
|
+
- "*/*"
|
685
|
+
Accept-Encoding:
|
686
|
+
- gzip, deflate
|
687
|
+
User-Agent:
|
688
|
+
- rest-client/2.0.2 (darwin18.7.0 x86_64) ruby/2.5.7p206
|
689
|
+
Content-Type:
|
690
|
+
- application/json
|
691
|
+
Content-Length:
|
692
|
+
- '210'
|
693
|
+
Host:
|
694
|
+
- api.mailgun.net
|
695
|
+
response:
|
696
|
+
status:
|
697
|
+
code: 200
|
698
|
+
message: OK
|
699
|
+
headers:
|
700
|
+
Access-Control-Allow-Headers:
|
701
|
+
- Content-Type, x-requested-with
|
702
|
+
Access-Control-Allow-Methods:
|
703
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
704
|
+
Access-Control-Allow-Origin:
|
705
|
+
- "*"
|
706
|
+
Access-Control-Max-Age:
|
707
|
+
- '600'
|
708
|
+
Content-Type:
|
709
|
+
- application/json; charset=utf-8
|
710
|
+
Date:
|
711
|
+
- Tue, 04 Feb 2020 15:16:07 GMT
|
712
|
+
Server:
|
713
|
+
- nginx
|
714
|
+
Strict-Transport-Security:
|
715
|
+
- max-age=63072000; includeSubDomains
|
716
|
+
Content-Length:
|
717
|
+
- '68'
|
718
|
+
Connection:
|
719
|
+
- keep-alive
|
720
|
+
body:
|
721
|
+
encoding: UTF-8
|
722
|
+
string: '{"message":"4 addresses have been added to the unsubscribes table"}
|
723
|
+
|
724
|
+
'
|
725
|
+
http_version:
|
726
|
+
recorded_at: Tue, 04 Feb 2020 15:16:07 GMT
|
676
727
|
recorded_with: VCR 3.0.3
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailgun-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mailgun
|
8
8
|
- Travis Swientek
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -127,14 +127,14 @@ dependencies:
|
|
127
127
|
name: rest-client
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: 2.0.2
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - "
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: 2.0.2
|
140
140
|
description: Mailgun's Official Ruby SDK for interacting with the Mailgun API.
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- spec/unit/messages/sample_data/mailgun_icon.png
|
210
210
|
- spec/unit/messages/sample_data/mime.txt
|
211
211
|
- spec/unit/messages/sample_data/rackspace_logo.jpg
|
212
|
+
- spec/unit/messages/sample_data/unknown.type
|
212
213
|
- spec/unit/railgun/content_type_spec.rb
|
213
214
|
- spec/unit/railgun/mailer_spec.rb
|
214
215
|
- vcr_cassettes/bounces.yml
|
@@ -231,7 +232,7 @@ homepage: http://www.mailgun.com
|
|
231
232
|
licenses:
|
232
233
|
- Apache-2.0
|
233
234
|
metadata: {}
|
234
|
-
post_install_message:
|
235
|
+
post_install_message:
|
235
236
|
rdoc_options: []
|
236
237
|
require_paths:
|
237
238
|
- lib
|
@@ -246,9 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
247
|
- !ruby/object:Gem::Version
|
247
248
|
version: '0'
|
248
249
|
requirements: []
|
249
|
-
|
250
|
-
|
251
|
-
signing_key:
|
250
|
+
rubygems_version: 3.0.9
|
251
|
+
signing_key:
|
252
252
|
specification_version: 4
|
253
253
|
summary: Mailgun's Official Ruby SDK
|
254
254
|
test_files:
|
@@ -277,5 +277,6 @@ test_files:
|
|
277
277
|
- spec/unit/messages/sample_data/mailgun_icon.png
|
278
278
|
- spec/unit/messages/sample_data/mime.txt
|
279
279
|
- spec/unit/messages/sample_data/rackspace_logo.jpg
|
280
|
+
- spec/unit/messages/sample_data/unknown.type
|
280
281
|
- spec/unit/railgun/content_type_spec.rb
|
281
282
|
- spec/unit/railgun/mailer_spec.rb
|