This repository was archived by the owner on Aug 15, 2024. It is now read-only.
Fix ruby snippets linter issues#957
Merged
jefflinwood merged 7 commits intochange-travis-to-GH-actionsfrom Jan 6, 2022
Merged
Conversation
alexisbcc
commented
Dec 13, 2021
| # 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+\-() ]+$/) |
Contributor
Author
There was a problem hiding this comment.
Rubocop suggested this change. Remove unnecessary escapes.
alexisbcc
commented
Dec 13, 2021
| role = service.roles('RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch | ||
| new_permissions = role.permissions | ['sendMediaMessage'] | ||
| role = role.update(permission: new_permissions) | ||
| role.update(permission: new_permissions) |
Contributor
Author
There was a problem hiding this comment.
Remove unnecessary reassignment.
alexisbcc
commented
Dec 13, 2021
| service = client.notify.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') | ||
|
|
||
| service = service.update( | ||
| service.update( |
Contributor
Author
There was a problem hiding this comment.
Remove unnecessary reassignment.
alexisbcc
commented
Dec 13, 2021
| when 'hello' | ||
| resp.message body: 'Hi!' | ||
| elsif body == 'bye' | ||
| when 'bye' |
Contributor
Author
There was a problem hiding this comment.
Rubocop suggested change if with case when.
alexisbcc
commented
Dec 13, 2021
| taskqueue_sid = 'WQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | ||
|
|
||
| capability = Twilio::JWT::TaskRouterCapability.new( | ||
| (account_sid, auth_token), |
Contributor
Author
There was a problem hiding this comment.
Removed extra parenthesis
alexisbcc
commented
Dec 13, 2021
| 'Caller' => '+12349013030', | ||
| 'Digits' => '1234', | ||
| 'From' => '+12349013030', | ||
| 'To' => '+18005551212' |
Contributor
Author
There was a problem hiding this comment.
Rubocop warns about indentation.
alexisbcc
commented
Dec 13, 2021
| response = Net::HTTP.get_response(URI.parse(media_location)) | ||
|
|
||
| open('myFile.mp4', 'wb') do |file| | ||
| file.write(response.body) |
Contributor
Author
There was a problem hiding this comment.
Changed the file download implementation to use a safe strategy instead of open() from open-uri
fefi95
reviewed
Jan 5, 2022
lookups/lookup-get-basic-example-1/lookup-get-basic-example-1.5.x.rb
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: