mailgun-ruby 1.1.2 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-env.yml.example +1 -1
  3. data/.travis.yml +8 -5
  4. data/Gemfile +1 -1
  5. data/README.md +77 -9
  6. data/{Domains.md → docs/Domains.md} +18 -0
  7. data/{Events.md → docs/Events.md} +0 -0
  8. data/{MessageBuilder.md → docs/MessageBuilder.md} +24 -5
  9. data/{Messages.md → docs/Messages.md} +3 -3
  10. data/{OptInHandler.md → docs/OptInHandler.md} +0 -0
  11. data/{Snippets.md → docs/Snippets.md} +21 -2
  12. data/docs/Suppressions.md +82 -0
  13. data/{Webhooks.md → docs/Webhooks.md} +1 -1
  14. data/docs/railgun/Overview.md +11 -0
  15. data/docs/railgun/Parameters.md +83 -0
  16. data/lib/mailgun/address.rb +5 -2
  17. data/lib/mailgun/client.rb +39 -8
  18. data/lib/mailgun/events/events.rb +40 -12
  19. data/lib/mailgun/messages/batch_message.rb +3 -2
  20. data/lib/mailgun/messages/message_builder.rb +99 -26
  21. data/lib/mailgun/suppressions.rb +273 -0
  22. data/lib/mailgun/version.rb +1 -1
  23. data/lib/mailgun/webhooks/webhooks.rb +1 -1
  24. data/lib/mailgun-ruby.rb +2 -1
  25. data/lib/railgun/attachment.rb +56 -0
  26. data/lib/railgun/errors.rb +27 -0
  27. data/lib/railgun/mailer.rb +237 -0
  28. data/lib/railgun/message.rb +17 -0
  29. data/lib/railgun/railtie.rb +10 -0
  30. data/lib/railgun.rb +8 -0
  31. data/mailgun.gemspec +12 -12
  32. data/spec/integration/email_validation_spec.rb +14 -0
  33. data/spec/integration/events_spec.rb +9 -1
  34. data/spec/integration/mailgun_spec.rb +0 -0
  35. data/spec/integration/suppressions_spec.rb +142 -0
  36. data/spec/spec_helper.rb +3 -1
  37. data/spec/unit/events/events_spec.rb +36 -2
  38. data/spec/unit/messages/batch_message_spec.rb +1 -0
  39. data/spec/unit/messages/message_builder_spec.rb +95 -19
  40. data/spec/unit/messages/sample_data/unknown.type +0 -0
  41. data/spec/unit/railgun/content_type_spec.rb +71 -0
  42. data/spec/unit/railgun/mailer_spec.rb +242 -0
  43. data/vcr_cassettes/email_validation.yml +57 -9
  44. data/vcr_cassettes/events.yml +48 -1
  45. data/vcr_cassettes/suppressions.yml +727 -0
  46. metadata +68 -36
metadata CHANGED
@@ -1,128 +1,142 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailgun-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.4
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: 2016-11-11 00:00:00.000000000 Z
12
+ date: 2021-04-05 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
+ - !ruby/object:Gem::Dependency
113
+ name: rails
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: rest-client
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
- - - "~>"
130
+ - - ">="
117
131
  - !ruby/object:Gem::Version
118
- version: '2.0'
132
+ version: 2.0.2
119
133
  type: :runtime
120
134
  prerelease: false
121
135
  version_requirements: !ruby/object:Gem::Requirement
122
136
  requirements:
123
- - - "~>"
137
+ - - ">="
124
138
  - !ruby/object:Gem::Version
125
- version: '2.0'
139
+ version: 2.0.2
126
140
  description: Mailgun's Official Ruby SDK for interacting with the Mailgun API.
127
141
  email: support@mailgunhq.com
128
142
  executables: []
@@ -134,17 +148,20 @@ files:
134
148
  - ".rubocop_todo.yml"
135
149
  - ".ruby-env.yml.example"
136
150
  - ".travis.yml"
137
- - Domains.md
138
- - Events.md
139
151
  - Gemfile
140
152
  - LICENSE
141
- - MessageBuilder.md
142
- - Messages.md
143
- - OptInHandler.md
144
153
  - README.md
