mailgun-ruby 1.2.13 → 1.2.14
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 +4 -4
- data/CHANGELOG.md +22 -2
- data/README.md +1 -1
- data/docs/Domains.md +1 -1
- data/docs/Events.md +1 -1
- data/docs/MessageBuilder.md +1 -1
- data/docs/Messages.md +1 -1
- data/docs/OptInHandler.md +1 -1
- data/docs/Snippets.md +1 -1
- data/docs/Webhooks.md +1 -1
- data/lib/mailgun/client.rb +12 -2
- data/lib/mailgun/domains/domains.rb +229 -1
- data/lib/mailgun/messages/message_builder.rb +8 -0
- data/lib/mailgun/tags/tags.rb +120 -0
- data/lib/mailgun/version.rb +1 -1
- data/lib/mailgun/webhooks/webhooks.rb +20 -4
- data/lib/mailgun.rb +1 -0
- data/lib/railgun/mailer.rb +29 -0
- data/spec/integration/domains_spec.rb +244 -0
- data/spec/integration/events_spec.rb +1 -1
- data/spec/integration/mailer_spec.rb +2 -8
- data/spec/integration/tags.rb +139 -0
- data/spec/integration/webhook_spec.rb +10 -10
- data/spec/unit/messages/message_builder_spec.rb +11 -0
- data/spec/unit/railgun/content_type_spec.rb +17 -0
- data/vcr_cassettes/domains.yml +1068 -1
- data/vcr_cassettes/tags.yml +417 -0
- data/vcr_cassettes/webhooks.yml +156 -186
- metadata +6 -2
data/vcr_cassettes/webhooks.yml
CHANGED
@@ -2,275 +2,245 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://api
|
5
|
+
uri: https://api.mailgun.net/v3/domains/DOMAIN.TEST/webhooks
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string: id=
|
7
|
+
encoding: UTF-8
|
8
|
+
string: id=accepted&url=http%3A%2F%2Fexample.com%2Fmailgun%2Fevents%2Faccepted
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
|
-
- "
|
12
|
-
|
13
|
-
-
|
11
|
+
- "*/*"
|
12
|
+
User-Agent:
|
13
|
+
- rest-client/2.1.0 (darwin21.6.0 x86_64) ruby/2.5.1p57
|
14
14
|
Content-Length:
|
15
|
-
- '
|
15
|
+
- '70'
|
16
16
|
Content-Type:
|
17
17
|
- application/x-www-form-urlencoded
|
18
|
-
|
19
|
-
-
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
Host:
|
21
|
+
- api.mailgun.net
|
22
|
+
Authorization:
|
23
|
+
- Basic YXBpOmFjZWM0YzA1YjFmMmZjZWJjZjY4ZGE2NDVkYTAwMjMxLTQxM2UzNzNjLTBhYWQzYzM3
|
20
24
|
response:
|
21
25
|
status:
|
22
26
|
code: 200
|
23
27
|
message: OK
|
24
28
|
headers:
|
25
|
-
|
26
|
-
-
|
27
|
-
Date:
|
28
|
-
- Fri, 08 Jan 2016 19:05:55 GMT
|
29
|
-
Content-Type:
|
30
|
-
- application/json
|
31
|
-
Content-Length:
|
32
|
-
- '117'
|
33
|
-
Connection:
|
34
|
-
- keep-alive
|
35
|
-
Content-Disposition:
|
36
|
-
- inline
|
29
|
+
Access-Control-Allow-Credentials:
|
30
|
+
- 'true'
|
37
31
|
Access-Control-Allow-Origin:
|
38
32
|
- "*"
|
39
|
-
-
|
40
|
-
|
41
|
-
-
|
42
|
-
- '
|
43
|
-
|
44
|
-
-
|
45
|
-
|
46
|
-
|
47
|
-
-
|
48
|
-
-
|
33
|
+
Cache-Control:
|
34
|
+
- no-store
|
35
|
+
Content-Length:
|
36
|
+
- '105'
|
37
|
+
Content-Type:
|
38
|
+
- application/json; charset=utf-8
|
39
|
+
Date:
|
40
|
+
- Sun, 05 Nov 2023 15:35:13 GMT
|
41
|
+
Strict-Transport-Security:
|
42
|
+
- max-age=63072000; includeSubDomains
|
43
|
+
X-Mailgun-Key-Id:
|
44
|
+
- 413e373c-0aad3c37
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
49
47
|
body:
|
50
48
|
encoding: UTF-8
|
51
|
-
string:
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
}
|
57
|
-
}
|
58
|
-
http_version:
|
59
|
-
recorded_at: Fri, 08 Jan 2016 19:05:55 GMT
|
49
|
+
string: '{"message":"Webhook has been created","webhook":{"urls":["http://example.com/mailgun/events/accepted"]}}
|
50
|
+
|
51
|
+
'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Sun, 05 Nov 2023 15:35:13 GMT
|
60
54
|
- request:
|
61
55
|
method: get
|
62
|
-
uri: https://api
|
56
|
+
uri: https://api.mailgun.net/v3/domains/DOMAIN.TEST/webhooks/accepted
|
63
57
|
body:
|
64
58
|
encoding: US-ASCII
|
65
59
|
string: ''
|
66
60
|
headers:
|
67
61
|
Accept:
|
68
62
|
- "*/*"
|
69
|
-
Accept-Encoding:
|
70
|
-
- gzip, deflate
|
71
63
|
User-Agent:
|
72
|
-
-
|
64
|
+
- rest-client/2.1.0 (darwin21.6.0 x86_64) ruby/2.5.1p57
|
65
|
+
Accept-Encoding:
|
66
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
67
|
+
Host:
|
68
|
+
- api.mailgun.net
|
69
|
+
Authorization:
|
70
|
+
- Basic YXBpOmFjZWM0YzA1YjFmMmZjZWJjZjY4ZGE2NDVkYTAwMjMxLTQxM2UzNzNjLTBhYWQzYzM3
|
73
71
|
response:
|
74
72
|
status:
|
75
73
|
code: 200
|
76
74
|
message: OK
|
77
75
|
headers:
|
78
|
-
|
79
|
-
-
|
80
|
-
Date:
|
81
|
-
- Fri, 08 Jan 2016 19:05:55 GMT
|
82
|
-
Content-Type:
|
83
|
-
- application/json
|
84
|
-
Content-Length:
|
85
|
-
- '76'
|
86
|
-
Connection:
|
87
|
-
- keep-alive
|
88
|
-
Content-Disposition:
|
89
|
-
- inline
|
76
|
+
Access-Control-Allow-Credentials:
|
77
|
+
- 'true'
|
90
78
|
Access-Control-Allow-Origin:
|
91
79
|
- "*"
|
92
|
-
-
|
93
|
-
|
94
|
-
-
|
95
|
-
- '
|
96
|
-
|
97
|
-
-
|
98
|
-
|
99
|
-
|
100
|
-
-
|
101
|
-
-
|
80
|
+
Cache-Control:
|
81
|
+
- no-store
|
82
|
+
Content-Length:
|
83
|
+
- '68'
|
84
|
+
Content-Type:
|
85
|
+
- application/json; charset=utf-8
|
86
|
+
Date:
|
87
|
+
- Sun, 05 Nov 2023 15:35:14 GMT
|
88
|
+
Strict-Transport-Security:
|
89
|
+
- max-age=63072000; includeSubDomains
|
90
|
+
X-Mailgun-Key-Id:
|
91
|
+
- 413e373c-0aad3c37
|
92
|
+
X-Xss-Protection:
|
93
|
+
- 1; mode=block
|
102
94
|
body:
|
103
95
|
encoding: UTF-8
|
104
|
-
string:
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
}
|
110
|
-
http_version:
|
111
|
-
recorded_at: Fri, 08 Jan 2016 19:05:56 GMT
|
96
|
+
string: '{"webhook":{"urls":["http://example.com/mailgun/events/accepted"]}}
|
97
|
+
|
98
|
+
'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Sun, 05 Nov 2023 15:35:14 GMT
|
112
101
|
- request:
|
113
102
|
method: get
|
114
|
-
uri: https://api
|
103
|
+
uri: https://api.mailgun.net/v3/domains/DOMAIN.TEST/webhooks
|
115
104
|
body:
|
116
105
|
encoding: US-ASCII
|
117
106
|
string: ''
|
118
107
|
headers:
|
119
108
|
Accept:
|
120
109
|
- "*/*"
|
121
|
-
Accept-Encoding:
|
122
|
-
- gzip, deflate
|
123
110
|
User-Agent:
|
124
|
-
-
|
111
|
+
- rest-client/2.1.0 (darwin21.6.0 x86_64) ruby/2.5.1p57
|
112
|
+
Accept-Encoding:
|
113
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
114
|
+
Host:
|
115
|
+
- api.mailgun.net
|
116
|
+
Authorization:
|
117
|
+
- Basic YXBpOmFjZWM0YzA1YjFmMmZjZWJjZjY4ZGE2NDVkYTAwMjMxLTQxM2UzNzNjLTBhYWQzYzM3
|
125
118
|
response:
|
126
119
|
status:
|
127
120
|
code: 200
|
128
121
|
message: OK
|
129
122
|
headers:
|
130
|
-
|
131
|
-
-
|
132
|
-
Date:
|
133
|
-
- Fri, 08 Jan 2016 19:05:56 GMT
|
134
|
-
Content-Type:
|
135
|
-
- application/json
|
136
|
-
Content-Length:
|
137
|
-
- '101'
|
138
|
-
Connection:
|
139
|
-
- keep-alive
|
140
|
-
Content-Disposition:
|
141
|
-
- inline
|
123
|
+
Access-Control-Allow-Credentials:
|
124
|
+
- 'true'
|
142
125
|
Access-Control-Allow-Origin:
|
143
126
|
- "*"
|
144
|
-
-
|
145
|
-
|
146
|
-
-
|
147
|
-
- '
|
148
|
-
|
149
|
-
-
|
150
|
-
|
151
|
-
|
152
|
-
-
|
153
|
-
-
|
127
|
+
Cache-Control:
|
128
|
+
- no-store
|
129
|
+
Content-Length:
|
130
|
+
- '163'
|
131
|
+
Content-Type:
|
132
|
+
- application/json; charset=utf-8
|
133
|
+
Date:
|
134
|
+
- Sun, 05 Nov 2023 15:35:15 GMT
|
135
|
+
Strict-Transport-Security:
|
136
|
+
- max-age=63072000; includeSubDomains
|
137
|
+
X-Mailgun-Key-Id:
|
138
|
+
- 413e373c-0aad3c37
|
139
|
+
X-Xss-Protection:
|
140
|
+
- 1; mode=block
|
154
141
|
body:
|
155
142
|
encoding: UTF-8
|
156
|
-
string:
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
}
|
162
|
-
}
|
163
|
-
}
|
164
|
-
http_version:
|
165
|
-
recorded_at: Fri, 08 Jan 2016 19:05:56 GMT
|
143
|
+
string: '{"webhooks":{"accepted":{"urls":["http://example.com/mailgun/events/accepted"]},"clicked":{"urls":["https://webhook.site/096cdc2e-e460-450c-a008-36d6f0db71f4"]}}}
|
144
|
+
|
145
|
+
'
|
146
|
+
http_version:
|
147
|
+
recorded_at: Sun, 05 Nov 2023 15:35:14 GMT
|
166
148
|
- request:
|
167
149
|
method: put
|
168
|
-
uri: https://api
|
150
|
+
uri: https://api.mailgun.net/v3/domains/DOMAIN.TEST/webhooks/accepted
|
169
151
|
body:
|
170
|
-
encoding:
|
171
|
-
string: id=
|
152
|
+
encoding: UTF-8
|
153
|
+
string: id=accepted&url=http%3A%2F%2Fexample.com%2Fmailgun%2Fevents%2Faccepted
|
172
154
|
headers:
|
173
155
|
Accept:
|
174
|
-
- "
|
175
|
-
|
176
|
-
-
|
156
|
+
- "*/*"
|
157
|
+
User-Agent:
|
158
|
+
- rest-client/2.1.0 (darwin21.6.0 x86_64) ruby/2.5.1p57
|
177
159
|
Content-Length:
|
178
160
|
- '70'
|
179
161
|
Content-Type:
|
180
162
|
- application/x-www-form-urlencoded
|
181
|
-
|
182
|
-
-
|
163
|
+
Accept-Encoding:
|
164
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
165
|
+
Host:
|
166
|
+
- api.mailgun.net
|
167
|
+
Authorization:
|
168
|
+
- Basic YXBpOmFjZWM0YzA1YjFmMmZjZWJjZjY4ZGE2NDVkYTAwMjMxLTQxM2UzNzNjLTBhYWQzYzM3
|
183
169
|
response:
|
184
170
|
status:
|
185
171
|
code: 200
|
186
172
|
message: OK
|
187
173
|
headers:
|
188
|
-
|
189
|
-
-
|
190
|
-
Date:
|
191
|
-
- Fri, 08 Jan 2016 19:05:56 GMT
|
192
|
-
Content-Type:
|
193
|
-
- application/json
|
194
|
-
Content-Length:
|
195
|
-
- '121'
|
196
|
-
Connection:
|
197
|
-
- keep-alive
|
198
|
-
Content-Disposition:
|
199
|
-
- inline
|
174
|
+
Access-Control-Allow-Credentials:
|
175
|
+
- 'true'
|
200
176
|
Access-Control-Allow-Origin:
|
201
177
|
- "*"
|
202
|
-
-
|
203
|
-
|
204
|
-
-
|
205
|
-
- '
|
206
|
-
|
207
|
-
-
|
208
|
-
|
209
|
-
|
210
|
-
-
|
211
|
-
-
|
178
|
+
Cache-Control:
|
179
|
+
- no-store
|
180
|
+
Content-Length:
|
181
|
+
- '105'
|
182
|
+
Content-Type:
|
183
|
+
- application/json; charset=utf-8
|
184
|
+
Date:
|
185
|
+
- Sun, 05 Nov 2023 15:35:15 GMT
|
186
|
+
Strict-Transport-Security:
|
187
|
+
- max-age=63072000; includeSubDomains
|
188
|
+
X-Mailgun-Key-Id:
|
189
|
+
- 413e373c-0aad3c37
|
190
|
+
X-Xss-Protection:
|
191
|
+
- 1; mode=block
|
212
192
|
body:
|
213
193
|
encoding: UTF-8
|
214
|
-
string:
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
}
|
220
|
-
}
|
221
|
-
http_version:
|
222
|
-
recorded_at: Fri, 08 Jan 2016 19:05:56 GMT
|
194
|
+
string: '{"message":"Webhook has been updated","webhook":{"urls":["http://example.com/mailgun/events/accepted"]}}
|
195
|
+
|
196
|
+
'
|
197
|
+
http_version:
|
198
|
+
recorded_at: Sun, 05 Nov 2023 15:35:15 GMT
|
223
199
|
- request:
|
224
200
|
method: delete
|
225
|
-
uri: https://api
|
201
|
+
uri: https://api.mailgun.net/v3/domains/DOMAIN.TEST/webhooks/accepted
|
226
202
|
body:
|
227
203
|
encoding: US-ASCII
|
228
204
|
string: ''
|
229
205
|
headers:
|
230
206
|
Accept:
|
231
|
-
- "
|
232
|
-
Accept-Encoding:
|
233
|
-
- gzip, deflate
|
207
|
+
- "*/*"
|
234
208
|
User-Agent:
|
235
|
-
-
|
209
|
+
- rest-client/2.1.0 (darwin21.6.0 x86_64) ruby/2.5.1p57
|
210
|
+
Accept-Encoding:
|
211
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
212
|
+
Host:
|
213
|
+
- api.mailgun.net
|
214
|
+
Authorization:
|
215
|
+
- Basic YXBpOmFjZWM0YzA1YjFmMmZjZWJjZjY4ZGE2NDVkYTAwMjMxLTQxM2UzNzNjLTBhYWQzYzM3
|
236
216
|
response:
|
237
217
|
status:
|
238
218
|
code: 200
|
239
219
|
message: OK
|
240
220
|
headers:
|
241
|
-
|
242
|
-
-
|
243
|
-
Date:
|
244
|
-
- Fri, 08 Jan 2016 19:05:56 GMT
|
245
|
-
Content-Type:
|
246
|
-
- application/json
|
247
|
-
Content-Length:
|
248
|
-
- '121'
|
249
|
-
Connection:
|
250
|
-
- keep-alive
|
251
|
-
Content-Disposition:
|
252
|
-
- inline
|
221
|
+
Access-Control-Allow-Credentials:
|
222
|
+
- 'true'
|
253
223
|
Access-Control-Allow-Origin:
|
254
224
|
- "*"
|
255
|
-
-
|
256
|
-
|
257
|
-
-
|
258
|
-
- '
|
259
|
-
|
260
|
-
-
|
261
|
-
|
262
|
-
|
263
|
-
-
|
264
|
-
-
|
225
|
+
Cache-Control:
|
226
|
+
- no-store
|
227
|
+
Content-Length:
|
228
|
+
- '105'
|
229
|
+
Content-Type:
|
230
|
+
- application/json; charset=utf-8
|
231
|
+
Date:
|
232
|
+
- Sun, 05 Nov 2023 15:35:16 GMT
|
233
|
+
Strict-Transport-Security:
|
234
|
+
- max-age=63072000; includeSubDomains
|
235
|
+
X-Mailgun-Key-Id:
|
236
|
+
- 413e373c-0aad3c37
|
237
|
+
X-Xss-Protection:
|
238
|
+
- 1; mode=block
|
265
239
|
body:
|
266
240
|
encoding: UTF-8
|
267
|
-
string:
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
}
|
274
|
-
http_version:
|
275
|
-
recorded_at: Fri, 08 Jan 2016 19:05:57 GMT
|
276
|
-
recorded_with: VCR 3.0.1
|
241
|
+
string: '{"message":"Webhook has been deleted","webhook":{"urls":["http://example.com/mailgun/events/accepted"]}}
|
242
|
+
|
243
|
+
'
|
244
|
+
http_version:
|
245
|
+
recorded_at: Sun, 05 Nov 2023 15:35:16 GMT
|
246
|
+
recorded_with: VCR 3.0.3
|
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.2.
|
4
|
+
version: 1.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mailgun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- lib/mailgun/response.rb
|
182
182
|
- lib/mailgun/subaccounts/subaccounts.rb
|
183
183
|
- lib/mailgun/suppressions.rb
|
184
|
+
- lib/mailgun/tags/tags.rb
|
184
185
|
- lib/mailgun/templates/templates.rb
|
185
186
|
- lib/mailgun/version.rb
|
186
187
|
- lib/mailgun/webhooks/webhooks.rb
|
@@ -206,6 +207,7 @@ files:
|
|
206
207
|
- spec/integration/stats_spec.rb
|
207
208
|
- spec/integration/subaccounts_spec.rb
|
208
209
|
- spec/integration/suppressions_spec.rb
|
210
|
+
- spec/integration/tags.rb
|
209
211
|
- spec/integration/templates_spec.rb
|
210
212
|
- spec/integration/unsubscribes_spec.rb
|
211
213
|
- spec/integration/webhook_spec.rb
|
@@ -242,6 +244,7 @@ files:
|
|
242
244
|
- vcr_cassettes/stats.yml
|
243
245
|
- vcr_cassettes/subaccounts.yml
|
244
246
|
- vcr_cassettes/suppressions.yml
|
247
|
+
- vcr_cassettes/tags.yml
|
245
248
|
- vcr_cassettes/templates.yml
|
246
249
|
- vcr_cassettes/unsubscribes.yml
|
247
250
|
- vcr_cassettes/webhooks.yml
|
@@ -287,6 +290,7 @@ test_files:
|
|
287
290
|
- spec/integration/stats_spec.rb
|
288
291
|
- spec/integration/subaccounts_spec.rb
|
289
292
|
- spec/integration/suppressions_spec.rb
|
293
|
+
- spec/integration/tags.rb
|
290
294
|
- spec/integration/templates_spec.rb
|
291
295
|
- spec/integration/unsubscribes_spec.rb
|
292
296
|
- spec/integration/webhook_spec.rb
|