Skip to content

Commit 91540af

Browse files
committed
Reindent and update Twilio references in Ruby snippets (part 1)
- Reindent multiparameter method calls - Update reference to Twilio console in comments - Update comments pointing at helper library in Ruby snippets - Fix double indent on Ruby snippets - Add new line character to end of all Ruby files that didn't have it before appling ruby-beautify, as it has a bug affecting files with no new line character and it is a good practice anyway
1 parent adb14e8 commit 91540af

File tree

223 files changed

+339
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+339
-355
lines changed

client/capability-token-2way/capability-token.4.x.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
require 'sinatra'
33

44
get '/token' do
5-
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6-
auth_token = 'your_auth_token'
7-
capability = Twilio::Util::Capability.new account_sid, auth_token
8-
# Create an application sid at
9-
# twilio.com/console/phone-numbers/dev-tools/twiml-apps and use it here
10-
capability.allow_client_outgoing "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
11-
capability.allow_client_incoming params['ClientName']
12-
token = capability.generate
5+
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6+
auth_token = 'your_auth_token'
7+
capability = Twilio::Util::Capability.new account_sid, auth_token
8+
# Create an application SID at
9+
# twilio.com/console/phone-numbers/dev-tools/twiml-apps and use it here
10+
capability.allow_client_outgoing "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
11+
capability.allow_client_incoming params['ClientName']
12+
token = capability.generate
1313

14-
content_type 'application/jwt'
15-
token
14+
content_type 'application/jwt'
15+
token
1616
end
1717

18-
# TODO: post '/voice' do
18+
# TODO: post '/voice' do
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
token = capability.generate expires=600
1+
token = capability.generate expires=600
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
token = capability.generate expires=600
1+
token = capability.generate expires=600

client/capability-token-incoming/capability-token.4.x.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
require 'sinatra'
33

44
get '/token' do
5-
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6-
auth_token = 'your_auth_token'
7-
capability = Twilio::Util::Capability.new account_sid, auth_token
8-
capability.allow_client_incoming "jenny"
9-
token = capability.generate
5+
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6+
auth_token = 'your_auth_token'
7+
capability = Twilio::Util::Capability.new account_sid, auth_token
8+
capability.allow_client_incoming "jenny"
9+
token = capability.generate
1010

11-
content_type 'application/jwt'
12-
token
11+
content_type 'application/jwt'
12+
token
1313
end
1414

15-
# TODO: post '/voice' do
15+
# TODO: post '/voice' do

client/capability-token-outgoing/capability-token.4.x.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
require 'sinatra'
33

44
get '/token' do
5-
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6-
auth_token = 'your_auth_token'
7-
capability = Twilio::Util::Capability.new account_sid, auth_token
8-
# Create an application sid at
9-
# twilio.com/console/phone-numbers/dev-tools/twiml-apps and use it here
10-
capability.allow_client_outgoing "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
11-
token = capability.generate
5+
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6+
auth_token = 'your_auth_token'
7+
capability = Twilio::Util::Capability.new account_sid, auth_token
8+
# Create an application sid at
9+
# twilio.com/console/phone-numbers/dev-tools/twiml-apps and use it here
10+
capability.allow_client_outgoing "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
11+
token = capability.generate
1212

13-
content_type 'application/jwt'
14-
token
13+
content_type 'application/jwt'
14+
token
1515
end
1616

17-
# TODO: post '/voice' do
17+
# TODO: post '/voice' do

client/capability-token/capability-token.4.x.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
require 'sinatra'
33

44
get '/token' do
5-
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6-
auth_token = 'your_auth_token'
7-
capability = Twilio::Util::Capability.new account_sid, auth_token
8-
# Create an application sid at
9-
# twilio.com/console/phone-numbers/dev-tools/twiml-apps and use it here
10-
capability.allow_client_outgoing "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
11-
capability.allow_client_incoming "jenny"
12-
token = capability.generate
5+
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6+
auth_token = 'your_auth_token'
7+
capability = Twilio::Util::Capability.new account_sid, auth_token
8+
# Create an application sid at
9+
# twilio.com/console/phone-numbers/dev-tools/twiml-apps and use it here
10+
capability.allow_client_outgoing "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
11+
capability.allow_client_incoming "jenny"
12+
token = capability.generate
1313

14-
content_type 'application/jwt'
15-
token
14+
content_type 'application/jwt'
15+
token
1616
end
1717

18-
# TODO: post '/voice' do
18+
# TODO: post '/voice' do

client/response-twiml-client/response-twiml-client.4.x.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
twiml.text
2323
end
2424

25-
# TODO: get '/token' do
25+
# TODO: get '/token' do

client/response-twiml-dial/response-twiml-dial.4.x.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
twiml.text
1717
end
1818

19-
# TODO: get '/token' do
19+
# TODO: get '/token' do

client/response-twiml/response-twiml.4.x.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
twiml.text
1111
end
1212

13-
# TODO: get '/token' do
13+
# TODO: get '/token' do

guides/voice/gather-dtmf-tones-guide/gather-example-step-2/example.5.x.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737
r.redirect('/voice')
3838
end.text
3939
end
40-
end
40+
end

0 commit comments

Comments
 (0)