145
154
  - Rakefile
146
- - Snippets.md
147
- - 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
148
165
  - lib/mailgun-ruby.rb
149
166
  - lib/mailgun.rb
150
167
  - lib/mailgun/address.rb
@@ -157,8 +174,15 @@ files:
157
174
  - lib/mailgun/messages/batch_message.rb
158
175
  - lib/mailgun/messages/message_builder.rb
159
176
  - lib/mailgun/response.rb
177
+ - lib/mailgun/suppressions.rb
160
178
  - lib/mailgun/version.rb
161
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
162
186
  - mailgun.gemspec
163
187
  - spec/integration/bounces_spec.rb
164
188
  - spec/integration/campaign_spec.rb
@@ -172,6 +196,7 @@ files:
172
196
  - spec/integration/messages/sample_data/mime.txt
173
197
  - spec/integration/routes_spec.rb
174
198
  - spec/integration/stats_spec.rb
199
+ - spec/integration/suppressions_spec.rb
175
200
  - spec/integration/unsubscribes_spec.rb
176
201
  - spec/integration/webhook_spec.rb
177
202
  - spec/spec_helper.rb
@@ -184,6 +209,9 @@ files:
184
209
  - spec/unit/messages/sample_data/mailgun_icon.png
185
210
  - spec/unit/messages/sample_data/mime.txt
186
211
  - spec/unit/messages/sample_data/rackspace_logo.jpg
212
+ - spec/unit/messages/sample_data/unknown.type
213
+ - spec/unit/railgun/content_type_spec.rb
214
+ - spec/unit/railgun/mailer_spec.rb
187
215
  - vcr_cassettes/bounces.yml
188
216
  - vcr_cassettes/complaints.yml
189
217
  - vcr_cassettes/domains.todo.yml
@@ -197,13 +225,14 @@ files:
197
225
  - vcr_cassettes/routes.yml
198
226
  - vcr_cassettes/send_message.yml
199
227
  - vcr_cassettes/stats.yml
228
+ - vcr_cassettes/suppressions.yml
200
229
  - vcr_cassettes/unsubscribes.yml
201
230
  - vcr_cassettes/webhooks.yml
202
231
  homepage: http://www.mailgun.com
203
232
  licenses:
204
- - Apache
233
+ - Apache-2.0
205
234
  metadata: {}
206
- post_install_message:
235
+ post_install_message:
207
236
  rdoc_options: []
208
237
  require_paths:
209
238
  - lib
@@ -211,16 +240,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
240
  requirements:
212
241
  - - ">="
213
242
  - !ruby/object:Gem::Version
214
- version: 2.0.0
243
+ version: 2.2.2
215
244
  required_rubygems_version: !ruby/object:Gem::Requirement
216
245
  requirements:
217
246
  - - ">="
218
247
  - !ruby/object:Gem::Version
219
248
  version: '0'
220
249
  requirements: []
221
- rubyforge_project:
222
- rubygems_version: 2.4.5
223
- signing_key:
250
+ rubygems_version: 3.0.9
251
+ signing_key:
224
252
  specification_version: 4
225
253
  summary: Mailgun's Official Ruby SDK
226
254
  test_files:
@@ -236,6 +264,7 @@ test_files:
236
264
  - spec/integration/messages/sample_data/mime.txt
237
265
  - spec/integration/routes_spec.rb
238
266
  - spec/integration/stats_spec.rb
267
+ - spec/integration/suppressions_spec.rb
239
268
  - spec/integration/unsubscribes_spec.rb
240
269
  - spec/integration/webhook_spec.rb
241
270
  - spec/spec_helper.rb
@@ -248,3 +277,6 @@ test_files:
248
277
  - spec/unit/messages/sample_data/mailgun_icon.png
249
278
  - spec/unit/messages/sample_data/mime.txt
250
279
  - spec/unit/messages/sample_data/rackspace_logo.jpg
280
+ - spec/unit/messages/sample_data/unknown.type
281
+ - spec/unit/railgun/content_type_spec.rb
282
+ - spec/unit/railgun/mailer_spec.rb