-
Notifications
You must be signed in to change notification settings - Fork 469
Conversation
@@ -7,7 +7,7 @@ | |||
r.Dial callerId: '+15017122661' do |d| | |||
# wrap the phone number or client name in the appropriate TwiML verb | |||
# by checking if the number given has only digits and format symbols | |||
if params['To'].match?(/^[\d\+\-\(\) ]+$/) | |||
if params['To'].match?(/^[\d+\-() ]+$/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop suggested this change. Remove unnecessary escapes.
@@ -11,5 +11,5 @@ | |||
# Update a role | |||
role = service.roles('RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch | |||
new_permissions = role.permissions | ['sendMediaMessage'] | |||
role = role.update(permission: new_permissions) | |||
role.update(permission: new_permissions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary reassignment.
@@ -10,7 +10,7 @@ | |||
|
|||
service = client.notify.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') | |||
|
|||
service = service.update( | |||
service.update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary reassignment.
resp.message body: 'Hi!' | ||
elsif body == 'bye' | ||
when 'bye' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop suggested change if
with case when
.
@@ -9,7 +9,7 @@ | |||
taskqueue_sid = 'WQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |||
|
|||
capability = Twilio::JWT::TaskRouterCapability.new( | |||
(account_sid, auth_token), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed extra parenthesis
'Caller' => '+12349013030', | ||
'Digits' => '1234', | ||
'From' => '+12349013030', | ||
'To' => '+18005551212' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop warns about indentation.
response = Net::HTTP.get_response(URI.parse(media_location)) | ||
|
||
open('myFile.mp4', 'wb') do |file| | ||
file.write(response.body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the file download implementation to use a safe strategy instead of open()
from open-uri
lookups/lookup-get-basic-example-1/lookup-get-basic-example-1.5.x.rb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
This PR fixes the linter issues present in the new GH actions implementation for the Ruby code snippets.
The new GH actions implementation is done here: #946
The tests errors are not being fixed in this PR only the linter errors.
Changes: