-
Notifications
You must be signed in to change notification settings - Fork 555
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
Upgrade Rubocop #1923
Upgrade Rubocop #1923
Conversation
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
The Firestore credentials class should have been made public before releasing. Update the documentation to reflect that it is public. Add a default file path for gcloud SDK credentials.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
Changes needed to adhere to updated style guide in latest Rubocop.
65201ef
to
0ef8195
Compare
Remove pinned rainbow dependency since Rubocop needs updated version.
Downgrade to the last version that supported Ruby 2.0. This version is recent enough to satisfy security warnings.
0ef8195
to
3d120de
Compare
@geigerj This PR has several changes for the updated style guide that may affect how the GAPIC files are generated for new gems. Happy to discuss these changes with you. |
@@ -1601,7 +1603,7 @@ def reload! | |||
@gapi = reloaded_gapi | |||
self | |||
end | |||
alias_method :refresh!, :reload! | |||
alias refresh! reload! |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
"bigtable" => "BIGTABLE" | ||
}[format.to_s.downcase] | ||
val = { | ||
"csv" => "CSV", "avro" => "AVRO", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -211,13 +211,12 @@ def time_partitioning_type | |||
# | |||
def time_partitioning_type= type | |||
reload! unless resource_full? | |||
@gapi.time_partitioning ||= | |||
Google::Apis::BigqueryV2::TimePartitioning.new | |||
@gapi.time_partitioning ||= \ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -6,7 +6,7 @@ gem "minitest-autotest", "~> 1.0" | |||
gem "minitest-focus", "~> 1.1" | |||
gem "minitest-rg", "~> 5.2" | |||
gem "autotest-suffix", "~> 1.1" | |||
gem "rubocop", "<= 0.35.1" | |||
gem "rubocop", "~> 0.50.0" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
My vague recollection was that we had pinned Rubocop to an early version because newer versions drop support for certain older versions of Ruby that we still support. I'd be happy to be misremembering, though. (Maybe I'm thinking about a different gem?) Just wanted to make sure we still work with all the Ruby versions we support. |
We originally pinned Rubocop because 0.36.0 was released and made massive changes to the style guide and every gem build broke because of it. The upgrade to 0.50 (and 0.52), while intensive, was much simpler than the upgrade to 0.36 would have been. But that's why we originally pinned the dependency. |
All in all, while I believe in keeping on the technology treadmill, I find the churn in Rubocop's style guide to be frustrating. I've been very happy to stay on one style guide for a longer period of time, rather than upgrading every time a new Rubocop version is released. But will concede that an entire year between updating the style guide may be too long. |
gem "google-cloud-bigquery", path: "../google-cloud-bigquery" | ||
gem "google-cloud-container", path: "../google-cloud-container" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
gem "google-cloud-bigquery", path: "../google-cloud-bigquery" | ||
gem "google-cloud-container", path: "../google-cloud-container" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -68,7 +68,7 @@ def add_response_labels span, env | |||
response_body.bytesize.to_s | |||
set_label labels, label_keys::HTTP_STATUS_CODE, response_status.to_s | |||
|
|||
if 300 <= response_status && response_status < 400 && response_url | |||
if response_status >= 300 && response_status < 400 && response_url |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
@blowmage Thank you for taking this on, it must have been a maddening task! I especially appreciate how you removed the unneeded rubocop overrides that resulted from copy/pasting .rubocop.yml
. Great work!
@dazuma Do you have any concerns? I'd like to get this merged ASAP. |
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.
No other questions. LGTM. Thanks for doing this!
This PR upgrades the dependency on Rubocop, updates the code match the most recent style guide, and removes unnecessary configuration and fixes configuration warnings in the individual gems'
.rubocop.yml
files.[fixes #1838]