twilio 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ rdoc
6
6
  .bundle
7
7
  Gemfile.lock
8
8
  pkg/*
9
+ .rvmrc
@@ -1,5 +1,11 @@
1
1
  = Twilio Gem Changelog
2
2
 
3
+ == 3.1.0
4
+
5
+ * Better handling of Builder version for greater compat
6
+ * Reject verb
7
+ * Dependency on recent, improved version of HTTParty
8
+
3
9
  == 3.0.1
4
10
 
5
11
  * Bumped down Builder version requirement for Rails compat
@@ -44,6 +44,11 @@ and you can nest multiple verbs inside a block:
44
44
 
45
45
  Note: don't require 'rubygems' in any file (http://www.rubyinside.com/why-using-require-rubygems-is-wrong-1478.html)
46
46
 
47
+ == Testing
48
+
49
+ * Currently using RSpec
50
+ * Tested with REE 1.8.7, MRI 1.9.2, and MRI 1.9.3
51
+
47
52
  == Copyright
48
53
 
49
54
  Copyright (c) 2009-2011 Phil Misiowiec, Webficient LLC. See LICENSE for details.
@@ -53,6 +58,7 @@ Copyright (c) 2009-2011 Phil Misiowiec, Webficient LLC. See LICENSE for details.
53
58
  * Kyle Daigle
54
59
  * Yuri Gadow
55
60
  * Kyle Humberto
61
+ * Vlad Moskovets
56
62
  * Jonathan Rudenberg
57
63
  * Mark Turner
58
64
  * Jeff Wigal
@@ -355,6 +355,21 @@ module Twilio
355
355
  output { @xml.Number(number_to_dial, options) }
356
356
  end
357
357
 
358
+
359
+ # The Reject verb rejects an incoming call to your Twilio number without billing you
360
+ # (see http://www.twilio.com/docs/api/twiml/reject)
361
+ # Examples:
362
+ #
363
+ # Twilio::Verb.reject
364
+ #
365
+ # If reject is called with an argument:
366
+ #
367
+ # Twilio::Verb.reject :reason => "busy"
368
+ #
369
+ def reject options = {}
370
+ output { @xml.Reject(options) }
371
+ end
372
+
358
373
  private
359
374
 
360
375
  def output
@@ -369,4 +384,4 @@ module Twilio
369
384
  end
370
385
  end
371
386
  end
372
- end
387
+ end
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = "3.0.1"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -80,4 +80,7 @@ dial_muted_conference:
80
80
  response: <?xml version="1.0" encoding="UTF-8"?><Response><Dial><Conference mute="true">MyRoom</Conference></Dial></Response>
81
81
 
82
82
  hangup:
83
- response: <?xml version="1.0" encoding="UTF-8"?><Response><Hangup/></Response>
83
+ response: <?xml version="1.0" encoding="UTF-8"?><Response><Hangup/></Response>
84
+
85
+ reject:
86
+ response: <?xml version="1.0" encoding="UTF-8"?><Response><Reject/></Response>
@@ -224,6 +224,24 @@ describe "Verb" do
224
224
  end
225
225
  end
226
226
 
227
+ context "Reject" do
228
+ it "rejects" do
229
+ Twilio::Verb.reject.should == verb_response(:reject)
230
+ end
231
+
232
+ it "just rejects incoming call" do
233
+ verb = Twilio::Verb.new { |v|
234
+ v.reject
235
+ }.response.should match %r{<Reject/>}
236
+ end
237
+
238
+ it "just rejects incoming call with 'busy' status" do
239
+ verb = Twilio::Verb.new { |v|
240
+ v.reject :reason => 'busy'
241
+ }.response.should match %r{<Reject reason="busy"/>}
242
+ end
243
+ end
244
+
227
245
  context "SMS" do
228
246
  it "sends a simple SMS message" do
229
247
  verb = Twilio::Verb.new { |v|
@@ -232,4 +250,4 @@ describe "Verb" do
232
250
  end
233
251
  end
234
252
 
235
- end
253
+ end
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = "twilio"
7
7
  s.version = Twilio::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
9
+ s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow", "Vlad Moskovets"]
10
10
  s.email = ["github@webficient.com"]
11
11
  s.homepage = ""
12
12
  s.summary = %q{Twilio API Client}
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency "builder", "~> 2.1.2"
23
- s.add_dependency "httparty", "~> 0.7.4"
22
+ s.add_dependency "builder", ">= 2.1.2"
23
+ s.add_dependency "httparty", "~> 0.8"
24
24
 
25
25
  {
26
26
  'rake' => '~> 0.8.7',
metadata CHANGED
@@ -1,118 +1,84 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: twilio
3
- version: !ruby/object:Gem::Version
4
- hash: 5
5
- prerelease: false
6
- segments:
7
- - 3
8
- - 0
9
- - 1
10
- version: 3.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.1.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Phil Misiowiec
14
9
  - Jonathan Rudenberg
15
10
  - Alex K Wolfe
16
11
  - Kyle Daigle
17
12
  - Jeff Wigal
18
13
  - Yuri Gadow
14
+ - Vlad Moskovets
19
15
  autorequire:
20
16
  bindir: bin
21
17
  cert_chain: []
22
-
23
- date: 2011-03-30 00:00:00 -07:00
24
- default_executable:
25
- dependencies:
26
- - !ruby/object:Gem::Dependency
18
+ date: 2011-11-18 00:00:00.000000000 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
27
21
  name: builder
28
- prerelease: false
29
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ requirement: &70110448346600 !ruby/object:Gem::Requirement
30
23
  none: false
31
- requirements:
32
- - - ~>
33
- - !ruby/object:Gem::Version
34
- hash: 15
35
- segments:
36
- - 2
37
- - 1
38
- - 2
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
39
27
  version: 2.1.2
40
28
  type: :runtime
41
- version_requirements: *id001
42
- - !ruby/object:Gem::Dependency
43
- name: httparty
44
29
  prerelease: false
45
- requirement: &id002 !ruby/object:Gem::Requirement
30
+ version_requirements: *70110448346600
31
+ - !ruby/object:Gem::Dependency
32
+ name: httparty
33
+ requirement: &70110448345880 !ruby/object:Gem::Requirement
46
34
  none: false
47
- requirements:
35
+ requirements:
48
36
  - - ~>
49
- - !ruby/object:Gem::Version
50
- hash: 11
51
- segments:
52
- - 0
53
- - 7
54
- - 4
55
- version: 0.7.4
37
+ - !ruby/object:Gem::Version
38
+ version: '0.8'
56
39
  type: :runtime
57
- version_requirements: *id002
58
- - !ruby/object:Gem::Dependency
59
- name: rake
60
40
  prerelease: false
61
- requirement: &id003 !ruby/object:Gem::Requirement
41
+ version_requirements: *70110448345880
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: &70110448345060 !ruby/object:Gem::Requirement
62
45
  none: false
63
- requirements:
46
+ requirements:
64
47
  - - ~>
65
- - !ruby/object:Gem::Version
66
- hash: 49
67
- segments:
68
- - 0
69
- - 8
70
- - 7
48
+ - !ruby/object:Gem::Version
71
49
  version: 0.8.7
72
50
  type: :development
73
- version_requirements: *id003
74
- - !ruby/object:Gem::Dependency
75
- name: rspec
76
51
  prerelease: false
77
- requirement: &id004 !ruby/object:Gem::Requirement
52
+ version_requirements: *70110448345060
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ requirement: &70110448344600 !ruby/object:Gem::Requirement
78
56
  none: false
79
- requirements:
57
+ requirements:
80
58
  - - ~>
81
- - !ruby/object:Gem::Version
82
- hash: 27
83
- segments:
84
- - 2
85
- - 5
86
- - 0
59
+ - !ruby/object:Gem::Version
87
60
  version: 2.5.0
88
61
  type: :development
89
- version_requirements: *id004
90
- - !ruby/object:Gem::Dependency
91
- name: webmock
92
62
  prerelease: false
93
- requirement: &id005 !ruby/object:Gem::Requirement
63
+ version_requirements: *70110448344600
64
+ - !ruby/object:Gem::Dependency
65
+ name: webmock
66
+ requirement: &70110448344160 !ruby/object:Gem::Requirement
94
67
  none: false
95
- requirements:
68
+ requirements:
96
69
  - - ~>
97
- - !ruby/object:Gem::Version
98
- hash: 11
99
- segments:
100
- - 1
101
- - 6
102
- - 2
70
+ - !ruby/object:Gem::Version
103
71
  version: 1.6.2
104
72
  type: :development
105
- version_requirements: *id005
73
+ prerelease: false
74
+ version_requirements: *70110448344160
106
75
  description: Twilio API wrapper
107
- email:
76
+ email:
108
77
  - github@webficient.com
109
78
  executables: []
110
-
111
79
  extensions: []
112
-
113
80
  extra_rdoc_files: []
114
-
115
- files:
81
+ files:
116
82
  - .gitignore
117
83
  - CHANGELOG.rdoc
118
84
  - Gemfile
@@ -177,41 +143,37 @@ files:
177
143
  - spec/twilio/sms_spec.rb
178
144
  - spec/twilio/verb_spec.rb
179
145
  - twilio.gemspec
180
- has_rdoc: true
181
- homepage: ""
146
+ homepage: ''
182
147
  licenses: []
183
-
184
148
  post_install_message:
185
149
  rdoc_options: []
186
-
187
- require_paths:
150
+ require_paths:
188
151
  - lib
189
- required_ruby_version: !ruby/object:Gem::Requirement
152
+ required_ruby_version: !ruby/object:Gem::Requirement
190
153
  none: false
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- hash: 3
195
- segments:
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ segments:
196
159
  - 0
197
- version: "0"
198
- required_rubygems_version: !ruby/object:Gem::Requirement
160
+ hash: -1539534090918622271
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
162
  none: false
200
- requirements:
201
- - - ">="
202
- - !ruby/object:Gem::Version
203
- hash: 3
204
- segments:
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ segments:
205
168
  - 0
206
- version: "0"
169
+ hash: -1539534090918622271
207
170
  requirements: []
208
-
209
171
  rubyforge_project: twilio
210
- rubygems_version: 1.3.7
172
+ rubygems_version: 1.8.10
211
173
  signing_key:
212
174
  specification_version: 3
213
175
  summary: Twilio API Client
214
- test_files:
176
+ test_files:
215
177
  - spec/fixtures/xml/account.xml
216
178
  - spec/fixtures/xml/account_renamed.xml
217
179
  - spec/fixtures/xml/available_phone_numbers_local.xml