-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource group faraday #377
base: rest-api-migration
Are you sure you want to change the base?
Resource group faraday #377
Conversation
url, | ||
@token | ||
) | ||
rescue => e |
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.
Avoid rescuing without specifying an error class.
end | ||
|
||
def create_resource_group_body(location, tags) | ||
parameters = { |
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.
Useless assignment to variable - parameters.
resource_group | ||
end | ||
|
||
def create_resource_group_body(location, tags) |
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.
Unused method argument - tags. If it's necessary, use _ or _tags as an argument name to indicate that it won't be used.
@token, | ||
body | ||
) | ||
rescue => e |
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.
Avoid rescuing without specifying an error class.
rescue MsRestAzure::AzureOperationError => e | ||
raise_azure_exception(e, msg) | ||
response = Fog::AzureRM::NetworkAdapter.get(url, @token) | ||
rescue => e |
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.
Avoid rescuing without specifying an error class.
send_request(url, token, nil, DELETE_METHOD) | ||
end | ||
|
||
private |
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.
Useless private access modifier.
end | ||
end | ||
end | ||
end |
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.
Final newline missing.
|
||
def to_s | ||
exception = {} | ||
|
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.
Trailing whitespace detected.
STATUS_CODES = { | ||
success: [200, 201, 202, 203, 204], | ||
failure: [400, 401, 402, 403, 404, 500, 501, 502, 503] | ||
} |
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.
Final newline missing.
SUCCESS = 'success'.freeze | ||
FAILURE = 'failure'.freeze | ||
|
||
STATUS_CODES = { |
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.
Freeze mutable objects assigned to constants.
Faraday Network Adapter with Custom Exception