mailgun-ruby 1.4.4 → 1.4.5

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.
@@ -0,0 +1,212 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailgun.net/v1/keys
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - mailgun-sdk-ruby/1.4.5
12
+ Accept:
13
+ - "*/*"
14
+ Authorization:
15
+ - Basic xxx
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Origin:
26
+ - "*"
27
+ Cache-Control:
28
+ - no-store
29
+ Content-Length:
30
+ - '1543'
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Date:
34
+ - Fri, 26 Jun 2026 16:39:35 GMT
35
+ Strict-Transport-Security:
36
+ - max-age=63072000; includeSubDomains
37
+ X-Mailgun-Key-Id:
38
+ - xxx
39
+ X-Xss-Protection:
40
+ - 1; mode=block
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"total_count":1,"items":[{"id":"test","description":"Alex","kind":"user","role":"admin","created_at":"2024-11-27T11:45:29","updated_at":"2024-11-27T11:45:29","is_disabled":false,"domain_name":null,"requestor":null,"user_name":null}]}
44
+
45
+ '
46
+ recorded_at: Fri, 26 Jun 2026 16:39:35 GMT
47
+ - request:
48
+ method: delete
49
+ uri: https://api.mailgun.net/v1/keys/test
50
+ body:
51
+ encoding: US-ASCII
52
+ string: ''
53
+ headers:
54
+ User-Agent:
55
+ - mailgun-sdk-ruby/1.4.5
56
+ Accept:
57
+ - "*/*"
58
+ Authorization:
59
+ - Basic xxx
60
+ Accept-Encoding:
61
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
62
+ response:
63
+ status:
64
+ code: 200
65
+ message: OK
66
+ headers:
67
+ Access-Control-Allow-Credentials:
68
+ - 'true'
69
+ Access-Control-Allow-Origin:
70
+ - "*"
71
+ Cache-Control:
72
+ - no-store
73
+ Content-Length:
74
+ - '26'
75
+ Content-Type:
76
+ - application/json; charset=utf-8
77
+ Date:
78
+ - Fri, 26 Jun 2026 17:08:22 GMT
79
+ Strict-Transport-Security:
80
+ - max-age=63072000; includeSubDomains
81
+ X-Mailgun-Key-Id:
82
+ - xxx
83
+ X-Xss-Protection:
84
+ - 1; mode=block
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"message":"key deleted"}
88
+
89
+ '
90
+ recorded_at: Fri, 26 Jun 2026 17:08:22 GMT
91
+ - request:
92
+ method: post
93
+ uri: https://api.mailgun.net/v1/keys
94
+ body:
95
+ encoding: UTF-8
96
+ string: description=test+test&kind=user&role=admin
97
+ headers:
98
+ User-Agent:
99
+ - mailgun-sdk-ruby/1.4.5
100
+ Accept:
101
+ - "*/*"
102
+ Authorization:
103
+ - Basic xxx
104
+ Content-Type:
105
+ - application/x-www-form-urlencoded
106
+ Accept-Encoding:
107
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
108
+ response:
109
+ status:
110
+ code: 200
111
+ message: OK
112
+ headers:
113
+ Access-Control-Allow-Credentials:
114
+ - 'true'
115
+ Access-Control-Allow-Origin:
116
+ - "*"
117
+ Cache-Control:
118
+ - no-store
119
+ Content-Length:
120
+ - '321'
121
+ Content-Type:
122
+ - application/json; charset=utf-8
123
+ Date:
124
+ - Fri, 26 Jun 2026 17:14:08 GMT
125
+ Strict-Transport-Security:
126
+ - max-age=63072000; includeSubDomains
127
+ X-Mailgun-Key-Id:
128
+ - xxx
129
+ X-Xss-Protection:
130
+ - 1; mode=block
131
+ body:
132
+ encoding: UTF-8
133
+ string: '{"message":"great success","key":{"id":"test","description":"test test","kind":"user","role":"admin","created_at":"2026-06-26T17:14:08","updated_at":"2026-06-26T17:14:08","is_disabled":false,"domain_name":null,"requestor":null,"user_name":null,"secret":"xxx"}}
134
+
135
+ '
136
+ recorded_at: Fri, 26 Jun 2026 17:14:08 GMT
137
+ - request:
138
+ method: post
139
+ uri: https://api.mailgun.net/v1/keys/public
140
+ body:
141
+ encoding: UTF-8
142
+ string: ''
143
+ headers:
144
+ User-Agent:
145
+ - mailgun-sdk-ruby/1.4.5
146
+ Accept:
147
+ - "*/*"
148
+ Authorization:
149
+ - Basic xxx
150
+ Content-Type:
151
+ - application/x-www-form-urlencoded
152
+ Accept-Encoding:
153
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
154
+ response:
155
+ status:
156
+ code: 200
157
+ message: OK
158
+ headers:
159
+ Access-Control-Allow-Credentials:
160
+ - 'true'
161
+ Access-Control-Allow-Origin:
162
+ - "*"
163
+ Cache-Control:
164
+ - no-store
165
+ Content-Length:
166
+ - '116'
167
+ Content-Type:
168
+ - application/json; charset=utf-8
169
+ Date:
170
+ - Fri, 26 Jun 2026 17:34:40 GMT
171
+ Strict-Transport-Security:
172
+ - max-age=63072000; includeSubDomains
173
+ X-Mailgun-Key-Id:
174
+ - xxx
175
+ X-Xss-Protection:
176
+ - 1; mode=block
177
+ body:
178
+ encoding: UTF-8
179
+ string: '{"key":"pubkey-test","message":"The public
180
+ API key has been successfully regenerated."}
181
+
182
+ '
183
+ recorded_at: Fri, 26 Jun 2026 17:34:40 GMT
184
+ - request:
185
+ method: get
186
+ uri: https://api.mailgun.net/v1/keys?domain_name=DOMAIN.TEST&kind=domain
187
+ body:
188
+ encoding: US-ASCII
189
+ string: ''
190
+ headers:
191
+ User-Agent:
192
+ - mailgun-sdk-ruby/1.4.5
193
+ Accept:
194
+ - "*/*"
195
+ Authorization:
196
+ - Basic xxx
197
+ Accept-Encoding:
198
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
199
+ response:
200
+ status:
201
+ code: 200
202
+ message: OK
203
+ headers:
204
+ Content-Type:
205
+ - application/json; charset=utf-8
206
+ X-Mailgun-Key-Id:
207
+ - xxx
208
+ body:
209
+ encoding: UTF-8
210
+ string: '{"total_count":2,"items":[{"id":"test-domain","description":"test domain key","kind":"domain","role":"sending","created_at":"2026-09-29T12:00:00","updated_at":"2026-09-29T12:00:00","disabled_reason":null,"is_disabled":false,"domain_name":"DOMAIN.TEST","requestor":null,"user_name":null},{"id":"test-public","description":"public validation key","kind":"public","role":"public","created_at":"2024-11-27T11:45:29","updated_at":"2024-11-27T11:45:29","disabled_reason":null,"is_disabled":false,"domain_name":null,"requestor":null,"user_name":null}]}'
211
+ recorded_at: Tue, 29 Sep 2026 12:00:00 GMT
212
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,275 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.mailgun.net/v4/domains/DOMAIN.TEST/webhooks
6
+ body:
7
+ encoding: UTF-8
8
+ string: event_types=accepted&event_types=delivered&url=http%3A%2F%2Fexample.com%2Fmailgun%2Fevents%2Fv4
9
+ headers:
10
+ User-Agent:
11
+ - mailgun-sdk-ruby/1.4.5
12
+ Accept:
13
+ - "*/*"
14
+ Authorization:
15
+ - Basic <BASIC_AUTH>
16
+ Content-Type:
17
+ - application/x-www-form-urlencoded
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Access-Control-Allow-Credentials:
26
+ - 'true'
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Cache-Control:
30
+ - no-store
31
+ Content-Length:
32
+ - '138'
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Date:
36
+ - Tue, 29 Sep 2026 16:13:39 GMT
37
+ Strict-Transport-Security:
38
+ - max-age=63072000; includeSubDomains
39
+ X-Mailgun-Key-Id:
40
+ - 7543e985-936138f6
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"webhooks":{"accepted":{"urls":["http://example.com/mailgun/events/v4"]},"delivered":{"urls":["http://example.com/mailgun/events/v4"]}}}
46
+
47
+ '
48
+ recorded_at: Tue, 29 Sep 2026 16:13:39 GMT
49
+ - request:
50
+ method: put
51
+ uri: https://api.mailgun.net/v4/domains/DOMAIN.TEST/webhooks
52
+ body:
53
+ encoding: UTF-8
54
+ string: event_types=clicked&event_types=opened&url=http%3A%2F%2Fexample.com%2Fmailgun%2Fevents%2Fv4
55
+ headers:
56
+ User-Agent:
57
+ - mailgun-sdk-ruby/1.4.5
58
+ Accept:
59
+ - "*/*"
60
+ Authorization:
61
+ - Basic <BASIC_AUTH>
62
+ Content-Type:
63
+ - application/x-www-form-urlencoded
64
+ Accept-Encoding:
65
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
+ response:
67
+ status:
68
+ code: 200
69
+ message: OK
70
+ headers:
71
+ Access-Control-Allow-Credentials:
72
+ - 'true'
73
+ Access-Control-Allow-Origin:
74
+ - "*"
75
+ Cache-Control:
76
+ - no-store
77
+ Content-Length:
78
+ - '134'
79
+ Content-Type:
80
+ - application/json; charset=utf-8
81
+ Date:
82
+ - Tue, 29 Sep 2026 16:13:39 GMT
83
+ Strict-Transport-Security:
84
+ - max-age=63072000; includeSubDomains
85
+ X-Mailgun-Key-Id:
86
+ - 7543e985-936138f6
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ body:
90
+ encoding: UTF-8
91
+ string: '{"webhooks":{"opened":{"urls":["http://example.com/mailgun/events/v4"]},"clicked":{"urls":["http://example.com/mailgun/events/v4"]}}}
92
+
93
+ '
94
+ recorded_at: Tue, 29 Sep 2026 16:13:40 GMT
95
+ - request:
96
+ method: delete
97
+ uri: https://api.mailgun.net/v4/domains/DOMAIN.TEST/webhooks?url=http://example.com/mailgun/events/v4&url=http://example.com/mailgun/events/v4-other
98
+ body:
99
+ encoding: US-ASCII
100
+ string: ''
101
+ headers:
102
+ User-Agent:
103
+ - mailgun-sdk-ruby/1.4.5
104
+ Accept:
105
+ - "*/*"
106
+ Authorization:
107
+ - Basic <BASIC_AUTH>
108
+ Accept-Encoding:
109
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
110
+ response:
111
+ status:
112
+ code: 200
113
+ message: OK
114
+ headers:
115
+ Access-Control-Allow-Credentials:
116
+ - 'true'
117
+ Access-Control-Allow-Origin:
118
+ - "*"
119
+ Cache-Control:
120
+ - no-store
121
+ Content-Length:
122
+ - '16'
123
+ Content-Type:
124
+ - application/json; charset=utf-8
125
+ Date:
126
+ - Tue, 29 Sep 2026 16:13:40 GMT
127
+ Strict-Transport-Security:
128
+ - max-age=63072000; includeSubDomains
129
+ X-Mailgun-Key-Id:
130
+ - 7543e985-936138f6
131
+ X-Xss-Protection:
132
+ - 1; mode=block
133
+ body:
134
+ encoding: UTF-8
135
+ string: '{"webhooks":{}}
136
+
137
+ '
138
+ recorded_at: Tue, 29 Sep 2026 16:13:40 GMT
139
+ - request:
140
+ method: post
141
+ uri: https://api.mailgun.net/v4/domains/DOMAIN.TEST/webhooks
142
+ body:
143
+ encoding: UTF-8
144
+ string: event_types=accepted&event_types=delivered&url=http%3A%2F%2Fexample.com%2Fmailgun%2Fevents%2Fv4
145
+ headers:
146
+ User-Agent:
147
+ - mailgun-sdk-ruby/1.4.5
148
+ Accept:
149
+ - "*/*"
150
+ Authorization:
151
+ - Basic <BASIC_AUTH>
152
+ Content-Type:
153
+ - application/x-www-form-urlencoded
154
+ Accept-Encoding:
155
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
156
+ response:
157
+ status:
158
+ code: 404
159
+ message: Not Found
160
+ headers:
161
+ Access-Control-Allow-Credentials:
162
+ - 'true'
163
+ Access-Control-Allow-Origin:
164
+ - "*"
165
+ Cache-Control:
166
+ - no-store
167
+ Content-Length:
168
+ - '31'
169
+ Content-Type:
170
+ - application/json; charset=utf-8
171
+ Date:
172
+ - Tue, 29 Sep 2026 16:14:22 GMT
173
+ Strict-Transport-Security:
174
+ - max-age=63072000; includeSubDomains
175
+ X-Mailgun-Key-Id:
176
+ - 7543e985-936138f6
177
+ X-Xss-Protection:
178
+ - 1; mode=block
179
+ body:
180
+ encoding: UTF-8
181
+ string: '{"message":"Domain not found"}
182
+
183
+ '
184
+ recorded_at: Tue, 29 Sep 2026 16:14:22 GMT
185
+ - request:
186
+ method: put
187
+ uri: https://api.mailgun.net/v4/domains/DOMAIN.TEST/webhooks
188
+ body:
189
+ encoding: UTF-8
190
+ string: event_types=clicked&event_types=opened&url=http%3A%2F%2Fexample.com%2Fmailgun%2Fevents%2Fv4
191
+ headers:
192
+ User-Agent:
193
+ - mailgun-sdk-ruby/1.4.5
194
+ Accept:
195
+ - "*/*"
196
+ Authorization:
197
+ - Basic <BASIC_AUTH>
198
+ Content-Type:
199
+ - application/x-www-form-urlencoded
200
+ Accept-Encoding:
201
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
202
+ response:
203
+ status:
204
+ code: 404
205
+ message: Not Found
206
+ headers:
207
+ Access-Control-Allow-Credentials:
208
+ - 'true'
209
+ Access-Control-Allow-Origin:
210
+ - "*"
211
+ Cache-Control:
212
+ - no-store
213
+ Content-Length:
214
+ - '31'
215
+ Content-Type:
216
+ - application/json; charset=utf-8
217
+ Date:
218
+ - Tue, 29 Sep 2026 16:14:22 GMT
219
+ Strict-Transport-Security:
220
+ - max-age=63072000; includeSubDomains
221
+ X-Mailgun-Key-Id:
222
+ - 7543e985-936138f6
223
+ X-Xss-Protection:
224
+ - 1; mode=block
225
+ body:
226
+ encoding: UTF-8
227
+ string: '{"message":"Domain not found"}
228
+
229
+ '
230
+ recorded_at: Tue, 29 Sep 2026 16:14:22 GMT
231
+ - request:
232
+ method: delete
233
+ uri: https://api.mailgun.net/v4/domains/DOMAIN.TEST/webhooks?url=http://example.com/mailgun/events/v4&url=http://example.com/mailgun/events/v4-other
234
+ body:
235
+ encoding: US-ASCII
236
+ string: ''
237
+ headers:
238
+ User-Agent:
239
+ - mailgun-sdk-ruby/1.4.5
240
+ Accept:
241
+ - "*/*"
242
+ Authorization:
243
+ - Basic <BASIC_AUTH>
244
+ Accept-Encoding:
245
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
246
+ response:
247
+ status:
248
+ code: 404
249
+ message: Not Found
250
+ headers:
251
+ Access-Control-Allow-Credentials:
252
+ - 'true'
253
+ Access-Control-Allow-Origin:
254
+ - "*"
255
+ Cache-Control:
256
+ - no-store
257
+ Content-Length:
258
+ - '31'
259
+ Content-Type:
260
+ - application/json; charset=utf-8
261
+ Date:
262
+ - Tue, 29 Sep 2026 16:14:23 GMT
263
+ Strict-Transport-Security:
264
+ - max-age=63072000; includeSubDomains
265
+ X-Mailgun-Key-Id:
266
+ - 7543e985-936138f6
267
+ X-Xss-Protection:
268
+ - 1; mode=block
269
+ body:
270
+ encoding: UTF-8
271
+ string: '{"message":"Domain not found"}
272
+
273
+ '
274
+ recorded_at: Tue, 29 Sep 2026 16:14:23 GMT
275
+ recorded_with: VCR 6.4.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailgun-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mailgun
@@ -255,6 +255,7 @@ extensions: []
255
255
  extra_rdoc_files: []
256
256
  files:
257
257
  - ".github/workflows/ci.yml"
258
+ - ".github_changelog_generator"
258
259
  - ".gitignore"
259
260
  - ".rubocop.yml"
260
261
  - ".ruby-env.yml.example"
@@ -265,6 +266,7 @@ files:
265
266
  - Rakefile
266
267
  - docs/AccountWebhooks.md
267
268
  - docs/AnalyticsTags.md
269
+ - docs/ApiKeys.md
268
270
  - docs/DomainKeys.md
269
271
  - docs/Domains.md
270
272
  - docs/EmailValidation.md
@@ -284,6 +286,7 @@ files:
284
286
  - lib/mailgun-ruby.rb
285
287
  - lib/mailgun.rb
286
288
  - lib/mailgun/address.rb
289
+ - lib/mailgun/api_keys/api_keys.rb
287
290
  - lib/mailgun/chains.rb
288
291
  - lib/mailgun/client.rb
289
292
  - lib/mailgun/domains/domain_keys.rb
@@ -313,6 +316,7 @@ files:
313
316
  - mailgun.gemspec
314
317
  - spec/integration/account_webhooks_spec.rb
315
318
  - spec/integration/analytics_tags_spec.rb
319
+ - spec/integration/api_keys_spec.rb
316
320
  - spec/integration/bounces_spec.rb
