lib/google/cloud/env.rb in google-cloud-env-1.3.2 vs lib/google/cloud/env.rb in google-cloud-env-1.3.3
- old
+ new
@@ -208,10 +208,13 @@
# or `nil` if the application is not running on Google Cloud.
#
# @return [String,nil]
#
def project_id
- env["GCLOUD_PROJECT"] || env["DEVSHELL_PROJECT_ID"] || lookup_metadata("project", "project-id")
+ env["GOOGLE_CLOUD_PROJECT"] ||
+ env["GCLOUD_PROJECT"] ||
+ env["DEVSHELL_PROJECT_ID"] ||
+ lookup_metadata("project", "project-id")
end
##
# Returns the unique numeric ID of the project hosting the application,
# or `nil` if the application is not running on Google Cloud.