mailgun-ruby 1.1.0 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.ruby-env.yml.example +1 -1
  4. data/.travis.yml +23 -7
  5. data/Gemfile +2 -0
  6. data/README.md +79 -18
  7. data/{Domains.md → docs/Domains.md} +18 -0
  8. data/{Events.md → docs/Events.md} +0 -0
  9. data/{MessageBuilder.md → docs/MessageBuilder.md} +32 -13
  10. data/{Messages.md → docs/Messages.md} +3 -3
  11. data/{OptInHandler.md → docs/OptInHandler.md} +0 -0
  12. data/{Snippets.md → docs/Snippets.md} +21 -2
  13. data/docs/Suppressions.md +82 -0
  14. data/{Webhooks.md → docs/Webhooks.md} +1 -1
  15. data/docs/railgun/Overview.md +11 -0
  16. data/docs/railgun/Parameters.md +83 -0
  17. data/lib/mailgun/address.rb +48 -0
  18. data/lib/mailgun/client.rb +85 -8
  19. data/lib/mailgun/events/events.rb +40 -12
  20. data/lib/mailgun/exceptions/exceptions.rb +21 -7
  21. data/lib/mailgun/lists/opt_in_handler.rb +0 -1
  22. data/lib/mailgun/messages/batch_message.rb +3 -2
  23. data/lib/mailgun/messages/message_builder.rb +139 -30
  24. data/lib/mailgun/response.rb +7 -0
  25. data/lib/mailgun/suppressions.rb +273 -0
  26. data/lib/mailgun/version.rb +1 -1
  27. data/lib/mailgun/webhooks/webhooks.rb +1 -1
  28. data/lib/mailgun-ruby.rb +2 -0
  29. data/lib/mailgun.rb +1 -0
  30. data/lib/railgun/attachment.rb +56 -0
  31. data/lib/railgun/errors.rb +27 -0
  32. data/lib/railgun/mailer.rb +253 -0
  33. data/lib/railgun/message.rb +18 -0
  34. data/lib/railgun/railtie.rb +10 -0
  35. data/lib/railgun.rb +8 -0
  36. data/mailgun.gemspec +12 -13
  37. data/spec/integration/email_validation_spec.rb +57 -15
  38. data/spec/integration/events_spec.rb +9 -1
  39. data/spec/integration/mailer_spec.rb +67 -0
  40. data/spec/integration/mailgun_spec.rb +51 -1
  41. data/spec/integration/suppressions_spec.rb +142 -0
  42. data/spec/spec_helper.rb +3 -1
  43. data/spec/unit/connection/test_client.rb +16 -0
  44. data/spec/unit/events/events_spec.rb +36 -2
  45. data/spec/unit/mailgun_spec.rb +32 -10
  46. data/spec/unit/messages/batch_message_spec.rb +56 -40
  47. data/spec/unit/messages/message_builder_spec.rb +267 -81
  48. data/spec/unit/messages/sample_data/unknown.type +0 -0
  49. data/spec/unit/railgun/content_type_spec.rb +71 -0
  50. data/spec/unit/railgun/mailer_spec.rb +388 -0
  51. data/vcr_cassettes/email_validation.yml +136 -25
  52. data/vcr_cassettes/events.yml +48 -1
  53. data/vcr_cassettes/exceptions.yml +45 -0
  54. data/vcr_cassettes/mailer_invalid_domain.yml +109 -0
  55. data/vcr_cassettes/message_deliver.yml +149 -0
  56. data/vcr_cassettes/suppressions.yml +727 -0
  57. metadata +65 -40
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.1.0
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mailgun
@@ -9,134 +9,134 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-10 00:00:00.000000000 Z
12
+ date: 2021-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '1.5'
20
+ version: 1.16.2
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '1.5'
27
+ version: 1.16.2
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '3.0'
34
+ version: 3.8.0
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '3.0'
41
+ version: 3.8.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '10.0'
48
+ version: 12.3.2
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '10.0'
55
+ version: 12.3.2
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: webmock
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '1.22'
62
+ version: 3.4.2
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '1.22'
69
+ version: 3.4.2
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: pry
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '0.9'
76
+ version: 0.11.3
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '0.9'
83
+ version: 0.11.3
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: vcr
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '3.0'
90
+ version: 3.0.3
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '3.0'
97
+ version: 3.0.3
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: simplecov
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '0.11'
104
+ version: 0.16.1
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '0.11'
111
+ version: 0.16.1
112
112
  - !ruby/object:Gem::Dependency
113
- name: rest-client
113
+ name: rails
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
- version: '1.6'
119
- type: :runtime
118
+ version: '0'
119
+ type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - "~>"
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: '1.6'
125
+ version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
- name: json
127
+ name: rest-client
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - "~>"
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
- version: '1.8'
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
- version: '1.8'
139
+ version: 2.0.2
140
140
  description: Mailgun's Official Ruby SDK for interacting with the Mailgun API.
141
141
  email: support@mailgunhq.com
142
142
  executables: []
@@ -148,18 +148,23 @@ files:
148
148
  - ".rubocop_todo.yml"
149
149
  - ".ruby-env.yml.example"
150
150
  - ".travis.yml"
151
- - Domains.md
152
- - Events.md
153
151
  - Gemfile
154
152
  - LICENSE
155
- - MessageBuilder.md
156
- - Messages.md
157
- - OptInHandler.md
158
153
  - README.md
159
154
  - Rakefile
