twilio 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +24 -0
- data/Rakefile +49 -0
- data/VERSION.yml +4 -0
- data/lib/twilio.rb +42 -0
- data/lib/twilio/account.rb +12 -0
- data/lib/twilio/call.rb +34 -0
- data/lib/twilio/connection.rb +17 -0
- data/lib/twilio/incoming_phone_number.rb +13 -0
- data/lib/twilio/local_phone_number.rb +18 -0
- data/lib/twilio/notification.rb +17 -0
- data/lib/twilio/outgoing_caller_id.rb +29 -0
- data/lib/twilio/recording.rb +21 -0
- data/lib/twilio/toll_free_phone_number.rb +18 -0
- data/lib/twilio/twilio_object.rb +11 -0
- data/lib/twilio/verb.rb +186 -0
- data/test/fixtures/xml/account.xml +11 -0
- data/test/fixtures/xml/account_renamed.xml +11 -0
- data/test/fixtures/xml/call.xml +18 -0
- data/test/fixtures/xml/call_new.xml +14 -0
- data/test/fixtures/xml/calls.xml +36 -0
- data/test/fixtures/xml/incoming_phone_number.xml +12 -0
- data/test/fixtures/xml/incoming_phone_numbers.xml +24 -0
- data/test/fixtures/xml/notification.xml +19 -0
- data/test/fixtures/xml/notifications.xml +32 -0
- data/test/fixtures/xml/outgoing_caller_id.xml +10 -0
- data/test/fixtures/xml/outgoing_caller_id_new.xml +7 -0
- data/test/fixtures/xml/outgoing_caller_ids.xml +20 -0
- data/test/fixtures/xml/recording.xml +10 -0
- data/test/fixtures/xml/recordings.xml +20 -0
- data/test/fixtures/xml/transcription.xml +13 -0
- data/test/fixtures/xml/transcriptions.xml +26 -0
- data/test/fixtures/yml/verb_responses.yml +89 -0
- data/test/test_helper.rb +29 -0
- data/test/twilio/account_test.rb +23 -0
- data/test/twilio/call_test.rb +59 -0
- data/test/twilio/connection_test.rb +15 -0
- data/test/twilio/incoming_phone_number_test.rb +22 -0
- data/test/twilio/local_phone_number_test.rb +23 -0
- data/test/twilio/notification_test.rb +28 -0
- data/test/twilio/outgoing_caller_id_test.rb +42 -0
- data/test/twilio/recording_test.rb +42 -0
- data/test/twilio/toll_free_phone_number_test.rb +23 -0
- data/test/twilio/verb_test.rb +126 -0
- metadata +126 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class CallTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "A call" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
@call = Twilio::Call.new(@connection)
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be retrievable as a list" do
|
11
|
+
fake_response = fixture(:calls)
|
12
|
+
FakeWeb.register_uri(:get, twilio_url('Calls'), :string => fake_response)
|
13
|
+
assert_equal @call.list, fake_response
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be retrievable individually" do
|
17
|
+
fake_response = fixture(:call)
|
18
|
+
FakeWeb.register_uri(:get, twilio_url('Calls/CA42ed11f93dc08b952027ffbc406d0868'), :string => fake_response)
|
19
|
+
assert_equal @call.get('CA42ed11f93dc08b952027ffbc406d0868'), fake_response
|
20
|
+
end
|
21
|
+
|
22
|
+
should "be made" do
|
23
|
+
fake_response = fixture(:call_new)
|
24
|
+
FakeWeb.register_uri(:post, twilio_url('Calls'), :string => fake_response)
|
25
|
+
response = @call.make('4158675309', '4155551212', 'http://test.local/call_handler')
|
26
|
+
assert_equal response, fake_response
|
27
|
+
end
|
28
|
+
|
29
|
+
context "with segments" do
|
30
|
+
should "returns a list of Call resources that were segments created in the same call" do
|
31
|
+
fake_response = fixture(:calls)
|
32
|
+
FakeWeb.register_uri(:get, twilio_url('Calls/CA42ed11f93dc08b952027ffbc406d0868/Segments'), :string => fake_response)
|
33
|
+
assert_equal @call.segments('CA42ed11f93dc08b952027ffbc406d0868'), fake_response
|
34
|
+
end
|
35
|
+
|
36
|
+
should "returns a single Call resource for the CallSid and CallSegmentSid provided" do
|
37
|
+
fake_response = fixture(:calls)
|
38
|
+
FakeWeb.register_uri(:get, twilio_url('Calls/CA42ed11f93dc08b952027ffbc406d0868/Segments/abc123'), :string => fake_response)
|
39
|
+
assert_equal @call.segments('CA42ed11f93dc08b952027ffbc406d0868', 'abc123'), fake_response
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context "with recordings" do
|
44
|
+
should "returns a list of recordings that were generated during the call" do
|
45
|
+
fake_response = fixture(:recordings)
|
46
|
+
FakeWeb.register_uri(:get, twilio_url('Calls/CA42ed11f93dc08b952027ffbc406d0868/Recordings'), :string => fake_response)
|
47
|
+
assert_equal @call.recordings('CA42ed11f93dc08b952027ffbc406d0868'), fake_response
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
context "with notifications" do
|
52
|
+
should "description" do
|
53
|
+
fake_response = fixture(:notifications)
|
54
|
+
FakeWeb.register_uri(:get, twilio_url('Calls/CA42ed11f93dc08b952027ffbc406d0868/Notifications'), :string => fake_response)
|
55
|
+
assert_equal @call.notifications('CA42ed11f93dc08b952027ffbc406d0868'), fake_response
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class ConnectionTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "A Twilio connection" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
end
|
8
|
+
|
9
|
+
context "when initializing" do
|
10
|
+
should "have correct url" do
|
11
|
+
assert_equal "#{Twilio::Connection::TWILIO_URL}/mysid", @connection.class.base_uri
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class IncomingPhoneNumberTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "An incoming phone number" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
@incoming = Twilio::IncomingPhoneNumber.new(@connection)
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be retrievable as a list" do
|
11
|
+
fake_response = fixture(:incoming_phone_numbers)
|
12
|
+
FakeWeb.register_uri(:get, twilio_url('IncomingPhoneNumbers'), :string => fake_response)
|
13
|
+
assert_equal @incoming.list, fake_response
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be retrievable individually" do
|
17
|
+
fake_response = fixture(:incoming_phone_number)
|
18
|
+
FakeWeb.register_uri(:get, twilio_url('IncomingPhoneNumbers/PNe536dfda7c6184afab78d980cb8cdf43'), :string => fake_response)
|
19
|
+
assert_equal @incoming.get('PNe536dfda7c6184afab78d980cb8cdf43'), fake_response
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class LocalPhoneNumberTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "A local phone number" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
@local = Twilio::LocalPhoneNumber.new(@connection)
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be retrievable as a list" do
|
11
|
+
fake_response = fixture(:incoming_phone_numbers)
|
12
|
+
FakeWeb.register_uri(:get, twilio_url('IncomingPhoneNumbers/Local'), :string => fake_response)
|
13
|
+
assert_equal @local.list, fake_response
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be created" do
|
17
|
+
fake_response = fixture(:incoming_phone_number)
|
18
|
+
FakeWeb.register_uri(:post, twilio_url('IncomingPhoneNumbers/Local'), :string => fake_response)
|
19
|
+
response = @local.create('http://test.local/call_handler')
|
20
|
+
assert_equal response, fake_response
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class NotificationTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "A recording" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
@notification = Twilio::Notification.new(@connection)
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be retrievable as a list" do
|
11
|
+
fake_response = fixture(:notifications)
|
12
|
+
FakeWeb.register_uri(:get, twilio_url('Notifications'), :string => fake_response)
|
13
|
+
assert_equal @notification.list, fake_response
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be retrievable individually" do
|
17
|
+
fake_response = fixture(:notification)
|
18
|
+
FakeWeb.register_uri(:get, twilio_url('Notifications/NO1fb7086ceb85caed2265f17d7bf7981c'), :string => fake_response)
|
19
|
+
assert_equal @notification.get('NO1fb7086ceb85caed2265f17d7bf7981c'), fake_response
|
20
|
+
end
|
21
|
+
|
22
|
+
should "be deleted" do
|
23
|
+
FakeWeb.register_uri(:delete, twilio_url('Notifications/NO1fb7086ceb85caed2265f17d7bf7981c'), :status => [ 204, "HTTPNoContent" ])
|
24
|
+
response = @notification.delete('NO1fb7086ceb85caed2265f17d7bf7981c')
|
25
|
+
assert response
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class OutgoingCallerIdTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "An outgoing caller id" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
@caller_id = Twilio::OutgoingCallerId.new(@connection)
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be retrievable as a list" do
|
11
|
+
fake_response = fixture(:outgoing_caller_ids)
|
12
|
+
FakeWeb.register_uri(:get, twilio_url('OutgoingCallerIds'), :string => fake_response)
|
13
|
+
assert_equal @caller_id.list, fake_response
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be retrievable individually" do
|
17
|
+
fake_response = fixture(:outgoing_caller_id)
|
18
|
+
FakeWeb.register_uri(:get, twilio_url('OutgoingCallerIds/PNe536dfda7c6184afab78d980cb8cdf43'), :string => fake_response)
|
19
|
+
assert_equal @caller_id.get('PNe536dfda7c6184afab78d980cb8cdf43'), fake_response
|
20
|
+
end
|
21
|
+
|
22
|
+
should "be created" do
|
23
|
+
fake_response = fixture(:outgoing_caller_id_new)
|
24
|
+
FakeWeb.register_uri(:post, twilio_url('OutgoingCallerIds'), :string => fake_response)
|
25
|
+
response = @caller_id.create('4158675309', 'My Home Phone')
|
26
|
+
assert_equal response, fake_response
|
27
|
+
end
|
28
|
+
|
29
|
+
should "be able to update name" do
|
30
|
+
fake_response = fixture(:outgoing_caller_id)
|
31
|
+
FakeWeb.register_uri(:put, twilio_url('OutgoingCallerIds/PNe536dfda7c6184afab78d980cb8cdf43'), :string => fake_response)
|
32
|
+
response = @caller_id.update_name('PNe536dfda7c6184afab78d980cb8cdf43', 'My office line')
|
33
|
+
assert_equal response, fake_response
|
34
|
+
end
|
35
|
+
|
36
|
+
should "be deleted" do
|
37
|
+
FakeWeb.register_uri(:delete, twilio_url('OutgoingCallerIds/PNe536dfda7c6184afab78d980cb8cdf43'), :status => [ 204, "HTTPNoContent" ])
|
38
|
+
response = @caller_id.delete('PNe536dfda7c6184afab78d980cb8cdf43')
|
39
|
+
assert response
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class RecordingTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "A recording" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
@recording = Twilio::Recording.new(@connection)
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be retrievable as a list" do
|
11
|
+
fake_response = fixture(:recordings)
|
12
|
+
FakeWeb.register_uri(:get, twilio_url('Recordings'), :string => fake_response)
|
13
|
+
assert_equal @recording.list, fake_response
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be retrievable individually" do
|
17
|
+
fake_response = fixture(:recording)
|
18
|
+
FakeWeb.register_uri(:get, twilio_url('Recordings/RE41331862605f3d662488fdafda2e175f'), :string => fake_response)
|
19
|
+
assert_equal @recording.get('RE41331862605f3d662488fdafda2e175f'), fake_response
|
20
|
+
end
|
21
|
+
|
22
|
+
should "be deleted" do
|
23
|
+
FakeWeb.register_uri(:delete, twilio_url('Recordings/RE41331862605f3d662488fdafda2e175f'), :status => [ 204, "HTTPNoContent" ])
|
24
|
+
response = @recording.delete('RE41331862605f3d662488fdafda2e175f')
|
25
|
+
assert response
|
26
|
+
end
|
27
|
+
|
28
|
+
context "with transcriptions" do
|
29
|
+
should "be retrievable as a list" do
|
30
|
+
fake_response = fixture(:transcriptions)
|
31
|
+
FakeWeb.register_uri(:get, twilio_url('Recordings/RE41331862605f3d662488fdafda2e175f/Transcriptions'), :string => fake_response)
|
32
|
+
assert_equal @recording.transcriptions('RE41331862605f3d662488fdafda2e175f'), fake_response
|
33
|
+
end
|
34
|
+
|
35
|
+
should "be retrievable individually" do
|
36
|
+
fake_response = fixture(:transcription)
|
37
|
+
FakeWeb.register_uri(:get, twilio_url('Recordings/RE41331862605f3d662488fdafda2e175f/Transcriptions/TRbdece5b75f2cd8f6ef38e0a10f5c4447'), :string => fake_response)
|
38
|
+
assert_equal @recording.transcriptions('RE41331862605f3d662488fdafda2e175f', 'TRbdece5b75f2cd8f6ef38e0a10f5c4447'), fake_response
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class TollFreePhoneNumberTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "A toll free phone number" do
|
5
|
+
setup do
|
6
|
+
@connection = Twilio::Connection.new('mysid', 'mytoken')
|
7
|
+
@toll_free = Twilio::TollFreePhoneNumber.new(@connection)
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be retrievable as a list" do
|
11
|
+
fake_response = fixture(:incoming_phone_numbers)
|
12
|
+
FakeWeb.register_uri(:get, twilio_url('IncomingPhoneNumbers/TollFree'), :string => fake_response)
|
13
|
+
assert_equal @toll_free.list, fake_response
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be created" do
|
17
|
+
fake_response = fixture(:incoming_phone_number)
|
18
|
+
FakeWeb.register_uri(:post, twilio_url('IncomingPhoneNumbers/TollFree'), :string => fake_response)
|
19
|
+
response = @toll_free.create('http://test.local/call_handler')
|
20
|
+
assert_equal response, fake_response
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class VerbTest < Test::Unit::TestCase #:nodoc: all
|
4
|
+
context "A Twilio Verb" do
|
5
|
+
should "say 'hi'" do
|
6
|
+
assert_equal verb_response(:say_hi), Twilio::Verb.say('hi')
|
7
|
+
end
|
8
|
+
|
9
|
+
should "say 'hi' with female voice" do
|
10
|
+
assert_equal verb_response(:say_hi_with_female_voice), Twilio::Verb.say('hi', :voice => 'woman')
|
11
|
+
end
|
12
|
+
|
13
|
+
should "say 'hola' in Spanish with female voice" do
|
14
|
+
assert_equal verb_response(:say_hi_in_spanish_with_female_voice), Twilio::Verb.say('hola', {:voice => 'woman', :language => 'es'})
|
15
|
+
end
|
16
|
+
|
17
|
+
should "say 'hi' three times" do
|
18
|
+
assert_equal verb_response(:say_hi_three_times), Twilio::Verb.say_3_times('hi')
|
19
|
+
end
|
20
|
+
|
21
|
+
should "say 'hi' three times with pause" do
|
22
|
+
assert_equal verb_response(:say_hi_three_times_with_pause), Twilio::Verb.say_3_times_with_pause('hi')
|
23
|
+
end
|
24
|
+
|
25
|
+
should "play mp3 response" do
|
26
|
+
assert_equal verb_response(:play_mp3), Twilio::Verb.play('http://foo.com/cowbell.mp3')
|
27
|
+
end
|
28
|
+
|
29
|
+
should "play mp3 response two times" do
|
30
|
+
assert_equal verb_response(:play_mp3_two_times), Twilio::Verb.play_2_times('http://foo.com/cowbell.mp3')
|
31
|
+
end
|
32
|
+
|
33
|
+
should "play mp3 response two times with pause" do
|
34
|
+
assert_equal verb_response(:play_mp3_two_times_with_pause), Twilio::Verb.play_2_times_with_pause('http://foo.com/cowbell.mp3')
|
35
|
+
end
|
36
|
+
|
37
|
+
should "gather" do
|
38
|
+
assert_equal verb_response(:gather), Twilio::Verb.gather
|
39
|
+
end
|
40
|
+
|
41
|
+
should "gather with action" do
|
42
|
+
assert_equal verb_response(:gather_with_action), Twilio::Verb.gather(:action => 'http://foobar.com')
|
43
|
+
end
|
44
|
+
|
45
|
+
should "gather with GET method" do
|
46
|
+
assert_equal verb_response(:gather_with_get_method), Twilio::Verb.gather(:method => 'GET')
|
47
|
+
end
|
48
|
+
|
49
|
+
should "gather with timeout" do
|
50
|
+
assert_equal verb_response(:gather_with_timeout), Twilio::Verb.gather(:timeout => 10)
|
51
|
+
end
|
52
|
+
|
53
|
+
should "gather with finish key" do
|
54
|
+
assert_equal verb_response(:gather_with_finish_key), Twilio::Verb.gather(:finishOnKey => '*')
|
55
|
+
end
|
56
|
+
|
57
|
+
should "gather with num digits" do
|
58
|
+
assert_equal verb_response(:gather_with_num_digits), Twilio::Verb.gather(:numDigits => 5)
|
59
|
+
end
|
60
|
+
|
61
|
+
should "gather with all options set" do
|
62
|
+
assert_equal verb_response(:gather_with_all_options_set), Twilio::Verb.gather(:action => 'http://foobar.com', :method => 'GET', :timeout => 10, :finishOnKey => '*', :numDigits => 5)
|
63
|
+
end
|
64
|
+
|
65
|
+
should "record" do
|
66
|
+
assert_equal verb_response(:record), Twilio::Verb.record
|
67
|
+
end
|
68
|
+
|
69
|
+
should "record with action" do
|
70
|
+
assert_equal verb_response(:record_with_action), Twilio::Verb.record(:action => 'http://foobar.com')
|
71
|
+
end
|
72
|
+
|
73
|
+
should "record with GET method" do
|
74
|
+
assert_equal verb_response(:record_with_get_method), Twilio::Verb.record(:method => 'GET')
|
75
|
+
end
|
76
|
+
|
77
|
+
should "record with timeout" do
|
78
|
+
assert_equal verb_response(:record_with_timeout), Twilio::Verb.record(:timeout => 10)
|
79
|
+
end
|
80
|
+
|
81
|
+
should "record with finish key" do
|
82
|
+
assert_equal verb_response(:record_with_finish_key), Twilio::Verb.record(:finishOnKey => '*')
|
83
|
+
end
|
84
|
+
|
85
|
+
should "record with max length" do
|
86
|
+
assert_equal verb_response(:record_with_max_length), Twilio::Verb.record(:maxLength => 1800)
|
87
|
+
end
|
88
|
+
|
89
|
+
should "record with transcribe" do
|
90
|
+
assert_equal verb_response(:record_with_transcribe), Twilio::Verb.record(:transcribe => true, :transcribeCallback => '/handle_transcribe')
|
91
|
+
end
|
92
|
+
|
93
|
+
should "dial" do
|
94
|
+
assert_equal verb_response(:dial), Twilio::Verb.dial('415-123-4567')
|
95
|
+
end
|
96
|
+
|
97
|
+
should "dial with action" do
|
98
|
+
assert_equal verb_response(:dial_with_action), Twilio::Verb.dial('415-123-4567', :action => 'http://foobar.com')
|
99
|
+
end
|
100
|
+
|
101
|
+
should "dial with GET method" do
|
102
|
+
assert_equal verb_response(:dial_with_get_method), Twilio::Verb.dial('415-123-4567', :method => 'GET')
|
103
|
+
end
|
104
|
+
|
105
|
+
should "dial with timeout" do
|
106
|
+
assert_equal verb_response(:dial_with_timeout), Twilio::Verb.dial('415-123-4567', :timeout => 10)
|
107
|
+
end
|
108
|
+
|
109
|
+
should "dial with hangup on star" do
|
110
|
+
assert_equal verb_response(:dial_with_hangup_on_star), Twilio::Verb.dial('415-123-4567', :hangupOnStar => true)
|
111
|
+
end
|
112
|
+
|
113
|
+
should "dial with time limit" do
|
114
|
+
assert_equal verb_response(:dial_with_time_limit), Twilio::Verb.dial('415-123-4567', :timeLimit => 3600)
|
115
|
+
end
|
116
|
+
|
117
|
+
should "dial with caller id" do
|
118
|
+
assert_equal verb_response(:dial_with_caller_id), Twilio::Verb.dial('415-123-4567', :callerId => '858-987-6543')
|
119
|
+
end
|
120
|
+
|
121
|
+
should "dial with timeout and caller id" do
|
122
|
+
assert_equal verb_response(:dial_with_timeout_and_caller_id), Twilio::Verb.dial('415-123-4567', {:timeout => 10, :callerId => '858-987-6543'})
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: twilio
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.4.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Phil Misiowiec
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-06-21 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: builder
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: httparty
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
35
|
+
description:
|
36
|
+
email: github@webficient.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- LICENSE
|
43
|
+
- README.rdoc
|
44
|
+
files:
|
45
|
+
- LICENSE
|
46
|
+
- README.rdoc
|
47
|
+
- Rakefile
|
48
|
+
- VERSION.yml
|
49
|
+
- lib/twilio.rb
|
50
|
+
- lib/twilio/account.rb
|
51
|
+
- lib/twilio/call.rb
|
52
|
+
- lib/twilio/connection.rb
|
53
|
+
- lib/twilio/incoming_phone_number.rb
|
54
|
+
- lib/twilio/local_phone_number.rb
|
55
|
+
- lib/twilio/notification.rb
|
56
|
+
- lib/twilio/outgoing_caller_id.rb
|
57
|
+
- lib/twilio/recording.rb
|
58
|
+
- lib/twilio/toll_free_phone_number.rb
|
59
|
+
- lib/twilio/twilio_object.rb
|
60
|
+
- lib/twilio/verb.rb
|
61
|
+
- test/fixtures/xml/account.xml
|
62
|
+
- test/fixtures/xml/account_renamed.xml
|
63
|
+
- test/fixtures/xml/call.xml
|
64
|
+
- test/fixtures/xml/call_new.xml
|
65
|
+
- test/fixtures/xml/calls.xml
|
66
|
+
- test/fixtures/xml/incoming_phone_number.xml
|
67
|
+
- test/fixtures/xml/incoming_phone_numbers.xml
|
68
|
+
- test/fixtures/xml/notification.xml
|
69
|
+
- test/fixtures/xml/notifications.xml
|
70
|
+
- test/fixtures/xml/outgoing_caller_id.xml
|
71
|
+
- test/fixtures/xml/outgoing_caller_id_new.xml
|
72
|
+
- test/fixtures/xml/outgoing_caller_ids.xml
|
73
|
+
- test/fixtures/xml/recording.xml
|
74
|
+
- test/fixtures/xml/recordings.xml
|
75
|
+
- test/fixtures/xml/transcription.xml
|
76
|
+
- test/fixtures/xml/transcriptions.xml
|
77
|
+
- test/fixtures/yml/verb_responses.yml
|
78
|
+
- test/test_helper.rb
|
79
|
+
- test/twilio/account_test.rb
|
80
|
+
- test/twilio/call_test.rb
|
81
|
+
- test/twilio/connection_test.rb
|
82
|
+
- test/twilio/incoming_phone_number_test.rb
|
83
|
+
- test/twilio/local_phone_number_test.rb
|
84
|
+
- test/twilio/notification_test.rb
|
85
|
+
- test/twilio/outgoing_caller_id_test.rb
|
86
|
+
- test/twilio/recording_test.rb
|
87
|
+
- test/twilio/toll_free_phone_number_test.rb
|
88
|
+
- test/twilio/verb_test.rb
|
89
|
+
has_rdoc: true
|
90
|
+
homepage: http://github.com/webficient/twilio
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options:
|
93
|
+
- --charset=UTF-8
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: "0"
|
101
|
+
version:
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: "0"
|
107
|
+
version:
|
108
|
+
requirements: []
|
109
|
+
|
110
|
+
rubyforge_project:
|
111
|
+
rubygems_version: 1.3.1
|
112
|
+
signing_key:
|
113
|
+
specification_version: 2
|
114
|
+
summary: Twilio API Client
|
115
|
+
test_files:
|
116
|
+
- test/test_helper.rb
|
117
|
+
- test/twilio/account_test.rb
|
118
|
+
- test/twilio/call_test.rb
|
119
|
+
- test/twilio/connection_test.rb
|
120
|
+
- test/twilio/incoming_phone_number_test.rb
|
121
|
+
- test/twilio/local_phone_number_test.rb
|
122
|
+
- test/twilio/notification_test.rb
|
123
|
+
- test/twilio/outgoing_caller_id_test.rb
|
124
|
+
- test/twilio/recording_test.rb
|
125
|
+
- test/twilio/toll_free_phone_number_test.rb
|
126
|
+
- test/twilio/verb_test.rb
|