pew_pew 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ script: bundle exec rspec
3
+ rvm:
4
+ - 1.9.2
5
+ - 1.9.3
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## Pew Pew 0.0.2
4
+
5
+ * Add support for Ruby < 1.9.3.
6
+
7
+ ## Pew Pew 0.0.1
8
+
9
+ * Initial release.
data/README.md CHANGED
@@ -4,6 +4,11 @@ A Ruby client library for using the [Mailgun] web service.
4
4
 
5
5
  [mailgun]: https://mailgun.net/
6
6
 
7
+ [![Build Status][travis-image]][travis]
8
+
9
+ [travis]: http://travis-ci.org/tylerhunt/pew_pew
10
+ [travis-image]: https://secure.travis-ci.org/tylerhunt/pew_pew.png
11
+
7
12
 
8
13
  ## Installation
9
14
 
@@ -67,13 +72,19 @@ PewPew.messages.send_email(
67
72
  ```
68
73
 
69
74
  For resources that require a domain, you may pass it as an option when calling
70
- the resource. If a domain has been configured, it will be used as the default.
75
+ the resource. If a domain has been configured, it will be used as the default
76
+ for all methods called on the resource.
71
77
 
72
78
  ``` ruby
73
79
  PewPew.stats.all # uses the configured domain
74
80
  PewPew.stats(domain: 'example.com').all # uses example.com
75
81
  ```
76
82
 
83
+ See the [documentation][] for the complete [list of resources][resources].
84
+
85
+ [documentation]: http://rubydoc.info/gems/pew_pew/frames
86
+ [resources]: http://rubydoc.info/gems/pew_pew/frames/PewPew/Resources
87
+
77
88
 
78
89
  ## Contributing
79
90
 
@@ -5,5 +5,5 @@ module PewPew
5
5
  end
6
6
  private :domain
7
7
  end
8
- private_constant :Domain
8
+ private_constant :Domain if respond_to?(:private_constant) # >= 1.9.3
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module PewPew
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -7,6 +7,8 @@ Gem::Specification.new do |gem|
7
7
  gem.homepage = 'http://github.com/tylerhunt/pew_pew'
8
8
  gem.author = 'Tyler Hunt'
9
9
 
10
+ gem.required_ruby_version = '>= 1.9'
11
+
10
12
  gem.add_dependency 'faraday_middleware', '~> 0.8.0'
11
13
  gem.add_dependency 'hashie', '~> 1.1'
12
14
  gem.add_dependency 'relax', '~> 0.2.0'
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: address=test%40example.com&code=554&error=Relay+access+denied
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  Content-Type:
@@ -44,7 +44,7 @@ http_interactions:
44
44
  string: ''
45
45
  headers:
46
46
  User-Agent:
47
- - PewPew Ruby Gem 0.0.1
47
+ - <%= user_agent %>
48
48
  Authorization:
49
49
  - Basic <%= basic_auth %>
50
50
  response:
@@ -79,7 +79,7 @@ http_interactions:
79
79
  string: ''
80
80
  headers:
81
81
  User-Agent:
82
- - PewPew Ruby Gem 0.0.1
82
+ - <%= user_agent %>
83
83
  Authorization:
84
84
  - Basic <%= basic_auth %>
85
85
  response:
@@ -115,7 +115,7 @@ http_interactions:
115
115
  string: ''
116
116
  headers:
117
117
  User-Agent:
118
- - PewPew Ruby Gem 0.0.1
118
+ - <%= user_agent %>
119
119
  Authorization:
120
120
  - Basic <%= basic_auth %>
121
121
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: name=Test&id=test
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  Content-Type:
@@ -44,7 +44,7 @@ http_interactions:
44
44
  string: ''
45
45
  headers:
46
46
  User-Agent:
47
- - PewPew Ruby Gem 0.0.1
47
+ - <%= user_agent %>
48
48
  Authorization:
49
49
  - Basic <%= basic_auth %>
50
50
  response:
@@ -77,7 +77,7 @@ http_interactions:
77
77
  string: name=Test
78
78
  headers:
79
79
  User-Agent:
80
- - PewPew Ruby Gem 0.0.1
80
+ - <%= user_agent %>
81
81
  Authorization:
82
82
  - Basic <%= basic_auth %>
83
83
  Content-Type:
@@ -113,7 +113,7 @@ http_interactions:
113
113
  string: ''
114
114
  headers:
115
115
  User-Agent:
116
- - PewPew Ruby Gem 0.0.1
116
+ - <%= user_agent %>
117
117
  Authorization:
118
118
  - Basic <%= basic_auth %>
119
119
  response:
@@ -151,7 +151,7 @@ http_interactions:
151
151
  string: ''
152
152
  headers:
153
153
  User-Agent:
154
- - PewPew Ruby Gem 0.0.1
154
+ - <%= user_agent %>
155
155
  Authorization:
156
156
  - Basic <%= basic_auth %>
157
157
  response:
@@ -185,7 +185,7 @@ http_interactions:
185
185
  string: ''
186
186
  headers:
187
187
  User-Agent:
188
- - PewPew Ruby Gem 0.0.1
188
+ - <%= user_agent %>
189
189
  Authorization:
190
190
  - Basic <%= basic_auth %>
191
191
  response:
@@ -216,7 +216,7 @@ http_interactions:
216
216
  string: ''
217
217
  headers:
218
218
  User-Agent:
219
- - PewPew Ruby Gem 0.0.1
219
+ - <%= user_agent %>
220
220
  Authorization:
221
221
  - Basic <%= basic_auth %>
222
222
  response:
@@ -249,7 +249,7 @@ http_interactions:
249
249
  string: ''
250
250
  headers:
251
251
  User-Agent:
252
- - PewPew Ruby Gem 0.0.1
252
+ - <%= user_agent %>
253
253
  Authorization:
254
254
  - Basic <%= basic_auth %>
255
255
  response:
@@ -280,7 +280,7 @@ http_interactions:
280
280
  string: ''
281
281
  headers:
282
282
  User-Agent:
283
- - PewPew Ruby Gem 0.0.1
283
+ - <%= user_agent %>
284
284
  Authorization:
285
285
  - Basic <%= basic_auth %>
286
286
  response:
@@ -311,7 +311,7 @@ http_interactions:
311
311
  string: ''
312
312
  headers:
313
313
  User-Agent:
314
- - PewPew Ruby Gem 0.0.1
314
+ - <%= user_agent %>
315
315
  Authorization:
316
316
  - Basic <%= basic_auth %>
317
317
  response:
@@ -342,7 +342,7 @@ http_interactions:
342
342
  string: ''
343
343
  headers:
344
344
  User-Agent:
345
- - PewPew Ruby Gem 0.0.1
345
+ - <%= user_agent %>
346
346
  Authorization:
347
347
  - Basic <%= basic_auth %>
348
348
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: address=test%40example.com
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  Content-Type:
@@ -44,7 +44,7 @@ http_interactions:
44
44
  string: ''
45
45
  headers:
46
46
  User-Agent:
47
- - PewPew Ruby Gem 0.0.1
47
+ - <%= user_agent %>
48
48
  Authorization:
49
49
  - Basic <%= basic_auth %>
50
50
  response:
@@ -78,7 +78,7 @@ http_interactions:
78
78
  string: ''
79
79
  headers:
80
80
  User-Agent:
81
- - PewPew Ruby Gem 0.0.1
81
+ - <%= user_agent %>
82
82
  Authorization:
83
83
  - Basic <%= basic_auth %>
84
84
  response:
@@ -113,7 +113,7 @@ http_interactions:
113
113
  string: ''
114
114
  headers:
115
115
  User-Agent:
116
- - PewPew Ruby Gem 0.0.1
116
+ - <%= user_agent %>
117
117
  Authorization:
118
118
  - Basic <%= basic_auth %>
119
119
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: address=newsletter%40pewpew.mailgun.org&description=Weekly+News+and+Updates&name=Newsletter
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  Content-Type:
@@ -46,7 +46,7 @@ http_interactions:
46
46
  string: ''
47
47
  headers:
48
48
  User-Agent:
49
- - PewPew Ruby Gem 0.0.1
49
+ - <%= user_agent %>
50
50
  Authorization:
51
51
  - Basic <%= basic_auth %>
52
52
  response:
@@ -82,7 +82,7 @@ http_interactions:
82
82
  string: ''
83
83
  headers:
84
84
  User-Agent:
85
- - PewPew Ruby Gem 0.0.1
85
+ - <%= user_agent %>
86
86
  Authorization:
87
87
  - Basic <%= basic_auth %>
88
88
  response:
@@ -118,7 +118,7 @@ http_interactions:
118
118
  string: description=Monthly+News+and+Updates
119
119
  headers:
120
120
  User-Agent:
121
- - PewPew Ruby Gem 0.0.1
121
+ - <%= user_agent %>
122
122
  Authorization:
123
123
  - Basic <%= basic_auth %>
124
124
  Content-Type:
@@ -156,7 +156,7 @@ http_interactions:
156
156
  string: ''
157
157
  headers:
158
158
  User-Agent:
159
- - PewPew Ruby Gem 0.0.1
159
+ - <%= user_agent %>
160
160
  Authorization:
161
161
  - Basic <%= basic_auth %>
162
162
  response:
@@ -190,7 +190,7 @@ http_interactions:
190
190
  string: ''
191
191
  headers:
192
192
  User-Agent:
193
- - PewPew Ruby Gem 0.0.1
193
+ - <%= user_agent %>
194
194
  Authorization:
195
195
  - Basic <%= basic_auth %>
196
196
  response:
@@ -227,7 +227,7 @@ http_interactions:
227
227
  string: address=member%40example.com&name=Member+Name&vars=%7B%22awesome%22%3Atrue%7D
228
228
  headers:
229
229
  User-Agent:
230
- - PewPew Ruby Gem 0.0.1
230
+ - <%= user_agent %>
231
231
  Authorization:
232
232
  - Basic <%= basic_auth %>
233
233
  Content-Type:
@@ -265,7 +265,7 @@ http_interactions:
265
265
  string: ''
266
266
  headers:
267
267
  User-Agent:
268
- - PewPew Ruby Gem 0.0.1
268
+ - <%= user_agent %>
269
269
  Authorization:
270
270
  - Basic <%= basic_auth %>
271
271
  response:
@@ -300,7 +300,7 @@ http_interactions:
300
300
  string: ''
301
301
  headers:
302
302
  User-Agent:
303
- - PewPew Ruby Gem 0.0.1
303
+ - <%= user_agent %>
304
304
  Authorization:
305
305
  - Basic <%= basic_auth %>
306
306
  response:
@@ -336,7 +336,7 @@ http_interactions:
336
336
  string: subscribed=false
337
337
  headers:
338
338
  User-Agent:
339
- - PewPew Ruby Gem 0.0.1
339
+ - <%= user_agent %>
340
340
  Authorization:
341
341
  - Basic <%= basic_auth %>
342
342
  Content-Type:
@@ -374,7 +374,7 @@ http_interactions:
374
374
  string: ''
375
375
  headers:
376
376
  User-Agent:
377
- - PewPew Ruby Gem 0.0.1
377
+ - <%= user_agent %>
378
378
  Authorization:
379
379
  - Basic <%= basic_auth %>
380
380
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  response:
@@ -43,7 +43,7 @@ http_interactions:
43
43
  string: mailbox=test&password=secret
44
44
  headers:
45
45
  User-Agent:
46
- - PewPew Ruby Gem 0.0.1
46
+ - <%= user_agent %>
47
47
  Authorization:
48
48
  - Basic <%= basic_auth %>
49
49
  Content-Type:
@@ -78,7 +78,7 @@ http_interactions:
78
78
  string: password=s3cr3t
79
79
  headers:
80
80
  User-Agent:
81
- - PewPew Ruby Gem 0.0.1
81
+ - <%= user_agent %>
82
82
  Authorization:
83
83
  - Basic <%= basic_auth %>
84
84
  Content-Type:
@@ -113,7 +113,7 @@ http_interactions:
113
113
  string: ''
114
114
  headers:
115
115
  User-Agent:
116
- - PewPew Ruby Gem 0.0.1
116
+ - <%= user_agent %>
117
117
  Authorization:
118
118
  - Basic <%= basic_auth %>
119
119
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: to=pewpew%40devoh.com&from=pewpew%40devoh.com&subject=Test&text=This+is+a+test+message.
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  Content-Type:
@@ -59,7 +59,7 @@ http_interactions:
59
59
  Cg==
60
60
  headers:
61
61
  User-Agent:
62
- - PewPew Ruby Gem 0.0.1
62
+ - <%= user_agent %>
63
63
  Authorization:
64
64
  - Basic <%= basic_auth %>
65
65
  Content-Type:
@@ -114,7 +114,7 @@ http_interactions:
114
114
  Ci0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0UG9zdC0tDQoNCg==
115
115
  headers:
116
116
  User-Agent:
117
- - PewPew Ruby Gem 0.0.1
117
+ - <%= user_agent %>
118
118
  Authorization:
119
119
  - Basic <%= basic_auth %>
120
120
  Content-Type:
@@ -164,7 +164,7 @@ http_interactions:
164
164
  is a test message.<p>\n\n----==_mimepart_4fc8427374a4_48dd3fe70cc34cd059187--\n\r\n-------------RubyMultipartPost--\r\n\r\n"
165
165
  headers:
166
166
  User-Agent:
167
- - PewPew Ruby Gem 0.0.1
167
+ - <%= user_agent %>
168
168
  Authorization:
169
169
  - Basic <%= basic_auth %>
170
170
  Content-Type:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  response:
@@ -45,7 +45,7 @@ http_interactions:
45
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
46
  headers:
47
47
  User-Agent:
48
- - PewPew Ruby Gem 0.0.1
48
+ - <%= user_agent %>
49
49
  Authorization:
50
50
  - Basic <%= basic_auth %>
51
51
  Content-Type:
@@ -84,7 +84,7 @@ http_interactions:
84
84
  string: ''
85
85
  headers:
86
86
  User-Agent:
87
- - PewPew Ruby Gem 0.0.1
87
+ - <%= user_agent %>
88
88
  Authorization:
89
89
  - Basic <%= basic_auth %>
90
90
  response:
@@ -120,7 +120,7 @@ http_interactions:
120
120
  string: priority=2
121
121
  headers:
122
122
  User-Agent:
123
- - PewPew Ruby Gem 0.0.1
123
+ - <%= user_agent %>
124
124
  Authorization:
125
125
  - Basic <%= basic_auth %>
126
126
  Content-Type:
@@ -158,7 +158,7 @@ http_interactions:
158
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
159
  headers:
160
160
  User-Agent:
161
- - PewPew Ruby Gem 0.0.1
161
+ - <%= user_agent %>
162
162
  Authorization:
163
163
  - Basic <%= basic_auth %>
164
164
  Content-Type:
@@ -197,7 +197,7 @@ http_interactions:
197
197
  string: ''
198
198
  headers:
199
199
  User-Agent:
200
- - PewPew Ruby Gem 0.0.1
200
+ - <%= user_agent %>
201
201
  Authorization:
202
202
  - Basic <%= basic_auth %>
203
203
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  response:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: address=test%40example.com&tag=newsletter
9
9
  headers:
10
10
  User-Agent:
11
- - PewPew Ruby Gem 0.0.1
11
+ - <%= user_agent %>
12
12
  Authorization:
13
13
  - Basic <%= basic_auth %>
14
14
  Content-Type:
@@ -44,7 +44,7 @@ http_interactions:
44
44
  string: address=test%40example.com&tag=%2A
45
45
  headers:
46
46
  User-Agent:
47
- - PewPew Ruby Gem 0.0.1
47
+ - <%= user_agent %>
48
48
  Authorization:
49
49
  - Basic <%= basic_auth %>
50
50
  Content-Type:
@@ -80,7 +80,7 @@ http_interactions:
80
80
  string: ''
81
81
  headers:
82
82
  User-Agent:
83
- - PewPew Ruby Gem 0.0.1
83
+ - <%= user_agent %>
84
84
  Authorization:
85
85
  - Basic <%= basic_auth %>
86
86
  response:
@@ -118,7 +118,7 @@ http_interactions:
118
118
  string: ''
119
119
  headers:
120
120
  User-Agent:
121
- - PewPew Ruby Gem 0.0.1
121
+ - <%= user_agent %>
122
122
  Authorization:
123
123
  - Basic <%= basic_auth %>
124
124
  response:
@@ -156,7 +156,7 @@ http_interactions:
156
156
  string: ''
157
157
  headers:
158
158
  User-Agent:
159
- - PewPew Ruby Gem 0.0.1
159
+ - <%= user_agent %>
160
160
  Authorization:
161
161
  - Basic <%= basic_auth %>
162
162
  response:
@@ -190,7 +190,7 @@ http_interactions:
190
190
  string: ''
191
191
  headers:
192
192
  User-Agent:
193
- - PewPew Ruby Gem 0.0.1
193
+ - <%= user_agent %>
194
194
  Authorization:
195
195
  - Basic <%= basic_auth %>
196
196
  response:
@@ -15,7 +15,11 @@ shared_context 'API request', :resource do
15
15
  vcr_options = {
16
16
  record: (ENV['VCR_RECORD'] || :none).to_sym,
17
17
  match_requests_on: [:method, :uri, :headers, :body],
18
- erb: { basic_auth: basic_auth, domain: client.config.domain }
18
+ erb: {
19
+ basic_auth: basic_auth,
20
+ domain: client.config.domain,
21
+ user_agent: client.config.user_agent
22
+ }
19
23
  }
20
24
 
21
25
  VCR.use_cassette(cassette_name, vcr_options, &example)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pew_pew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-04 00:00:00.000000000 Z
12
+ date: 2012-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday_middleware
@@ -99,7 +99,9 @@ extra_rdoc_files: []
99
99
  files:
100
100
  - .gitignore
101
101
  - .rspec
102
+ - .travis.yml
102
103
  - .yardopts
104
+ - CHANGELOG.md
103
105
  - Gemfile
104
106
  - LICENSE
105
107
  - README.md
@@ -164,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
166
  requirements:
165
167
  - - ! '>='
166
168
  - !ruby/object:Gem::Version
167
- version: '0'
169
+ version: '1.9'
168
170
  required_rubygems_version: !ruby/object:Gem::Requirement
169
171
  none: false
170
172
  requirements: