twilio 2.9.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/.gitignore +4 -1
  2. data/CHANGELOG.rdoc +27 -0
  3. data/Gemfile +4 -0
  4. data/README.rdoc +16 -6
  5. data/Rakefile +6 -46
  6. data/lib/twilio.rb +21 -6
  7. data/lib/twilio/account.rb +1 -1
  8. data/lib/twilio/available_phone_numbers.rb +56 -0
  9. data/lib/twilio/call.rb +4 -4
  10. data/lib/twilio/conference.rb +6 -6
  11. data/lib/twilio/incoming_phone_number.rb +16 -2
  12. data/lib/twilio/notification.rb +2 -2
  13. data/lib/twilio/outgoing_caller_id.rb +5 -4
  14. data/lib/twilio/recording.rb +2 -2
  15. data/lib/twilio/sms.rb +2 -2
  16. data/lib/twilio/twilio_object.rb +8 -5
  17. data/lib/twilio/version.rb +3 -0
  18. data/spec/fixtures/xml/account.xml +23 -0
  19. data/{test → spec}/fixtures/xml/account_renamed.xml +0 -0
  20. data/spec/fixtures/xml/available_phone_numbers_local.xml +26 -0
  21. data/spec/fixtures/xml/available_phone_numbers_local_search.xml +15 -0
  22. data/spec/fixtures/xml/available_phone_numbers_toll_free.xml +14 -0
  23. data/spec/fixtures/xml/available_phone_numbers_toll_free_search.xml +10 -0
  24. data/{test → spec}/fixtures/xml/call.xml +0 -0
  25. data/{test → spec}/fixtures/xml/call_new.xml +0 -0
  26. data/{test → spec}/fixtures/xml/call_redirected.xml +0 -0
  27. data/{test → spec}/fixtures/xml/calls.xml +0 -0
  28. data/{test → spec}/fixtures/xml/conference.xml +1 -1
  29. data/{test → spec}/fixtures/xml/conference_participant.xml +0 -0
  30. data/{test → spec}/fixtures/xml/conference_participant_muted.xml +0 -0
  31. data/{test → spec}/fixtures/xml/conference_participants.xml +0 -0
  32. data/{test → spec}/fixtures/xml/conferences.xml +0 -0
  33. data/{test → spec}/fixtures/xml/incoming_phone_number.xml +0 -0
  34. data/{test → spec}/fixtures/xml/incoming_phone_numbers.xml +0 -0
  35. data/{test → spec}/fixtures/xml/notification.xml +0 -0
  36. data/{test → spec}/fixtures/xml/notifications.xml +0 -0
  37. data/{test → spec}/fixtures/xml/outgoing_caller_id.xml +0 -0
  38. data/{test → spec}/fixtures/xml/outgoing_caller_id_new.xml +0 -0
  39. data/{test → spec}/fixtures/xml/outgoing_caller_ids.xml +0 -0
  40. data/{test → spec}/fixtures/xml/recording.xml +0 -0
  41. data/{test → spec}/fixtures/xml/recordings.xml +0 -0
  42. data/{test → spec}/fixtures/xml/sms.xml +0 -0
  43. data/{test → spec}/fixtures/xml/sms_messages.xml +0 -0
  44. data/{test → spec}/fixtures/xml/sms_new.xml +0 -0
  45. data/{test → spec}/fixtures/xml/sms_new_with_callback.xml +0 -0
  46. data/{test → spec}/fixtures/xml/transcription.xml +0 -0
  47. data/{test → spec}/fixtures/xml/transcriptions.xml +0 -0
  48. data/{test → spec}/fixtures/yml/verb_responses.yml +0 -0
  49. data/spec/spec_helper.rb +17 -0
  50. data/spec/support/twilio_helpers.rb +52 -0
  51. data/spec/twilio/account_spec.rb +21 -0
  52. data/spec/twilio/available_phone_numbers_spec.rb +53 -0
  53. data/spec/twilio/call_spec.rb +64 -0
  54. data/spec/twilio/conference_spec.rb +58 -0
  55. data/spec/twilio/incoming_phone_number_spec.rb +42 -0
  56. data/spec/twilio/live_connection_spec.rb +21 -0
  57. data/spec/twilio/notification_spec.rb +29 -0
  58. data/spec/twilio/outgoing_caller_id_spec.rb +43 -0
  59. data/spec/twilio/recording_spec.rb +44 -0
  60. data/spec/twilio/sms_spec.rb +36 -0
  61. data/spec/twilio/verb_spec.rb +235 -0
  62. data/twilio.gemspec +23 -111
  63. metadata +164 -82
  64. data/VERSION.yml +0 -5
  65. data/lib/twilio/connection.rb +0 -24
  66. data/lib/twilio/local_phone_number.rb +0 -26
  67. data/lib/twilio/toll_free_phone_number.rb +0 -26
  68. data/test/fixtures/xml/account.xml +0 -11
  69. data/test/test_helper.rb +0 -33
  70. data/test/twilio/account_test.rb +0 -28
  71. data/test/twilio/call_test.rb +0 -66
  72. data/test/twilio/conference_test.rb +0 -46
  73. data/test/twilio/connection_test.rb +0 -25
  74. data/test/twilio/incoming_phone_number_test.rb +0 -31
  75. data/test/twilio/local_phone_number_test.rb +0 -37
  76. data/test/twilio/notification_test.rb +0 -35
  77. data/test/twilio/outgoing_caller_id_test.rb +0 -45
  78. data/test/twilio/recording_test.rb +0 -47
  79. data/test/twilio/sms_test.rb +0 -27
  80. data/test/twilio/toll_free_phone_number_test.rb +0 -38
  81. data/test/twilio/verb_test.rb +0 -244
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Outgoing Caller ID" do
4
+ before(:all) do
5
+ Twilio.connect('mysid', 'mytoken')
6
+ @callerid_sid = 'PNe536dfda7c6184afab78d980cb8cdf43'
7
+ end
8
+
9
+ it "gets a list of caller id's" do
10
+ response, url = stub_get(:outgoing_caller_ids, 'OutgoingCallerIds')
11
+
12
+ Twilio::OutgoingCallerId.list.should == response
13
+ WebMock.should have_requested(:get, url)
14
+ end
15
+
16
+ it "gets a specific caller id" do
17
+ response, url = stub_get(:outgoing_caller_id, "OutgoingCallerIds/#{@callerid_sid}")
18
+
19
+ Twilio::OutgoingCallerId.get(@callerid_sid).should == response
20
+ WebMock.should have_requested(:get, url)
21
+ end
22
+
23
+ it "is created" do
24
+ response, url = stub_post(:outgoing_caller_id_new, 'OutgoingCallerIds')
25
+
26
+ Twilio::OutgoingCallerId.create('4158675309', 'My Home Phone').should == response
27
+ WebMock.should have_requested(:post, url)
28
+ end
29
+
30
+ it "is deleted" do
31
+ response, url = stub_delete(:outgoing_caller_id, "OutgoingCallerIds/#{@callerid_sid}")
32
+
33
+ Twilio::OutgoingCallerId.delete(@callerid_sid).should == response
34
+ WebMock.should have_requested(:delete, url)
35
+ end
36
+
37
+ it "updates name" do
38
+ response, url = stub_put(:outgoing_caller_id, "OutgoingCallerIds/#{@callerid_sid}")
39
+
40
+ Twilio::OutgoingCallerId.update_name(@callerid_sid, 'My office line').should == response
41
+ WebMock.should have_requested(:put, url)
42
+ end
43
+ end
@@ -0,0 +1,44 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Recording" do
4
+ before(:all) do
5
+ Twilio.connect('mysid', 'mytoken')
6
+ @recording_sid = 'RE41331862605f3d662488fdafda2e175f'
7
+ @transcription_sid = 'TRbdece5b75f2cd8f6ef38e0a10f5c4447'
8
+ end
9
+
10
+ it "gets a list of recordings" do
11
+ response, url = stub_get(:recordings, 'Recordings')
12
+
13
+ Twilio::Recording.list.should == response
14
+ WebMock.should have_requested(:get, url)
15
+ end
16
+
17
+ it "gets a specific recording" do
18
+ response, url = stub_get(:recording, "Recordings/#{@recording_sid}")
19
+
20
+ Twilio::Recording.get(@recording_sid).should == response
21
+ WebMock.should have_requested(:get, url)
22
+ end
23
+
24
+ it "is deleted" do
25
+ response, url = stub_delete(:recording, "Recordings/#{@recording_sid}")
26
+
27
+ Twilio::Recording.delete(@recording_sid).should == response
28
+ WebMock.should have_requested(:delete, url)
29
+ end
30
+
31
+ it "gets a list of transcriptions" do
32
+ response, url = stub_get(:transcriptions, "Recordings/#{@recording_sid}/Transcriptions")
33
+
34
+ Twilio::Recording.transcriptions(@recording_sid).should == response
35
+ WebMock.should have_requested(:get, url)
36
+ end
37
+
38
+ it "gets a specific transcription" do
39
+ response, url = stub_get(:transcriptions, "Recordings/#{@recording_sid}/Transcriptions/#{@transcription_sid}")
40
+
41
+ Twilio::Recording.transcriptions(@recording_sid, @transcription_sid).should == response
42
+ WebMock.should have_requested(:get, url)
43
+ end
44
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe "SMS" do
4
+ before(:all) do
5
+ Twilio.connect('mysid', 'mytoken')
6
+ @sms_sid = 'SM872fb94e3b358913777cdb313f25b46f'
7
+ end
8
+
9
+ it "gets a list of SMS messages" do
10
+ response, url = stub_get(:sms_messages, 'SMS/Messages')
11
+
12
+ Twilio::Sms.list.should == response
13
+ WebMock.should have_requested(:get, url)
14
+ end
15
+
16
+ it "gets a specific SMS message" do
17
+ response, url = stub_get(:sms, "SMS/Messages/#{@sms_sid}")
18
+
19
+ Twilio::Sms.get(@sms_sid).should == response
20
+ WebMock.should have_requested(:get, url)
21
+ end
22
+
23
+ it "is created" do
24
+ response, url = stub_post(:sms_new, "SMS/Messages")
25
+
26
+ Twilio::Sms.message('4155551212', '5558675309', 'Hi Jenny! Want to grab dinner?').should == response
27
+ WebMock.should have_requested(:post, url)
28
+ end
29
+
30
+ it "is created with a callback URL" do
31
+ response, url = stub_post(:sms_new_with_callback, "SMS/Messages")
32
+
33
+ Twilio::Sms.message('4155551212', '5558675309', 'Hi Jenny! Want to grab dinner?', 'http://example.com/callback').should == response
34
+ WebMock.should have_requested(:post, url)
35
+ end
36
+ end
@@ -0,0 +1,235 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Verb" do
4
+
5
+ context "Say" do
6
+ it "says 'hi'" do
7
+ Twilio::Verb.say('hi').should match %r{<Say( loop="1"| language="en"| voice="man"){3}>hi</Say>}
8
+ end
9
+
10
+ it "says 'hi' with female voice" do
11
+ Twilio::Verb.say('hi', :voice => 'woman').should match %r{<Say( loop="1"| language="en"| voice="woman"){3}>hi</Say>}
12
+ end
13
+
14
+ it "says 'hola' in Spanish with female voice" do
15
+ Twilio::Verb.say('hola', :voice => 'woman', :language => 'es').should match %r{<Say( loop="1"| language="es"| voice="woman"){3}>hola</Say>}
16
+ end
17
+
18
+ it "says 'hi' three times" do
19
+ Twilio::Verb.say('hi', :loop => 3).should match %r{<Say( loop="3"| language="en"| voice="man"){3}>hi</Say>}
20
+ end
21
+
22
+ it "says 'hi' three times with pause" do
23
+ Twilio::Verb.say('hi', :loop => 3, :pause => true).should match %r{<Say( language="en"| voice="man"){2}>hi</Say><Pause/><Say( language="en"| voice="man"){2}>hi</Say><Pause/><Say( language="en"| voice="man"){2}>hi</Say>}
24
+ end
25
+
26
+ it "says 'hi' with pause and say 'bye'" do
27
+ verb = Twilio::Verb.new { |v|
28
+ v.say 'hi', :loop => 1
29
+ v.pause
30
+ v.say 'bye'
31
+ }.response.should match %r{<Say( loop="1"| language="en"| voice="man"){3}>hi</Say><Pause></Pause><Say( loop="1"| language="en"| voice="man"){3}>bye</Say>}
32
+ end
33
+
34
+ it "says 'hi' with 2 second pause and say 'bye'" do
35
+ verb = Twilio::Verb.new { |v|
36
+ v.say 'hi'
37
+ v.pause :length => 2
38
+ v.say 'bye'
39
+ }.response.should match %r{<Say( loop="1"| language="en"| voice="man"){3}>hi</Say><Pause length="2"/><Say( loop="1"| language="en"| voice="man"){3}>bye</Say>}
40
+ end
41
+ end
42
+
43
+ context "Play" do
44
+ it "plays mp3 response" do
45
+ Twilio::Verb.play('http://foo.com/cowbell.mp3').should == verb_response(:play_mp3)
46
+ end
47
+
48
+ it "plays mp3 response two times" do
49
+ Twilio::Verb.play('http://foo.com/cowbell.mp3', :loop => 2).should == verb_response(:play_mp3_two_times)
50
+ end
51
+
52
+ it "plays mp3 response two times with pause" do
53
+ Twilio::Verb.play('http://foo.com/cowbell.mp3', :loop => 2, :pause => true).should == verb_response(:play_mp3_two_times_with_pause)
54
+ end
55
+ end
56
+
57
+ context "Gather" do
58
+ it "gathers" do
59
+ Twilio::Verb.gather.should == verb_response(:gather)
60
+ end
61
+
62
+ it "gathers with action" do
63
+ Twilio::Verb.gather(:action => 'http://foobar.com').should == verb_response(:gather_with_action)
64
+ end
65
+
66
+ it "gathers with GET method" do
67
+ Twilio::Verb.gather(:method => 'GET').should == verb_response(:gather_with_get_method)
68
+ end
69
+
70
+ it "gathers with timeout" do
71
+ Twilio::Verb.gather(:timeout => 10).should == verb_response(:gather_with_timeout)
72
+ end
73
+
74
+ it "gathers with finish key" do
75
+ Twilio::Verb.gather(:finishOnKey => '*').should == verb_response(:gather_with_finish_key)
76
+ end
77
+
78
+ it "gathers with num digits" do
79
+ Twilio::Verb.gather(:numDigits => 5).should == verb_response(:gather_with_num_digits)
80
+ end
81
+
82
+ it "gathers with all options set" do
83
+ Twilio::Verb.gather(:action => 'http://foobar.com',
84
+ :finishOnKey => '*',
85
+ :method => 'GET',
86
+ :numDigits => 5,
87
+ :timeout => 10).should match %r{<Gather( finishOnKey="\*"| action="http://foobar.com"| method="GET"| numDigits="5"| timeout="10"){5}/>}
88
+ end
89
+
90
+ it "gathers and says instructions" do
91
+ verb = Twilio::Verb.new { |v|
92
+ v.gather {
93
+ v.say 'Please enter your account number followed by the pound sign'
94
+ }
95
+ v.say "We didn't receive any input. Goodbye!"
96
+ }.response.should match %r{<Gather><Say( loop="1"| language="en"| voice="man"){3}>Please enter your account number followed by the pound sign</Say></Gather><Say( loop="1"| language="en"| voice="man"){3}>We didn't receive any input. Goodbye!</Say>}
97
+ end
98
+
99
+ it "gathers with timeout and says instructions" do
100
+ verb = Twilio::Verb.new { |v|
101
+ v.gather(:timeout => 10) {
102
+ v.say 'Please enter your account number followed by the pound sign'
103
+ }
104
+ v.say "We didn't receive any input. Goodbye!"
105
+ }.response.should match %r{<Gather timeout="10"><Say( loop="1"| language="en"| voice="man"){3}>Please enter your account number followed by the pound sign</Say></Gather><Say( loop="1"| language="en"| voice="man"){3}>We didn't receive any input. Goodbye!</Say>}
106
+ end
107
+ end
108
+
109
+ context "Record" do
110
+ it "records" do
111
+ Twilio::Verb.record.should == verb_response(:record)
112
+ end
113
+
114
+ it "records with action" do
115
+ Twilio::Verb.record(:action => 'http://foobar.com').should == verb_response(:record_with_action)
116
+ end
117
+
118
+ it "records with GET method" do
119
+ Twilio::Verb.record(:method => 'GET').should == verb_response(:record_with_get_method)
120
+ end
121
+
122
+ it "records with timeout" do
123
+ Twilio::Verb.record(:timeout => 10).should == verb_response(:record_with_timeout)
124
+ end
125
+
126
+ it "records with finish key" do
127
+ Twilio::Verb.record(:finishOnKey => '*').should == verb_response(:record_with_finish_key)
128
+ end
129
+
130
+ it "records with max length" do
131
+ Twilio::Verb.record(:maxLength => 1800).should == verb_response(:record_with_max_length)
132
+ end
133
+
134
+ it "records with transcribe" do
135
+ Twilio::Verb.record(:transcribe => true, :transcribeCallback => '/handle_transcribe').should match %r{<Record( transcribe="true"| transcribeCallback="/handle_transcribe"){2}/>}
136
+ end
137
+ end
138
+
139
+ context "Dial" do
140
+ it "dials" do
141
+ Twilio::Verb.dial('415-123-4567').should == verb_response(:dial)
142
+ end
143
+
144
+ it "dials with action" do
145
+ Twilio::Verb.dial('415-123-4567', :action => 'http://foobar.com').should == verb_response(:dial_with_action)
146
+ end
147
+
148
+ it "dials with GET method" do
149
+ Twilio::Verb.dial('415-123-4567', :method => 'GET').should == verb_response(:dial_with_get_method)
150
+ end
151
+
152
+ it "dials with timeout" do
153
+ Twilio::Verb.dial('415-123-4567', :timeout => 10).should == verb_response(:dial_with_timeout)
154
+ end
155
+
156
+ it "dials with hangup on star" do
157
+ Twilio::Verb.dial('415-123-4567', :hangupOnStar => true).should == verb_response(:dial_with_hangup_on_star)
158
+ end
159
+
160
+ it "dials with time limit" do
161
+ Twilio::Verb.dial('415-123-4567', :timeLimit => 3600).should == verb_response(:dial_with_time_limit)
162
+ end
163
+
164
+ it "dials with caller id" do
165
+ Twilio::Verb.dial('415-123-4567', :callerId => '858-987-6543').should == verb_response(:dial_with_caller_id)
166
+ end
167
+
168
+ it "dials with timeout and caller id" do
169
+ Twilio::Verb.dial('415-123-4567', :timeout => 10, :callerId => '858-987-6543').should match %r{<Dial( timeout="10"| callerId="858-987-6543"){2}>415-123-4567</Dial>}
170
+ end
171
+
172
+ it "dials with redirect" do
173
+ verb = Twilio::Verb.new { |v|
174
+ v.dial '415-123-4567'
175
+ v.redirect 'http://www.foo.com/nextInstructions'
176
+ }.response.should == verb_response(:dial_with_redirect)
177
+ end
178
+
179
+ it "dials with number and send digits" do
180
+ verb = Twilio::Verb.new { |v|
181
+ v.dial {
182
+ v.number('415-123-4567', :sendDigits => 'wwww1928')
183
+ }
184
+ }.response.should == verb_response(:dial_with_number_and_send_digits)
185
+ end
186
+
187
+ it "dials multiple numbers" do
188
+ verb = Twilio::Verb.new { |v|
189
+ v.dial {
190
+ v.number '415-123-4567'
191
+ v.number '415-123-4568'
192
+ v.number '415-123-4569'
193
+ }
194
+ }.response.should == verb_response(:dial_multiple_numbers)
195
+ end
196
+
197
+ it "dials a conference" do
198
+ verb = Twilio::Verb.new { |v|
199
+ v.dial {
200
+ v.conference 'MyRoom'
201
+ }
202
+ }.response.should == verb_response(:dial_conference)
203
+ end
204
+
205
+ it "dials a muted conference" do
206
+ verb = Twilio::Verb.new { |v|
207
+ v.dial {
208
+ v.conference 'MyRoom', :mute => :true
209
+ }
210
+ }.response.should == verb_response(:dial_muted_conference)
211
+ end
212
+ end
213
+
214
+ context "Hang Up" do
215
+ it "hangs up" do
216
+ Twilio::Verb.hangup.should == verb_response(:hangup)
217
+ end
218
+
219
+ it "says hi and hangs up" do
220
+ verb = Twilio::Verb.new { |v|
221
+ v.say 'hi'
222
+ v.hangup
223
+ }.response.should match %r{<Say( loop="1"| language="en"| voice="man"){3}>hi</Say><Hangup/>}
224
+ end
225
+ end
226
+
227
+ context "SMS" do
228
+ it "sends a simple SMS message" do
229
+ verb = Twilio::Verb.new { |v|
230
+ v.sms 'Join us at the bar', :to => "8005554321", :from => "9006661111", :action => "/smsService", :method => "GET"
231
+ }.response.should match %r{<Sms( to="8005554321"| from="9006661111"| action="/smsService"| method="GET"){4}>Join us at the bar</Sms>}
232
+ end
233
+ end
234
+
235
+ end
@@ -1,118 +1,30 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "twilio/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{twilio}
8
- s.version = "2.9.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
12
- s.date = %q{2010-10-27}
6
+ s.name = "twilio"
7
+ s.version = Twilio::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
10
+ s.email = ["github@webficient.com"]
11
+ s.homepage = ""
12
+ s.summary = %q{Twilio API Client}
13
13
  s.description = %q{Twilio API wrapper}
14
- s.email = %q{github@webficient.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".gitignore",
21
- "LICENSE",
22
- "README.rdoc",
23
- "Rakefile",
24
- "VERSION.yml",
25
- "lib/twilio.rb",
26
- "lib/twilio/account.rb",
27
- "lib/twilio/call.rb",
28
- "lib/twilio/conference.rb",
29
- "lib/twilio/connection.rb",
30
- "lib/twilio/incoming_phone_number.rb",
31
- "lib/twilio/local_phone_number.rb",
32
- "lib/twilio/notification.rb",
33
- "lib/twilio/outgoing_caller_id.rb",
34
- "lib/twilio/recording.rb",
35
- "lib/twilio/sms.rb",
36
- "lib/twilio/toll_free_phone_number.rb",
37
- "lib/twilio/twilio_object.rb",
38
- "lib/twilio/verb.rb",
39
- "test/fixtures/xml/account.xml",
40
- "test/fixtures/xml/account_renamed.xml",
41
- "test/fixtures/xml/call.xml",
42
- "test/fixtures/xml/call_new.xml",
43
- "test/fixtures/xml/call_redirected.xml",
44
- "test/fixtures/xml/calls.xml",
45
- "test/fixtures/xml/conference.xml",
46
- "test/fixtures/xml/conference_participant.xml",
47
- "test/fixtures/xml/conference_participant_muted.xml",
48
- "test/fixtures/xml/conference_participants.xml",
49
- "test/fixtures/xml/conferences.xml",
50
- "test/fixtures/xml/incoming_phone_number.xml",
51
- "test/fixtures/xml/incoming_phone_numbers.xml",
52
- "test/fixtures/xml/notification.xml",
53
- "test/fixtures/xml/notifications.xml",
54
- "test/fixtures/xml/outgoing_caller_id.xml",
55
- "test/fixtures/xml/outgoing_caller_id_new.xml",
56
- "test/fixtures/xml/outgoing_caller_ids.xml",
57
- "test/fixtures/xml/recording.xml",
58
- "test/fixtures/xml/recordings.xml",
59
- "test/fixtures/xml/sms.xml",
60
- "test/fixtures/xml/sms_messages.xml",
61
- "test/fixtures/xml/sms_new.xml",
62
- "test/fixtures/xml/sms_new_with_callback.xml",
63
- "test/fixtures/xml/transcription.xml",
64
- "test/fixtures/xml/transcriptions.xml",
65
- "test/fixtures/yml/verb_responses.yml",
66
- "test/test_helper.rb",
67
- "test/twilio/account_test.rb",
68
- "test/twilio/call_test.rb",
69
- "test/twilio/conference_test.rb",
70
- "test/twilio/connection_test.rb",
71
- "test/twilio/incoming_phone_number_test.rb",
72
- "test/twilio/local_phone_number_test.rb",
73
- "test/twilio/notification_test.rb",
74
- "test/twilio/outgoing_caller_id_test.rb",
75
- "test/twilio/recording_test.rb",
76
- "test/twilio/sms_test.rb",
77
- "test/twilio/toll_free_phone_number_test.rb",
78
- "test/twilio/verb_test.rb",
79
- "twilio.gemspec"
80
- ]
81
- s.homepage = %q{http://github.com/webficient/twilio}
82
- s.rdoc_options = ["--charset=UTF-8"]
83
- s.require_paths = ["lib"]
84
- s.rubygems_version = %q{1.3.7}
85
- s.summary = %q{Twilio API Client}
86
- s.test_files = [
87
- "test/test_helper.rb",
88
- "test/twilio/account_test.rb",
89
- "test/twilio/call_test.rb",
90
- "test/twilio/conference_test.rb",
91
- "test/twilio/connection_test.rb",
92
- "test/twilio/incoming_phone_number_test.rb",
93
- "test/twilio/local_phone_number_test.rb",
94
- "test/twilio/notification_test.rb",
95
- "test/twilio/outgoing_caller_id_test.rb",
96
- "test/twilio/recording_test.rb",
97
- "test/twilio/sms_test.rb",
98
- "test/twilio/toll_free_phone_number_test.rb",
99
- "test/twilio/verb_test.rb"
100
- ]
101
14
 
102
- if s.respond_to? :specification_version then
103
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
104
- s.specification_version = 3
15
+ s.rubyforge_project = "twilio"
105
16
 
106
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
107
- s.add_runtime_dependency(%q<builder>, [">= 2.1.2"])
108
- s.add_runtime_dependency(%q<httparty>, [">= 0.4.3"])
109
- else
110
- s.add_dependency(%q<builder>, [">= 2.1.2"])
111
- s.add_dependency(%q<httparty>, [">= 0.4.3"])
112
- end
113
- else
114
- s.add_dependency(%q<builder>, [">= 2.1.2"])
115
- s.add_dependency(%q<httparty>, [">= 0.4.3"])
116
- end
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency "builder", "~> 3.0"
23
+ s.add_dependency "httparty", "~> 0.7.4"
24
+
25
+ {
26
+ 'rake' => '~> 0.8.7',
27
+ 'rspec' => '~> 2.5.0',
28
+ 'webmock' => '~> 1.6.2'
29
+ }.each { |l, v| s. add_development_dependency l, v }
117
30
  end
118
-