pew_pew 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/.gitignore +19 -0
  2. data/.rspec +2 -0
  3. data/.yardopts +1 -0
  4. data/Gemfile +3 -0
  5. data/LICENSE +22 -0
  6. data/README.md +84 -0
  7. data/Rakefile +3 -0
  8. data/lib/pew_pew.rb +32 -0
  9. data/lib/pew_pew/client.rb +90 -0
  10. data/lib/pew_pew/config.rb +15 -0
  11. data/lib/pew_pew/domain.rb +9 -0
  12. data/lib/pew_pew/resource.rb +52 -0
  13. data/lib/pew_pew/resources/bounces.rb +41 -0
  14. data/lib/pew_pew/resources/campaigns.rb +141 -0
  15. data/lib/pew_pew/resources/complaints.rb +40 -0
  16. data/lib/pew_pew/resources/lists.rb +121 -0
  17. data/lib/pew_pew/resources/logs.rb +12 -0
  18. data/lib/pew_pew/resources/mailboxes.rb +41 -0
  19. data/lib/pew_pew/resources/messages.rb +37 -0
  20. data/lib/pew_pew/resources/routes.rb +57 -0
  21. data/lib/pew_pew/resources/stats.rb +12 -0
  22. data/lib/pew_pew/resources/unsubscribes.rb +43 -0
  23. data/lib/pew_pew/response.rb +11 -0
  24. data/lib/pew_pew/version.rb +3 -0
  25. data/pew_pew.gemspec +20 -0
  26. data/spec/fixtures/bounces.yml +144 -0
  27. data/spec/fixtures/campaigns.yml +368 -0
  28. data/spec/fixtures/complaints.yml +142 -0
  29. data/spec/fixtures/image.png +0 -0
  30. data/spec/fixtures/lists.yml +403 -0
  31. data/spec/fixtures/logs.yml +133 -0
  32. data/spec/fixtures/mailboxes.yml +141 -0
  33. data/spec/fixtures/messages.yml +196 -0
  34. data/spec/fixtures/mime.eml +34 -0
  35. data/spec/fixtures/routes.yml +225 -0
  36. data/spec/fixtures/stats.yml +61 -0
  37. data/spec/fixtures/unsubscribes.yml +219 -0
  38. data/spec/pew_pew/client_spec.rb +51 -0
  39. data/spec/pew_pew/config_spec.rb +38 -0
  40. data/spec/pew_pew/resource_spec.rb +46 -0
  41. data/spec/pew_pew/resources/bounces_spec.rb +78 -0
  42. data/spec/pew_pew/resources/campaigns_spec.rb +228 -0
  43. data/spec/pew_pew/resources/complaints_spec.rb +69 -0
  44. data/spec/pew_pew/resources/lists_spec.rb +283 -0
  45. data/spec/pew_pew/resources/logs_spec.rb +28 -0
  46. data/spec/pew_pew/resources/mailboxes_spec.rb +59 -0
  47. data/spec/pew_pew/resources/messages_spec.rb +53 -0
  48. data/spec/pew_pew/resources/routes_spec.rb +135 -0
  49. data/spec/pew_pew/resources/stats_spec.rb +26 -0
  50. data/spec/pew_pew/resources/unsubscribes_spec.rb +99 -0
  51. data/spec/pew_pew/response_spec.rb +21 -0
  52. data/spec/pew_pew_spec.rb +13 -0
  53. data/spec/spec_helper.rb +17 -0
  54. data/spec/support/contexts/api_requests.rb +23 -0
  55. data/spec/support/contexts/domain_resource.rb +17 -0
  56. data/spec/support/vcr.rb +6 -0
  57. metadata +211 -0
@@ -0,0 +1,141 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailgun.net/v2/<%= domain %>/mailboxes
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - PewPew Ruby Gem 0.0.1
12
+ Authorization:
13
+ - Basic <%= basic_auth %>
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ server:
20
+ - nginx/1.0.14
21
+ date:
22
+ - Fri, 01 Jun 2012 19:42:48 GMT
23
+ content-type:
24
+ - application/json
25
+ connection:
26
+ - close
27
+ content-length:
28
+ - '183'
29
+ content-disposition:
30
+ - inline
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! "{\n \"total_count\": 1, \n \"items\": [\n {\n \"size_bytes\":
34
+ null, \n \"created_at\": \"Mon, 21 May 2012 22:12:54 GMT\", \n \"mailbox\":
35
+ \"postmaster@pewpew.mailgun.org\"\n }\n ]\n}"
36
+ http_version:
37
+ recorded_at: Fri, 01 Jun 2012 19:42:48 GMT
38
+ - request:
39
+ method: post
40
+ uri: https://api.mailgun.net/v2/<%= domain %>/mailboxes
41
+ body:
42
+ encoding: US-ASCII
43
+ string: mailbox=test&password=secret
44
+ headers:
45
+ User-Agent:
46
+ - PewPew Ruby Gem 0.0.1
47
+ Authorization:
48
+ - Basic <%= basic_auth %>
49
+ Content-Type:
50
+ - application/x-www-form-urlencoded
51
+ response:
52
+ status:
53
+ code: 200
54
+ message:
55
+ headers:
56
+ server:
57
+ - nginx/1.0.14
58
+ date:
59
+ - Fri, 01 Jun 2012 19:46:55 GMT
60
+ content-type:
61
+ - application/json
62
+ connection:
63
+ - close
64
+ content-length:
65
+ - '38'
66
+ content-disposition:
67
+ - inline
68
+ body:
69
+ encoding: US-ASCII
70
+ string: ! "{\n \"message\": \"Created 1 mailboxes\"\n}"
71
+ http_version:
72
+ recorded_at: Fri, 01 Jun 2012 19:46:55 GMT
73
+ - request:
74
+ method: put
75
+ uri: https://api.mailgun.net/v2/<%= domain %>/mailboxes/test
76
+ body:
77
+ encoding: US-ASCII
78
+ string: password=s3cr3t
79
+ headers:
80
+ User-Agent:
81
+ - PewPew Ruby Gem 0.0.1
82
+ Authorization:
83
+ - Basic <%= basic_auth %>
84
+ Content-Type:
85
+ - application/x-www-form-urlencoded
86
+ response:
87
+ status:
88
+ code: 200
89
+ message:
90
+ headers:
91
+ server:
92
+ - nginx/1.0.14
93
+ date:
94
+ - Fri, 01 Jun 2012 19:47:29 GMT
95
+ content-type:
96
+ - application/json
97
+ connection:
98
+ - close
99
+ content-length:
100
+ - '35'
101
+ content-disposition:
102
+ - inline
103
+ body:
104
+ encoding: US-ASCII
105
+ string: ! "{\n \"message\": \"Password changed\"\n}"
106
+ http_version:
107
+ recorded_at: Fri, 01 Jun 2012 19:47:29 GMT
108
+ - request:
109
+ method: delete
110
+ uri: https://api.mailgun.net/v2/<%= domain %>/mailboxes/test
111
+ body:
112
+ encoding: US-ASCII
113
+ string: ''
114
+ headers:
115
+ User-Agent:
116
+ - PewPew Ruby Gem 0.0.1
117
+ Authorization:
118
+ - Basic <%= basic_auth %>
119
+ response:
120
+ status:
121
+ code: 200
122
+ message:
123
+ headers:
124
+ server:
125
+ - nginx/1.0.14
126
+ date:
127
+ - Fri, 01 Jun 2012 19:47:51 GMT
128
+ content-type:
129
+ - application/json
130
+ connection:
131
+ - close
132
+ content-length:
133
+ - '81'
134
+ content-disposition:
135
+ - inline
136
+ body:
137
+ encoding: US-ASCII
138
+ string: ! "{\n \"message\": \"Mailbox has been deleted\", \n \"spec\": \"test@pewpew.mailgun.org\"\n}"
139
+ http_version:
140
+ recorded_at: Fri, 01 Jun 2012 19:47:51 GMT
141
+ recorded_with: VCR 2.2.0
@@ -0,0 +1,196 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.mailgun.net/v2/<%= domain %>/messages
6
+ body:
7
+ encoding: US-ASCII
8
+ string: to=pewpew%40devoh.com&from=pewpew%40devoh.com&subject=Test&text=This+is+a+test+message.
9
+ headers:
10
+ User-Agent:
11
+ - PewPew Ruby Gem 0.0.1
12
+ Authorization:
13
+ - Basic <%= basic_auth %>
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.0.14
23
+ date:
24
+ - Thu, 24 May 2012 08:00:44 GMT
25
+ content-type:
26
+ - application/json
27
+ connection:
28
+ - close
29
+ content-length:
30
+ - '96'
31
+ content-disposition:
32
+ - inline
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! "{\n \"message\": \"Queued. Thank you.\",\n \"id\": \"<20120524080044.27067.73085@pewpew.mailgun.org>\"\n}"
36
+ http_version:
37
+ recorded_at: Thu, 24 May 2012 08:00:44 GMT
38
+ - request:
39
+ method: post
40
+ uri: https://api.mailgun.net/v2/<%= domain %>/messages
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: !binary |-
44
+ LS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0DQpDb250ZW50LURpc3Bv
45
+ c2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9InRvIg0KDQpwZXdwZXdAZGV2b2gu
46
+ Y29tDQotLS0tLS0tLS0tLS0tUnVieU11bHRpcGFydFBvc3QNCkNvbnRlbnQt
47
+ RGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0iZnJvbSINCg0KcGV3cGV3
48
+ QGRldm9oLmNvbQ0KLS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0DQpD
49
+ b250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9InN1YmplY3Qi
50
+ DQoNClRlc3QNCi0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0UG9zdA0KQ29u
51
+ dGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJ0ZXh0Ig0KDQpU
52
+ aGlzIGlzIGEgdGVzdCBtZXNzYWdlLg0KLS0tLS0tLS0tLS0tLVJ1YnlNdWx0
53
+ aXBhcnRQb3N0DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5h
54
+ bWU9ImF0dGFjaG1lbnQiOyBmaWxlbmFtZT0iaW1hZ2UucG5nIg0KQ29udGVu
55
+ dC1MZW5ndGg6IDY3DQpDb250ZW50LVR5cGU6IGltYWdlL3BuZw0KQ29udGVu
56
+ dC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQoNColQTkcNChoKAAAADUlI
57
+ RFIAAAABAAAAAQgGAAAAHxXEiQAAAApJREFUeJxjAAEAAAUAAQ0KLbQAAAAA
58
+ SUVORK5CYIINCi0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0UG9zdC0tDQoN
59
+ Cg==
60
+ headers:
61
+ User-Agent:
62
+ - PewPew Ruby Gem 0.0.1
63
+ Authorization:
64
+ - Basic <%= basic_auth %>
65
+ Content-Type:
66
+ - multipart/form-data;boundary=-----------RubyMultipartPost
67
+ Content-Length:
68
+ - '676'
69
+ response:
70
+ status:
71
+ code: 200
72
+ message:
73
+ headers:
74
+ server:
75
+ - nginx/1.0.14
76
+ date:
77
+ - Tue, 29 May 2012 23:22:22 GMT
78
+ content-type:
79
+ - application/json
80
+ connection:
81
+ - close
82
+ content-length:
83
+ - '95'
84
+ content-disposition:
85
+ - inline
86
+ body:
87
+ encoding: US-ASCII
88
+ string: ! "{\n \"message\": \"Queued. Thank you.\",\n \"id\": \"<20120529232222.4550.70051@pewpew.mailgun.org>\"\n}"
89
+ http_version:
90
+ recorded_at: Tue, 29 May 2012 23:22:22 GMT
91
+ - request:
92
+ method: post
93
+ uri: https://api.mailgun.net/v2/<%= domain %>/messages
94
+ body:
95
+ encoding: ASCII-8BIT
96
+ string: !binary |-
97
+ LS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0DQpDb250ZW50LURpc3Bv
98
+ c2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9InRvIg0KDQpwZXdwZXdAZGV2b2gu
99
+ Y29tDQotLS0tLS0tLS0tLS0tUnVieU11bHRpcGFydFBvc3QNCkNvbnRlbnQt
100
+ RGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0iZnJvbSINCg0KcGV3cGV3
101
+ QGRldm9oLmNvbQ0KLS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0DQpD
102
+ b250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9InN1YmplY3Qi
103
+ DQoNClRlc3QNCi0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0UG9zdA0KQ29u
104
+ dGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJ0ZXh0Ig0KDQpU
105
+ aGlzIGlzIGEgdGVzdCBtZXNzYWdlLg0KLS0tLS0tLS0tLS0tLVJ1YnlNdWx0
106
+ aXBhcnRQb3N0DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5h
107
+ bWU9Imh0bWwiDQoNClRoaXMgaXMgYSB0ZXN0IG1lc3NhZ2UuIDxpbWcgc3Jj
108
+ PSJjaWQ6aW1hZ2UucG5nIj4NCi0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0
109
+ UG9zdA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJp
110
+ bmxpbmUiOyBmaWxlbmFtZT0iaW1hZ2UucG5nIg0KQ29udGVudC1MZW5ndGg6
111
+ IDY3DQpDb250ZW50LVR5cGU6IGltYWdlL3BuZw0KQ29udGVudC1UcmFuc2Zl
112
+ ci1FbmNvZGluZzogYmluYXJ5DQoNColQTkcNChoKAAAADUlIRFIAAAABAAAA
113
+ AQgGAAAAHxXEiQAAAApJREFUeJxjAAEAAAUAAQ0KLbQAAAAASUVORK5CYIIN
114
+ Ci0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0UG9zdC0tDQoNCg==
115
+ headers:
116
+ User-Agent:
117
+ - PewPew Ruby Gem 0.0.1
118
+ Authorization:
119
+ - Basic <%= basic_auth %>
120
+ Content-Type:
121
+ - multipart/form-data;boundary=-----------RubyMultipartPost
122
+ Content-Length:
123
+ - '802'
124
+ response:
125
+ status:
126
+ code: 200
127
+ message:
128
+ headers:
129
+ server:
130
+ - nginx/1.0.14
131
+ date:
132
+ - Tue, 29 May 2012 23:45:26 GMT
133
+ content-type:
134
+ - application/json
135
+ connection:
136
+ - close
137
+ content-length:
138
+ - '97'
139
+ content-disposition:
140
+ - inline
141
+ body:
142
+ encoding: US-ASCII
143
+ string: ! "{\n \"message\": \"Queued. Thank you.\", \n \"id\": \"<20120529234526.13436.15849@pewpew.mailgun.org>\"\n}"
144
+ http_version:
145
+ recorded_at: Tue, 29 May 2012 23:45:26 GMT
146
+ - request:
147
+ method: post
148
+ uri: https://api.mailgun.net/v2/<%= domain %>/messages.mime
149
+ body:
150
+ encoding: US-ASCII
151
+ string: ! "-------------RubyMultipartPost\r\nContent-Disposition: form-data;
152
+ name=\"to\"\r\n\r\npewpew@devoh.com\r\n-------------RubyMultipartPost\r\nContent-Disposition:
153
+ form-data; name=\"message\"; filename=\"mime.eml\"\r\nContent-Length: 931\r\nContent-Type:
154
+ message/rfc822\r\nContent-Transfer-Encoding: binary\r\n\r\nDate: Thu, 31 May
155
+ 2012 21:17:55 -0700\nFrom: pewpew@devoh.com\nTo: pewpew@devoh.com\nMessage-ID:
156
+ <4fc84273c474_48dd3fe70cc34cd05949d@rouge.local.mail>\nSubject: Test\nMime-Version:
157
+ 1.0\nContent-Type: multipart/alternative;\n boundary=\"--==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187\";\n
158
+ charset=UTF-8\nContent-Transfer-Encoding: 7bit\n\n\n\n----==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187\nDate:
159
+ Thu, 31 May 2012 21:17:55 -0700\nMime-Version: 1.0\nContent-Type: text/plain;\n
160
+ charset=UTF-8\nContent-Transfer-Encoding: 7bit\nContent-ID: <4fc842739823_48dd3fe70cc34cd0592d9@rouge.local.mail>\n\nThis
161
+ is a test message.\n\n----==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187\nDate:
162
+ Thu, 31 May 2012 21:17:55 -0700\nMime-Version: 1.0\nContent-Type: text/html;\n
163
+ charset=UTF-8\nContent-Transfer-Encoding: 7bit\nContent-ID: <4fc84273b619_48dd3fe70cc34cd05937b@rouge.local.mail>\n\n<p>This
164
+ is a test message.<p>\n\n----==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187--\n\r\n-------------RubyMultipartPost--\r\n\r\n"
165
+ headers:
166
+ User-Agent:
167
+ - PewPew Ruby Gem 0.0.1
168
+ Authorization:
169
+ - Basic <%= basic_auth %>
170
+ Content-Type:
171
+ - multipart/form-data;boundary=-----------RubyMultipartPost
172
+ Content-Length:
173
+ - '1253'
174
+ response:
175
+ status:
176
+ code: 200
177
+ message:
178
+ headers:
179
+ server:
180
+ - nginx/1.0.14
181
+ date:
182
+ - Fri, 01 Jun 2012 04:19:03 GMT
183
+ content-type:
184
+ - application/json
185
+ connection:
186
+ - close
187
+ content-length:
188
+ - '102'
189
+ content-disposition:
190
+ - inline
191
+ body:
192
+ encoding: US-ASCII
193
+ string: ! "{\n \"message\": \"Queued. Thank you.\",\n \"id\": \"<4fc84273c474_48dd3fe70cc34cd05949d@rouge.local.mail>\"\n}"
194
+ http_version:
195
+ recorded_at: Fri, 01 Jun 2012 04:19:09 GMT
196
+ recorded_with: VCR 2.2.0
@@ -0,0 +1,34 @@
1
+ Date: Thu, 31 May 2012 21:17:55 -0700
2
+ From: pewpew@devoh.com
3
+ To: pewpew@devoh.com
4
+ Message-ID: <4fc84273c474_48dd3fe70cc34cd05949d@rouge.local.mail>
5
+ Subject: Test
6
+ Mime-Version: 1.0
7
+ Content-Type: multipart/alternative;
8
+ boundary="--==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187";
9
+ charset=UTF-8
10
+ Content-Transfer-Encoding: 7bit
11
+
12
+
13
+
14
+ ----==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187
15
+ Date: Thu, 31 May 2012 21:17:55 -0700
16
+ Mime-Version: 1.0
17
+ Content-Type: text/plain;
18
+ charset=UTF-8
19
+ Content-Transfer-Encoding: 7bit
20
+ Content-ID: <4fc842739823_48dd3fe70cc34cd0592d9@rouge.local.mail>
21
+
22
+ This is a test message.
23
+
24
+ ----==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187
25
+ Date: Thu, 31 May 2012 21:17:55 -0700
26
+ Mime-Version: 1.0
27
+ Content-Type: text/html;
28
+ charset=UTF-8
29
+ Content-Transfer-Encoding: 7bit
30
+ Content-ID: <4fc84273b619_48dd3fe70cc34cd05937b@rouge.local.mail>
31
+
32
+ <p>This is a test message.<p>
33
+
34
+ ----==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187--
@@ -0,0 +1,225 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailgun.net/v2/routes
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - PewPew Ruby Gem 0.0.1
12
+ Authorization:
13
+ - Basic <%= basic_auth %>
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ server:
20
+ - nginx/1.0.14
21
+ date:
22
+ - Fri, 01 Jun 2012 19:54:49 GMT
23
+ content-type:
24
+ - application/json
25
+ connection:
26
+ - close
27
+ content-length:
28
+ - '325'
29
+ content-disposition:
30
+ - inline
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! "{\n \"total_count\": 1,\n \"items\": [\n {\n \"description\":
34
+ \"Forward Gmail\",\n \"created_at\": \"Fri, 01 Jun 2012 05:15:52 GMT\",\n
35
+ \ \"actions\": [\n \"forward('gmail@example.com')\"\n ],\n
36
+ \ \"priority\": 1,\n \"expression\": \"match_recipient('.*@gmail.com')\",\n
37
+ \ \"id\": \"4fc850083533542f7704bc05\"\n }\n ]\n}"
38
+ http_version:
39
+ recorded_at: Fri, 01 Jun 2012 19:54:49 GMT
40
+ - request:
41
+ method: post
42
+ uri: https://api.mailgun.net/v2/routes
43
+ body:
44
+ encoding: US-ASCII
45
+ string: priority=1&description=Forward+Gmail&expression=match_recipient%28%27.%2A%40gmail.com%27%29&action=forward%28%27gmail%40example.com%27%29
46
+ headers:
47
+ User-Agent:
48
+ - PewPew Ruby Gem 0.0.1
49
+ Authorization:
50
+ - Basic <%= basic_auth %>
51
+ Content-Type:
52
+ - application/x-www-form-urlencoded
53
+ response:
54
+ status:
55
+ code: 200
56
+ message:
57
+ headers:
58
+ server:
59
+ - nginx/1.0.14
60
+ date:
61
+ - Fri, 01 Jun 2012 05:15:52 GMT
62
+ content-type:
63
+ - application/json
64
+ connection:
65
+ - close
66
+ content-length:
67
+ - '316'
68
+ content-disposition:
69
+ - inline
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ! "{\n \"message\": \"Route has been created\",\n \"route\": {\n \"description\":
73
+ \"Forward Gmail\",\n \"created_at\": \"Fri, 01 Jun 2012 05:15:52 GMT\",\n
74
+ \ \"actions\": [\n \"forward('gmail@example.com')\"\n ],\n \"priority\":
75
+ 1,\n \"expression\": \"match_recipient('.*@gmail.com')\",\n \"id\":
76
+ \"4fc850083533542f7704bc05\"\n }\n}"
77
+ http_version:
78
+ recorded_at: Fri, 01 Jun 2012 05:15:59 GMT
79
+ - request:
80
+ method: get
81
+ uri: https://api.mailgun.net/v2/routes/4fc850083533542f7704bc05
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ''
85
+ headers:
86
+ User-Agent:
87
+ - PewPew Ruby Gem 0.0.1
88
+ Authorization:
89
+ - Basic <%= basic_auth %>
90
+ response:
91
+ status:
92
+ code: 200
93
+ message:
94
+ headers:
95
+ server:
96
+ - nginx/1.0.14
97
+ date:
98
+ - Fri, 01 Jun 2012 05:19:30 GMT
99
+ content-type:
100
+ - application/json
101
+ connection:
102
+ - close
103
+ content-length:
104
+ - '277'
105
+ content-disposition:
106
+ - inline
107
+ body:
108
+ encoding: US-ASCII
109
+ string: ! "{\n \"route\": {\n \"description\": \"Forward Gmail\",\n \"created_at\":
110
+ \"Fri, 01 Jun 2012 05:15:52 GMT\",\n \"actions\": [\n \"forward('gmail@example.com')\"\n
111
+ \ ],\n \"priority\": 1,\n \"expression\": \"match_recipient('.*@gmail.com')\",\n
112
+ \ \"id\": \"4fc850083533542f7704bc05\"\n }\n}"
113
+ http_version:
114
+ recorded_at: Fri, 01 Jun 2012 05:19:37 GMT
115
+ - request:
116
+ method: put
117
+ uri: https://api.mailgun.net/v2/routes/4fc850083533542f7704bc05
118
+ body:
119
+ encoding: US-ASCII
120
+ string: priority=2
121
+ headers:
122
+ User-Agent:
123
+ - PewPew Ruby Gem 0.0.1
124
+ Authorization:
125
+ - Basic <%= basic_auth %>
126
+ Content-Type:
127
+ - application/x-www-form-urlencoded
128
+ response:
129
+ status:
130
+ code: 200
131
+ message:
132
+ headers:
133
+ server:
134
+ - nginx/1.0.14
135
+ date:
136
+ - Fri, 01 Jun 2012 05:24:23 GMT
137
+ content-type:
138
+ - application/json
139
+ connection:
140
+ - close
141
+ content-length:
142
+ - '283'
143
+ content-disposition:
144
+ - inline
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ! "{\n \"priority\": 2,\n \"description\": \"Forward Gmail\",\n \"created_at\":
148
+ \"Fri, 01 Jun 2012 05:15:52 GMT\",\n \"expression\": \"match_recipient('.*@gmail.com')\",\n
149
+ \ \"message\": \"Route has been updated\",\n \"actions\": [\n \"forward('gmail@example.com')\"\n
150
+ \ ],\n \"id\": \"4fc850083533542f7704bc05\"\n}"
151
+ http_version:
152
+ recorded_at: Fri, 01 Jun 2012 05:24:30 GMT
153
+ - request:
154
+ method: post
155
+ uri: https://api.mailgun.net/v2/routes
156
+ body:
157
+ encoding: US-ASCII
158
+ string: priority=1&description=Forward+Gmail&expression=match_recipient%28%27.%2A%40gmail.com%27%29&action%5B%5D=forward%28%27gmail%40example.com%27%29&action%5B%5D=stop%28%29
159
+ headers:
160
+ User-Agent:
161
+ - PewPew Ruby Gem 0.0.1
162
+ Authorization:
163
+ - Basic <%= basic_auth %>
164
+ Content-Type:
165
+ - application/x-www-form-urlencoded
166
+ response:
167
+ status:
168
+ code: 200
169
+ message:
170
+ headers:
171
+ server:
172
+ - nginx/1.0.14
173
+ date:
174
+ - Fri, 01 Jun 2012 05:35:57 GMT
175
+ content-type:
176
+ - application/json
177
+ connection:
178
+ - close
179
+ content-length:
180
+ - '332'
181
+ content-disposition:
182
+ - inline
183
+ body:
184
+ encoding: US-ASCII
185
+ string: ! "{\n \"message\": \"Route has been created\",\n \"route\": {\n \"description\":
186
+ \"Forward Gmail\",\n \"created_at\": \"Fri, 01 Jun 2012 05:35:57 GMT\",\n
187
+ \ \"actions\": [\n \"forward('gmail@example.com')\",\n \"stop()\"\n
188
+ \ ],\n \"priority\": 1,\n \"expression\": \"match_recipient('.*@gmail.com')\",\n
189
+ \ \"id\": \"4fc854bd9d12a36fc504d4b3\"\n }\n}"
190
+ http_version:
191
+ recorded_at: Fri, 01 Jun 2012 05:36:04 GMT
192
+ - request:
193
+ method: delete
194
+ uri: https://api.mailgun.net/v2/routes/4fc854bd9d12a36fc504d4b3
195
+ body:
196
+ encoding: US-ASCII
197
+ string: ''
198
+ headers:
199
+ User-Agent:
200
+ - PewPew Ruby Gem 0.0.1
201
+ Authorization:
202
+ - Basic <%= basic_auth %>
203
+ response:
204
+ status:
205
+ code: 200
206
+ message:
207
+ headers:
208
+ server:
209
+ - nginx/1.0.14
210
+ date:
211
+ - Fri, 01 Jun 2012 05:43:54 GMT
212
+ content-type:
213
+ - application/json
214
+ connection:
215
+ - close
216
+ content-length:
217
+ - '77'
218
+ content-disposition:
219
+ - inline
220
+ body:
221
+ encoding: US-ASCII
222
+ string: ! "{\n \"message\": \"Route has been deleted\",\n \"id\": \"4fc854bd9d12a36fc504d4b3\"\n}"
223
+ http_version:
224
+ recorded_at: Fri, 01 Jun 2012 05:44:01 GMT
225
+ recorded_with: VCR 2.2.0