mailgun-ruby 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +8 -0
  4. data/.rubocop_todo.yml +22 -0
  5. data/.ruby-env.yml.example +12 -0
  6. data/.travis.yml +6 -12
  7. data/Domains.md +36 -0
  8. data/MessageBuilder.md +14 -14
  9. data/Messages.md +44 -30
  10. data/OptInHandler.md +34 -34
  11. data/README.md +74 -24
  12. data/Rakefile +22 -20
  13. data/Snippets.md +26 -26
  14. data/Webhooks.md +40 -0
  15. data/lib/mailgun.rb +26 -228
  16. data/lib/mailgun/chains.rb +16 -0
  17. data/lib/mailgun/client.rb +143 -0
  18. data/lib/mailgun/domains/domains.rb +84 -0
  19. data/lib/mailgun/events/events.rb +53 -35
  20. data/lib/mailgun/exceptions/exceptions.rb +43 -10
  21. data/lib/mailgun/lists/opt_in_handler.rb +18 -19
  22. data/lib/mailgun/messages/batch_message.rb +31 -48
  23. data/lib/mailgun/messages/message_builder.rb +160 -144
  24. data/lib/mailgun/response.rb +55 -0
  25. data/lib/mailgun/version.rb +2 -3
  26. data/lib/mailgun/webhooks/webhooks.rb +101 -0
  27. data/mailgun.gemspec +16 -10
  28. data/spec/integration/bounces_spec.rb +44 -0
  29. data/spec/integration/campaign_spec.rb +60 -0
  30. data/spec/integration/complaints_spec.rb +38 -0
  31. data/spec/integration/domains_spec.rb +39 -0
  32. data/spec/integration/email_validation_spec.rb +29 -0
  33. data/spec/integration/events_spec.rb +20 -0
  34. data/spec/integration/list_members_spec.rb +63 -0
  35. data/spec/integration/list_spec.rb +58 -0
  36. data/spec/integration/mailgun_spec.rb +26 -550
  37. data/spec/integration/routes_spec.rb +74 -0
  38. data/spec/integration/stats_spec.rb +15 -0
  39. data/spec/integration/unsubscribes_spec.rb +42 -0
  40. data/spec/integration/webhook_spec.rb +54 -0
  41. data/spec/spec_helper.rb +37 -7
  42. data/spec/unit/connection/test_client.rb +15 -95
  43. data/spec/unit/events/events_spec.rb +9 -6
  44. data/spec/unit/lists/opt_in_handler_spec.rb +6 -4
  45. data/spec/unit/mailgun_spec.rb +25 -19
  46. data/spec/unit/messages/batch_message_spec.rb +47 -38
  47. data/spec/unit/messages/message_builder_spec.rb +282 -111
  48. data/vcr_cassettes/bounces.yml +175 -0
  49. data/vcr_cassettes/complaints.yml +175 -0
  50. data/vcr_cassettes/domains.todo.yml +42 -0
  51. data/vcr_cassettes/domains.yml +360 -0
  52. data/vcr_cassettes/email_validation.yml +104 -0
  53. data/vcr_cassettes/events.yml +61 -0
  54. data/vcr_cassettes/list_members.yml +320 -0
  55. data/vcr_cassettes/mailing_list.todo.yml +43 -0
  56. data/vcr_cassettes/mailing_list.yml +390 -0
  57. data/vcr_cassettes/routes.yml +359 -0
  58. data/vcr_cassettes/send_message.yml +107 -0
  59. data/vcr_cassettes/stats.yml +44 -0
  60. data/vcr_cassettes/unsubscribes.yml +191 -0
  61. data/vcr_cassettes/webhooks.yml +276 -0
  62. metadata +114 -10
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.0.3
4
+ version: 1.1.0
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: 2014-11-20 00:00:00.000000000 Z
12
+ date: 2016-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -17,42 +17,98 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.3'
20
+ version: '1.5'
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.3'
27
+ version: '1.5'
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: '2.14'
34
+ version: '3.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: '2.14'
41
+ version: '3.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.1'
48
+ version: '10.0'
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.1'
55
+ version: '10.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: webmock
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.22'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.22'
70
+ - !ruby/object:Gem::Dependency
71
+ name: pry
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '0.9'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0.9'
84
+ - !ruby/object:Gem::Dependency
85
+ name: vcr
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '3.0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '3.0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: simplecov
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '0.11'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '0.11'
56
112
  - !ruby/object:Gem::Dependency
57
113
  name: rest-client
58
114
  requirement: !ruby/object:Gem::Requirement
@@ -88,7 +144,11 @@ extensions: []
88
144
  extra_rdoc_files: []
89
145
  files:
90
146
  - ".gitignore"
147
+ - ".rubocop.yml"
148
+ - ".rubocop_todo.yml"
149
+ - ".ruby-env.yml.example"
91
150
  - ".travis.yml"
151
+ - Domains.md
92
152
  - Events.md
93
153
  - Gemfile
94
154
  - LICENSE
@@ -98,16 +158,34 @@ files:
98
158
  - README.md
99
159
  - Rakefile
100
160
  - Snippets.md
161
+ - Webhooks.md
101
162
  - lib/mailgun.rb
163
+ - lib/mailgun/chains.rb
164
+ - lib/mailgun/client.rb
165
+ - lib/mailgun/domains/domains.rb
102
166
  - lib/mailgun/events/events.rb
103
167
  - lib/mailgun/exceptions/exceptions.rb
104
168
  - lib/mailgun/lists/opt_in_handler.rb
105
169
  - lib/mailgun/messages/batch_message.rb
106
170
  - lib/mailgun/messages/message_builder.rb
171
+ - lib/mailgun/response.rb
107
172
  - lib/mailgun/version.rb
173
+ - lib/mailgun/webhooks/webhooks.rb
108
174
  - mailgun.gemspec
175
+ - spec/integration/bounces_spec.rb
176
+ - spec/integration/campaign_spec.rb
177
+ - spec/integration/complaints_spec.rb
178
+ - spec/integration/domains_spec.rb
179
+ - spec/integration/email_validation_spec.rb
180
+ - spec/integration/events_spec.rb
181
+ - spec/integration/list_members_spec.rb
182
+ - spec/integration/list_spec.rb
109
183
  - spec/integration/mailgun_spec.rb
110
184
  - spec/integration/messages/sample_data/mime.txt
185
+ - spec/integration/routes_spec.rb
186
+ - spec/integration/stats_spec.rb
187
+ - spec/integration/unsubscribes_spec.rb
188
+ - spec/integration/webhook_spec.rb
111
189
  - spec/spec_helper.rb
112
190
  - spec/unit/connection/test_client.rb
113
191
  - spec/unit/events/events_spec.rb
@@ -118,6 +196,20 @@ files:
118
196
  - spec/unit/messages/sample_data/mailgun_icon.png
119
197
  - spec/unit/messages/sample_data/mime.txt
120
198
  - spec/unit/messages/sample_data/rackspace_logo.jpg
199
+ - vcr_cassettes/bounces.yml
200
+ - vcr_cassettes/complaints.yml
201
+ - vcr_cassettes/domains.todo.yml
202
+ - vcr_cassettes/domains.yml
203
+ - vcr_cassettes/email_validation.yml
204
+ - vcr_cassettes/events.yml
205
+ - vcr_cassettes/list_members.yml
206
+ - vcr_cassettes/mailing_list.todo.yml
207
+ - vcr_cassettes/mailing_list.yml
208
+ - vcr_cassettes/routes.yml
209
+ - vcr_cassettes/send_message.yml
210
+ - vcr_cassettes/stats.yml
211
+ - vcr_cassettes/unsubscribes.yml
212
+ - vcr_cassettes/webhooks.yml
121
213
  homepage: http://www.mailgun.com
122
214
  licenses:
123
215
  - Apache
@@ -130,7 +222,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
222
  requirements:
131
223
  - - ">="
132
224
  - !ruby/object:Gem::Version
133
- version: '0'
225
+ version: 1.9.3
134
226
  required_rubygems_version: !ruby/object:Gem::Requirement
135
227
  requirements:
136
228
  - - ">="
@@ -138,13 +230,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
230
  version: '0'
139
231
  requirements: []
140
232
  rubyforge_project:
141
- rubygems_version: 2.2.2
233
+ rubygems_version: 2.4.6
142
234
  signing_key:
143
235
  specification_version: 4
144
236
  summary: Mailgun's Official Ruby SDK
145
237
  test_files:
238
+ - spec/integration/bounces_spec.rb
239
+ - spec/integration/campaign_spec.rb
240
+ - spec/integration/complaints_spec.rb
241
+ - spec/integration/domains_spec.rb
242
+ - spec/integration/email_validation_spec.rb
243
+ - spec/integration/events_spec.rb
244
+ - spec/integration/list_members_spec.rb
245
+ - spec/integration/list_spec.rb
146
246
  - spec/integration/mailgun_spec.rb
147
247
  - spec/integration/messages/sample_data/mime.txt
248
+ - spec/integration/routes_spec.rb
249
+ - spec/integration/stats_spec.rb
250
+ - spec/integration/unsubscribes_spec.rb
251
+ - spec/integration/webhook_spec.rb
148
252
  - spec/spec_helper.rb
149
253
  - spec/unit/connection/test_client.rb
150
254
  - spec/unit/events/events_spec.rb