317
321
  - spec/integration/campaign_spec.rb
318
322
  - spec/integration/complaints_spec.rb
@@ -351,9 +355,11 @@ files:
351
355
  - spec/unit/railgun/content_type_spec.rb
352
356
  - spec/unit/railgun/mailer_spec.rb
353
357
  - spec/unit/response_spec.rb
358
+ - spec/unit/webhooks_spec.rb
354
359
  - vcr_cassettes/For_the_suppressions_handling_class/creates_a_single_bounce.yml
355
360
  - vcr_cassettes/account_webhooks.yml
356
361
  - vcr_cassettes/analytics_tags.yml
362
+ - vcr_cassettes/api_keys.yml
357
363
  - vcr_cassettes/bounces.yml
358
364
  - vcr_cassettes/complaints.yml
359
365
  - vcr_cassettes/domains.todo.yml
@@ -379,6 +385,7 @@ files:
379
385
  - vcr_cassettes/templates.yml
380
386
  - vcr_cassettes/unsubscribes.yml
381
387
  - vcr_cassettes/webhooks.yml
388
+ - vcr_cassettes/webhooks_v4.yml
382
389
  homepage: https://www.mailgun.com/
383
390
  licenses:
384
391
  - Apache-2.0
@@ -399,12 +406,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
399
406
  - !ruby/object:Gem::Version
400
407
  version: '0'
401
408
  requirements: []
402
- rubygems_version: 4.0.10
409
+ rubygems_version: 4.0.3
403
410
  specification_version: 4
404
411
  summary: Mailgun's Official Ruby SDK
405
412
  test_files:
406
413
  - spec/integration/account_webhooks_spec.rb
407
414
  - spec/integration/analytics_tags_spec.rb
415
+ - spec/integration/api_keys_spec.rb
408
416
  - spec/integration/bounces_spec.rb
409
417
  - spec/integration/campaign_spec.rb
410
418
  - spec/integration/complaints_spec.rb
@@ -443,3 +451,4 @@ test_files:
443
451
  - spec/unit/railgun/content_type_spec.rb
444
452
  - spec/unit/railgun/mailer_spec.rb
445
453
  - spec/unit/response_spec.rb
454
+ - spec/unit/webhooks_spec.rb