-
Notifications
You must be signed in to change notification settings - Fork 145
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
Fixes #221 - Use nextPageToken to list all snapshots #222
Conversation
api_method = @compute.snapshots.list | ||
project = @project if project.nil? | ||
parameters = { | ||
"project" => project | ||
"project" => project, |
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.
Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
data = service.list_snapshots(nil, next_page_token) | ||
items.concat(data.body["items"]) | ||
next_page_token = data.body['nextPageToken'] | ||
end until next_page_token.nil? || next_page_token.empty? |
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.
Use Kernel#loop with break rather than begin/end/until(or while).
begin | ||
data = service.list_snapshots(nil, next_page_token) | ||
items.concat(data.body["items"]) | ||
next_page_token = data.body['nextPageToken'] |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Seems straight forward! Thanks @imriz! |
PR fog/fog-google#222 broke snapshot listing in our vcr cassettes which was released in 0.5.3. Lock down fog-google to 0.5.2 until we re-record the cassette.
No description provided.