160
- - Snippets.md
161
- - Webhooks.md
155
+ - docs/Domains.md
156
+ - docs/Events.md
157
+ - docs/MessageBuilder.md
158
+ - docs/Messages.md
159
+ - docs/OptInHandler.md
160
+ - docs/Snippets.md
161
+ - docs/Suppressions.md
162
+ - docs/Webhooks.md
163
+ - docs/railgun/Overview.md
164
+ - docs/railgun/Parameters.md
165
+ - lib/mailgun-ruby.rb
162
166
  - lib/mailgun.rb
167
+ - lib/mailgun/address.rb
163
168
  - lib/mailgun/chains.rb
164
169
  - lib/mailgun/client.rb
165
170
  - lib/mailgun/domains/domains.rb
@@ -169,8 +174,15 @@ files:
169
174
  - lib/mailgun/messages/batch_message.rb
170
175
  - lib/mailgun/messages/message_builder.rb
171
176
  - lib/mailgun/response.rb
177
+ - lib/mailgun/suppressions.rb
172
178
  - lib/mailgun/version.rb
173
179
  - lib/mailgun/webhooks/webhooks.rb
180
+ - lib/railgun.rb
181
+ - lib/railgun/attachment.rb
182
+ - lib/railgun/errors.rb
183
+ - lib/railgun/mailer.rb
184
+ - lib/railgun/message.rb
185
+ - lib/railgun/railtie.rb
174
186
  - mailgun.gemspec
175
187
  - spec/integration/bounces_spec.rb
176
188
  - spec/integration/campaign_spec.rb
@@ -180,10 +192,12 @@ files:
180
192
  - spec/integration/events_spec.rb
181
193
  - spec/integration/list_members_spec.rb
182
194
  - spec/integration/list_spec.rb
195
+ - spec/integration/mailer_spec.rb
183
196
  - spec/integration/mailgun_spec.rb
184
197
  - spec/integration/messages/sample_data/mime.txt
185
198
  - spec/integration/routes_spec.rb
186
199
  - spec/integration/stats_spec.rb
200
+ - spec/integration/suppressions_spec.rb
187
201
  - spec/integration/unsubscribes_spec.rb
188
202
  - spec/integration/webhook_spec.rb
189
203
  - spec/spec_helper.rb
@@ -196,23 +210,30 @@ files:
196
210
  - spec/unit/messages/sample_data/mailgun_icon.png
197
211
  - spec/unit/messages/sample_data/mime.txt
198
212
  - spec/unit/messages/sample_data/rackspace_logo.jpg
213
+ - spec/unit/messages/sample_data/unknown.type
214
+ - spec/unit/railgun/content_type_spec.rb
215
+ - spec/unit/railgun/mailer_spec.rb
199
216
  - vcr_cassettes/bounces.yml
200
217
  - vcr_cassettes/complaints.yml
201
218
  - vcr_cassettes/domains.todo.yml
202
219
  - vcr_cassettes/domains.yml
203
220
  - vcr_cassettes/email_validation.yml
204
221
  - vcr_cassettes/events.yml
222
+ - vcr_cassettes/exceptions.yml
205
223
  - vcr_cassettes/list_members.yml
224
+ - vcr_cassettes/mailer_invalid_domain.yml
206
225
  - vcr_cassettes/mailing_list.todo.yml
207
226
  - vcr_cassettes/mailing_list.yml
227
+ - vcr_cassettes/message_deliver.yml
208
228
  - vcr_cassettes/routes.yml
209
229
  - vcr_cassettes/send_message.yml
210
230
  - vcr_cassettes/stats.yml
231
+ - vcr_cassettes/suppressions.yml
211
232
  - vcr_cassettes/unsubscribes.yml
212
233
  - vcr_cassettes/webhooks.yml
213
234
  homepage: http://www.mailgun.com
214
235
  licenses:
215
- - Apache
236
+ - Apache-2.0
216
237
  metadata: {}
217
238
  post_install_message:
218
239
  rdoc_options: []
@@ -222,15 +243,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
243
  requirements:
223
244
  - - ">="
224
245
  - !ruby/object:Gem::Version
225
- version: 1.9.3
246
+ version: 2.2.2
226
247
  required_rubygems_version: !ruby/object:Gem::Requirement
227
248
  requirements:
228
249
  - - ">="
229
250
  - !ruby/object:Gem::Version
230
251
  version: '0'
231
252
  requirements: []
232
- rubyforge_project:
233
- rubygems_version: 2.4.6
253
+ rubygems_version: 3.0.3
234
254
  signing_key:
235
255
  specification_version: 4
236
256
  summary: Mailgun's Official Ruby SDK
@@ -243,10 +263,12 @@ test_files:
243
263
  - spec/integration/events_spec.rb
244
264
  - spec/integration/list_members_spec.rb
245
265
  - spec/integration/list_spec.rb
266
+ - spec/integration/mailer_spec.rb
246
267
  - spec/integration/mailgun_spec.rb
247
268
  - spec/integration/messages/sample_data/mime.txt
248
269
  - spec/integration/routes_spec.rb
249
270
  - spec/integration/stats_spec.rb
271
+ - spec/integration/suppressions_spec.rb
250
272
  - spec/integration/unsubscribes_spec.rb
251
273
  - spec/integration/webhook_spec.rb
252
274
  - spec/spec_helper.rb
@@ -259,3 +281,6 @@ test_files:
259
281
  - spec/unit/messages/sample_data/mailgun_icon.png
260
282
  - spec/unit/messages/sample_data/mime.txt
261
283
  - spec/unit/messages/sample_data/rackspace_logo.jpg
284
+ - spec/unit/messages/sample_data/unknown.type
285
+ - spec/unit/railgun/content_type_spec.rb
286
+ - spec/unit/railgun/mailer_spec.rb