From e17aab72040146d750c8c7259e0461b287e5c7f9 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Wed, 14 Apr 2021 22:55:19 -0700 Subject: [PATCH] chore: Remove google-cloud-env directory since it has been moved to a separate repo (#11140) --- .kokoro/continuous/linux/env.cfg | 6 - .kokoro/continuous/osx/env.cfg | 6 - .kokoro/continuous/windows/env.cfg | 6 - .kokoro/nightly/linux/env.cfg | 6 - .kokoro/nightly/osx/env.cfg | 6 - .kokoro/nightly/windows/env.cfg | 6 - .kokoro/release/env.cfg | 6 - .kokoro/samples_latest/linux/env.cfg | 6 - .kokoro/samples_latest/osx/env.cfg | 6 - .kokoro/samples_latest/windows/env.cfg | 6 - RELEASING.md | 2 +- google-cloud-bigquery/Gemfile | 1 - google-cloud-bigtable/Gemfile | 1 - google-cloud-core/Gemfile | 1 - google-cloud-datastore/Gemfile | 1 - google-cloud-debugger/Gemfile | 1 - google-cloud-dns/Gemfile | 1 - google-cloud-env/.autotest | 15 - google-cloud-env/.gitignore | 16 - google-cloud-env/.repo-metadata.json | 6 - google-cloud-env/.rubocop.yml | 16 - google-cloud-env/.yardopts | 12 - google-cloud-env/CHANGELOG.md | 80 --- google-cloud-env/CODE_OF_CONDUCT.md | 40 -- google-cloud-env/CONTRIBUTING.md | 109 ---- google-cloud-env/Gemfile | 9 - google-cloud-env/LICENSE | 201 ------- google-cloud-env/README.md | 50 -- google-cloud-env/Rakefile | 102 ---- google-cloud-env/google-cloud-env.gemspec | 35 -- google-cloud-env/lib/google-cloud-env.rb | 17 - google-cloud-env/lib/google/cloud/env.rb | 494 ------------------ .../lib/google/cloud/env/version.rb | 22 - .../test/google/cloud/env_test.rb | 357 ------------- google-cloud-env/test/helper.rb | 21 - google-cloud-error_reporting/Gemfile | 1 - google-cloud-firestore/Gemfile | 1 - google-cloud-logging/Gemfile | 1 - google-cloud-pubsub/Gemfile | 1 - google-cloud-resource_manager/Gemfile | 1 - google-cloud-spanner/Gemfile | 1 - google-cloud-storage/Gemfile | 1 - google-cloud-trace/Gemfile | 1 - google-cloud-translate-v2/Gemfile | 1 - integration/rails4_app/Gemfile | 1 - integration/rails5_app/Gemfile | 1 - integration/sinatra2_app/Gemfile | 1 - stackdriver-core/Gemfile | 1 - stackdriver/Gemfile | 1 - 49 files changed, 1 insertion(+), 1683 deletions(-) delete mode 100644 .kokoro/continuous/linux/env.cfg delete mode 100644 .kokoro/continuous/osx/env.cfg delete mode 100644 .kokoro/continuous/windows/env.cfg delete mode 100644 .kokoro/nightly/linux/env.cfg delete mode 100644 .kokoro/nightly/osx/env.cfg delete mode 100644 .kokoro/nightly/windows/env.cfg delete mode 100644 .kokoro/release/env.cfg delete mode 100644 .kokoro/samples_latest/linux/env.cfg delete mode 100644 .kokoro/samples_latest/osx/env.cfg delete mode 100644 .kokoro/samples_latest/windows/env.cfg delete mode 100644 google-cloud-env/.autotest delete mode 100644 google-cloud-env/.gitignore delete mode 100644 google-cloud-env/.repo-metadata.json delete mode 100644 google-cloud-env/.rubocop.yml delete mode 100644 google-cloud-env/.yardopts delete mode 100644 google-cloud-env/CHANGELOG.md delete mode 100644 google-cloud-env/CODE_OF_CONDUCT.md delete mode 100644 google-cloud-env/CONTRIBUTING.md delete mode 100644 google-cloud-env/Gemfile delete mode 100644 google-cloud-env/LICENSE delete mode 100644 google-cloud-env/README.md delete mode 100644 google-cloud-env/Rakefile delete mode 100644 google-cloud-env/google-cloud-env.gemspec delete mode 100644 google-cloud-env/lib/google-cloud-env.rb delete mode 100644 google-cloud-env/lib/google/cloud/env.rb delete mode 100644 google-cloud-env/lib/google/cloud/env/version.rb delete mode 100644 google-cloud-env/test/google/cloud/env_test.rb delete mode 100644 google-cloud-env/test/helper.rb diff --git a/.kokoro/continuous/linux/env.cfg b/.kokoro/continuous/linux/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/continuous/linux/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/continuous/osx/env.cfg b/.kokoro/continuous/osx/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/continuous/osx/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/continuous/windows/env.cfg b/.kokoro/continuous/windows/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/continuous/windows/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/nightly/linux/env.cfg b/.kokoro/nightly/linux/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/nightly/linux/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/nightly/osx/env.cfg b/.kokoro/nightly/osx/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/nightly/osx/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/nightly/windows/env.cfg b/.kokoro/nightly/windows/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/nightly/windows/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/release/env.cfg b/.kokoro/release/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/release/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/samples_latest/linux/env.cfg b/.kokoro/samples_latest/linux/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/samples_latest/linux/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/samples_latest/osx/env.cfg b/.kokoro/samples_latest/osx/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/samples_latest/osx/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/.kokoro/samples_latest/windows/env.cfg b/.kokoro/samples_latest/windows/env.cfg deleted file mode 100644 index 4f7f64ca56fe..000000000000 --- a/.kokoro/samples_latest/windows/env.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "PACKAGE" - value: "google-cloud-env" -} diff --git a/RELEASING.md b/RELEASING.md index 93ba9bcf8041..cca7cfb29b53 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -28,7 +28,7 @@ green, you may create a release as follows: 1. Choose a gem to release based on the changes report from the previous step. If there are changes to - [google-cloud-env](https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-env), + [google-cloud-errors](https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-errors), [google-cloud-core](https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-core), and/or [stackdriver-core](https://github.com/googleapis/google-cloud-ruby/tree/master/stackdriver-core), diff --git a/google-cloud-bigquery/Gemfile b/google-cloud-bigquery/Gemfile index 32137dcfd58b..afbab0a55740 100644 --- a/google-cloud-bigquery/Gemfile +++ b/google-cloud-bigquery/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-storage", path: "../google-cloud-storage" diff --git a/google-cloud-bigtable/Gemfile b/google-cloud-bigtable/Gemfile index c10fb0d5c387..b31cc8fd9d55 100644 --- a/google-cloud-bigtable/Gemfile +++ b/google-cloud-bigtable/Gemfile @@ -5,7 +5,6 @@ gemspec gem "google-cloud-bigtable-admin-v2", path: "../google-cloud-bigtable-admin-v2" gem "google-cloud-bigtable-v2", path: "../google-cloud-bigtable-v2" gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "minitest-reporters", "~> 1.3.5", require: false diff --git a/google-cloud-core/Gemfile b/google-cloud-core/Gemfile index 0af8a4520f5d..35145f9c988a 100644 --- a/google-cloud-core/Gemfile +++ b/google-cloud-core/Gemfile @@ -2,7 +2,6 @@ source "https://rubygems.org" gemspec -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-gax", "~> 1.0" diff --git a/google-cloud-datastore/Gemfile b/google-cloud-datastore/Gemfile index 5f0bdcdb3c75..3c81e70b5436 100644 --- a/google-cloud-datastore/Gemfile +++ b/google-cloud-datastore/Gemfile @@ -4,7 +4,6 @@ gemspec gem "google-cloud-core", path: "../google-cloud-core" gem "google-cloud-datastore-v1", path: "../google-cloud-datastore-v1" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "rake" diff --git a/google-cloud-debugger/Gemfile b/google-cloud-debugger/Gemfile index 6c88aad0d6ad..dc12ed7f321c 100644 --- a/google-cloud-debugger/Gemfile +++ b/google-cloud-debugger/Gemfile @@ -4,7 +4,6 @@ gemspec gem "google-cloud-core", path: "../google-cloud-core" gem "google-cloud-debugger-v2", path: "../google-cloud-debugger-v2" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-logging", path: "../google-cloud-logging" gem "stackdriver-core", path: "../stackdriver-core" diff --git a/google-cloud-dns/Gemfile b/google-cloud-dns/Gemfile index bd73523e6f58..26087012f224 100644 --- a/google-cloud-dns/Gemfile +++ b/google-cloud-dns/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "rake" diff --git a/google-cloud-env/.autotest b/google-cloud-env/.autotest deleted file mode 100644 index a904fa5abf9b..000000000000 --- a/google-cloud-env/.autotest +++ /dev/null @@ -1,15 +0,0 @@ -# -*- ruby -*- - -require "autotest/suffix" - -# Autotest.add_hook :initialize do |at| -# at.clear_mappings -# -# at.add_mapping %r%^lib/(.*)\.rb$% do |_, m| -# at.files_matching %r%^test/#{m[1]}.*_test.rb$% -# end -# -# at.add_mapping %r%^test/.*_test\.rb$% do |filename, _| -# filename -# end -# end diff --git a/google-cloud-env/.gitignore b/google-cloud-env/.gitignore deleted file mode 100644 index 4fdf74a88150..000000000000 --- a/google-cloud-env/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -Gemfile.lock -keyfile.json -coverage/* -doc/* -pkg/* -html/* -jsondoc/* - -# Ignore vagrant directory -.vagrant - -# Ignore YARD stuffs -.yardoc - -# directories left by gh-pages -_site/* diff --git a/google-cloud-env/.repo-metadata.json b/google-cloud-env/.repo-metadata.json deleted file mode 100644 index 04381fb72d0a..000000000000 --- a/google-cloud-env/.repo-metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "env", - "language": "ruby", - "distribution_name": "google-cloud-env", - "client_documentation": "https://googleapis.dev/ruby/google-cloud-env/latest" -} diff --git a/google-cloud-env/.rubocop.yml b/google-cloud-env/.rubocop.yml deleted file mode 100644 index db47d9add978..000000000000 --- a/google-cloud-env/.rubocop.yml +++ /dev/null @@ -1,16 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "test/**/*" - -Documentation: - Enabled: false - -Metrics/ClassLength: - Exclude: - - "lib/google/cloud/env.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-env.rb" diff --git a/google-cloud-env/.yardopts b/google-cloud-env/.yardopts deleted file mode 100644 index 1db81053e057..000000000000 --- a/google-cloud-env/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title=Google Cloud Env ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -CONTRIBUTING.md -CHANGELOG.md -CODE_OF_CONDUCT.md -LICENSE diff --git a/google-cloud-env/CHANGELOG.md b/google-cloud-env/CHANGELOG.md deleted file mode 100644 index 26a9b7717037..000000000000 --- a/google-cloud-env/CHANGELOG.md +++ /dev/null @@ -1,80 +0,0 @@ -# Release History - -### 1.4.0 / 2020-10-12 - -#### Features - -* Honor GCE_METADATA_HOST environment variable - -### 1.3.3 / 2020-07-10 - -#### Bug Fixes - -* Project ID logic honors GOOGLE_CLOUD_PROJECT - -### 1.3.2 / 2020-05-28 - -#### Documentation - -* Fix a few broken links - -### 1.3.1 / 2020-03-02 - -#### Bug Fixes - -* support faraday 1.x - -### 1.3.0 / 2019-10-23 - -Now requires Ruby 2.4 or later. - -#### Features - -* Recognize App Engine Standard and Knative - -### 1.2.1 / 2019-08-23 - -#### Bug Fixes - -* Send Metadata-Flavor header when testing the metadata server root - -#### Documentation - -* Update documentation - -### 1.2.0 / 2019-06-19 - -* Support separate timeout for connecting to the metadata server vs the entire request - -### 1.1.0 / 2019-05-29 - -* Support disabling of the metadata cache -* Support configurable retries when querying the metadata server -* Support configuration of the metadata request timeout - -### 1.0.5 / 2018-09-20 - -* Update documentation. - * Change documentation URL to googleapis GitHub org. - -### 1.0.4 / 2018-09-12 - -* Add missing documentation files to package. - -### 1.0.3 / 2018-09-10 - -* Update documentation. - -### 1.0.2 / 2018-06-28 - -* Use Kubernetes Engine names. - * Alias old method names for backwards compatibility. -* Handle EHOSTDOWN error when connecting to env. - -### 1.0.1 / 2017-07-11 - -* Update gem spec homepage links. - -### 1.0.0 / 2017-03-31 - -* Initial release diff --git a/google-cloud-env/CODE_OF_CONDUCT.md b/google-cloud-env/CODE_OF_CONDUCT.md deleted file mode 100644 index bc5a589ca9d7..000000000000 --- a/google-cloud-env/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,40 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, and in the interest of -fostering an open and welcoming community, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating -documentation, submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free -experience for everyone, regardless of level of experience, gender, gender -identity and expression, sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, such as physical or electronic - addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct. By adopting this Code of Conduct, project -maintainers commit themselves to fairly and consistently applying these -principles to every aspect of managing this project. Project maintainers who do -not follow or enforce the Code of Conduct may be permanently removed from the -project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by opening an issue or contacting one or more of the project -maintainers. - -This Code of Conduct is adapted from the [Contributor -Covenant](http://contributor-covenant.org), version 1.2.0, available at -[http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/google-cloud-env/CONTRIBUTING.md b/google-cloud-env/CONTRIBUTING.md deleted file mode 100644 index d1f97b29a96b..000000000000 --- a/google-cloud-env/CONTRIBUTING.md +++ /dev/null @@ -1,109 +0,0 @@ -# Contributing to Google Cloud hosting environment - -1. **Sign one of the contributor license agreements below.** -2. Fork the repo, develop and test your code changes. -3. Send a pull request. - -## Contributor License Agreements - -Before we can accept your pull requests you'll need to sign a Contributor -License Agreement (CLA): - -- **If you are an individual writing original source code** and **you own the - intellectual property**, then you'll need to sign an [individual - CLA](https://developers.google.com/open-source/cla/individual). -- **If you work for a company that wants to allow you to contribute your work**, - then you'll need to sign a [corporate - CLA](https://developers.google.com/open-source/cla/corporate). - -You can sign these electronically (just scroll to the bottom). After that, we'll -be able to accept your pull requests. - -## Setup - -In order to use the google-cloud-env console and run the project's tests, -there is a small amount of setup: - -1. Install Ruby. google-cloud-env requires Ruby 2.4+. You may choose to - manage your Ruby and gem installations with [RVM](https://rvm.io/), - [rbenv](https://github.com/rbenv/rbenv), or - [chruby](https://github.com/postmodern/chruby). - -2. Install [Bundler](http://bundler.io/). - - ```sh - $ gem install bundler - ``` - -3. Install the top-level project dependencies. - - ```sh - $ bundle install - ``` - -4. Install the hosting environment dependencies. - - ```sh - $ cd google-cloud-env/ - $ bundle install - ``` - -## hosting environment Tests - -Tests are very important part of google-cloud-env. All contributions -should include tests that ensure the contributed code behaves as expected. - -To run the unit tests, documentation tests, and code style checks together for a -package: - -``` sh -$ cd google-cloud-env/ -$ bundle exec rake ci -``` - -To run the command above, plus all acceptance tests, use `rake ci:acceptance` or -its handy alias, `rake ci:a`. - -### hosting environment Unit Tests - - -The project uses the [minitest](https://github.com/seattlerb/minitest) library, -including [specs](https://github.com/seattlerb/minitest#specs), -[mocks](https://github.com/seattlerb/minitest#mocks) and -[minitest-autotest](https://github.com/seattlerb/minitest-autotest). - -To run the hosting environment unit tests: - -``` sh -$ cd google-cloud-env/ -$ bundle exec rake test -``` - -### hosting environment Documentation Tests - -The project tests the code examples in the gem's -[YARD](https://github.com/lsegal/yard)-based documentation. - -The example testing functions in a way that is very similar to unit testing, and -in fact the library providing it, -[yard-doctest](https://github.com/p0deje/yard-doctest), is based on the -project's unit test library, [minitest](https://github.com/seattlerb/minitest). - -To run the hosting environment documentation tests: - -``` sh -$ cd google-cloud-env/ -$ bundle exec rake doctest -``` - -If you add, remove or modify documentation examples when working on a pull -request, you may need to update the setup for the tests. The stubs and mocks -required to run the tests are located in `support/doctest_helper.rb`. Please -note that much of the setup is matched by the title of the -[`@example`](http://www.rubydoc.info/gems/yard/file/docs/Tags.md#example) tag. -If you alter an example's title, you may encounter breaking tests. - -## Code of Conduct - -Please note that this project is released with a Contributor Code of Conduct. By -participating in this project you agree to abide by its terms. See [Code of Conduct](CODE_OF_CONDUCT.md) for more information. diff --git a/google-cloud-env/Gemfile b/google-cloud-env/Gemfile deleted file mode 100644 index 32a59dd0b2e1..000000000000 --- a/google-cloud-env/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "rake" - -# Pin minitest to 5.11.x to avoid warnings emitted by 5.12. -# See https://github.com/googleapis/google-cloud-ruby/issues/4110 -gem "minitest", "~> 5.11.3" diff --git a/google-cloud-env/LICENSE b/google-cloud-env/LICENSE deleted file mode 100644 index 20e4bd85661f..000000000000 --- a/google-cloud-env/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/google-cloud-env/README.md b/google-cloud-env/README.md deleted file mode 100644 index 7deb4e50d6b9..000000000000 --- a/google-cloud-env/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# google-cloud-env - -This library provides information on the application hosting environment for -apps running on Google Cloud Platform. - -- [google-cloud-env API documentation](https://googleapis.dev/ruby/google-cloud-env/latest) - -## Supported Ruby Versions - -This library is supported on Ruby 2.4+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or in -security maintenance, and not end of life. Currently, this means Ruby 2.4 and -later. Older versions of Ruby _may_ still work, but are unsupported and not -recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details -about the Ruby support schedule. - -## Versioning - -This library follows [Semantic Versioning](http://semver.org/). - -It is currently in major version zero (0.y.z), which means that anything may -change at any time and the public API should not be considered stable. - -## Contributing - -Contributions to this library are always welcome and highly encouraged. - -See the [Contributing -Guide](https://googleapis.dev/ruby/google-cloud-env/latest/file.CONTRIBUTING.html) -for more information on how to get started. - -Please note that this project is released with a Contributor Code of Conduct. By -participating in this project you agree to abide by its terms. See [Code of -Conduct](https://googleapis.dev/ruby/google-cloud-env/latest/file.CODE_OF_CONDUCT.html) -for more information. - -## License - -This library is licensed under Apache 2.0. Full license text is available in -[LICENSE](https://googleapis.dev/ruby/google-cloud-env/latest/file.LICENSE.html). - -## Support - -Please [report bugs at the project on -Github](https://github.com/googleapis/google-cloud-ruby/issues). Don't -hesitate to [ask -questions](http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby) -about the client or APIs on [StackOverflow](http://stackoverflow.com). diff --git a/google-cloud-env/Rakefile b/google-cloud-env/Rakefile deleted file mode 100644 index e6e10e6dc0cd..000000000000 --- a/google-cloud-env/Rakefile +++ /dev/null @@ -1,102 +0,0 @@ -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -namespace :test do - desc "Run tests with coverage." - task :coverage do - require "simplecov" - SimpleCov.start do - command_name "google-cloud-env" - track_files "lib/**/*.rb" - add_filter "test/" - end - - Rake::Task[:test].invoke - end -end - -desc "Run acceptance tests." -task :acceptance do - puts "The google-cloud-env gem does not have acceptance tests." -end - -namespace :acceptance do - task :run do - puts "This gem does not have acceptance tests." - end - desc "Run acceptance cleanup." - task :cleanup do - end -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-env gem does not have doctest tests." -end - -desc "Start an interactive shell." -task :console do - require "irb" - require "irb/completion" - require "pp" - - $LOAD_PATH.unshift "lib" - - require "google-cloud-env" - - ARGV.clear - IRB.start -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-env" - header "google-cloud-env rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-env yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-env doctest", "*" - Rake::Task[:doctest].invoke - header "google-cloud-env test", "*" - Rake::Task[:test].invoke -end -namespace :ci do - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-env acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/google-cloud-env/google-cloud-env.gemspec b/google-cloud-env/google-cloud-env.gemspec deleted file mode 100644 index 14d97e338496..000000000000 --- a/google-cloud-env/google-cloud-env.gemspec +++ /dev/null @@ -1,35 +0,0 @@ -require File.expand_path("lib/google/cloud/env/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-env" - gem.version = Google::Cloud::Env::VERSION - - gem.authors = ["Daniel Azuma"] - gem.email = ["dazuma@google.com"] - gem.description = "google-cloud-env provides information on the Google Cloud Platform hosting environment. " \ - "Applications can use this library to determine hosting context information such as the " \ - "project ID, whether App Engine is running, what tags are set on the VM instance, and much " \ - "more." - gem.summary = "Google Cloud Platform hosting environment information." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-env" - gem.license = "Apache-2.0" - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "CONTRIBUTING.md", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "LICENSE", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.4" - - gem.add_dependency "faraday", ">= 0.17.3", "< 2.0" - - gem.add_development_dependency "autotest-suffix", "~> 1.1" - gem.add_development_dependency "google-style", "~> 1.24.0" - gem.add_development_dependency "minitest", "~> 5.10" - gem.add_development_dependency "minitest-autotest", "~> 1.0" - gem.add_development_dependency "minitest-focus", "~> 1.1" - gem.add_development_dependency "minitest-rg", "~> 5.2" - gem.add_development_dependency "redcarpet", "~> 3.0" - gem.add_development_dependency "simplecov", "~> 0.9" - gem.add_development_dependency "yard", "~> 0.9" - gem.add_development_dependency "yard-doctest", "~> 0.1.13" -end diff --git a/google-cloud-env/lib/google-cloud-env.rb b/google-cloud-env/lib/google-cloud-env.rb deleted file mode 100644 index 9ff840c28fc6..000000000000 --- a/google-cloud-env/lib/google-cloud-env.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2017 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "google/cloud/env" -require "google/cloud/env/version" diff --git a/google-cloud-env/lib/google/cloud/env.rb b/google-cloud-env/lib/google/cloud/env.rb deleted file mode 100644 index 0d24c326a2b1..000000000000 --- a/google-cloud-env/lib/google/cloud/env.rb +++ /dev/null @@ -1,494 +0,0 @@ -# Copyright 2017 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "faraday" -require "json" - - -module Google - module Cloud - ## - # # Google Cloud hosting environment - # - # This library provides access to information about the application's - # hosting environment if it is running on Google Cloud Platform. You may - # use this library to determine which Google Cloud product is hosting your - # application (e.g. App Engine, Kubernetes Engine), information about the - # Google Cloud project hosting the application, information about the - # virtual machine instance, authentication information, and so forth. - # - # ## Usage - # - # Obtain an instance of the environment info with: - # - # ```ruby - # require "google/cloud/env" - # env = Google::Cloud.env - # ``` - # - # Then you can interrogate any fields using methods on the object. - # - # ```ruby - # if env.app_engine? - # # App engine specific logic - # end - # ``` - # - # Any item that does not apply to the current environment will return nil. - # For example: - # - # ```ruby - # unless env.app_engine? - # service = env.app_engine_service_id # => nil - # end - # ``` - # - class Env - # @private Base (host) URL for the metadata server. - METADATA_HOST = "http://169.254.169.254".freeze - - # @private URL path for v1 of the metadata service. - METADATA_PATH_BASE = "/computeMetadata/v1".freeze - - # @private URL path for metadata server root. - METADATA_ROOT_PATH = "/".freeze - - # @private - METADATA_FAILURE_EXCEPTIONS = [ - Faraday::TimeoutError, - Faraday::ConnectionFailed, - Errno::EHOSTDOWN, - Errno::ETIMEDOUT, - Timeout::Error - ].freeze - - ## - # Create a new instance of the environment information. - # Most client should not need to call this directly. Obtain a singleton - # instance of the information from `Google::Cloud.env`. This constructor - # is provided to allow customization of the timeout/retry settings, as - # well as mocking for testing. - # - # @param [Hash] env Mock environment variables. - # @param [String] host The hostname or IP address of the metadata server. - # Optional. If not specified, uses the `GCE_METADATA_HOST`, - # environment variable or falls back to `169.254.167.254`. - # @param [Hash,false] metadata_cache The metadata cache. You may pass - # a prepopuated cache, an empty cache (the default) or `false` to - # disable the cache completely. - # @param [Numeric] open_timeout Timeout for opening http connections. - # Defaults to 0.1. - # @param [Numeric] request_timeout Timeout for entire http requests. - # Defaults to 1.0. - # @param [Integer] retry_count Number of times to retry http requests. - # Defaults to 1. Note that retry remains in effect even if a custom - # `connection` is provided. - # @param [Numeric] retry_interval Time between retries in seconds. - # Defaults to 0.1. - # @param [Numeric] retry_backoff_factor Multiplier applied to the retry - # interval on each retry. Defaults to 1.5. - # @param [Numeric] retry_max_interval Maximum time between retries in - # seconds. Defaults to 0.5. - # @param [Faraday::Connection] connection Faraday connection to use. - # If specified, overrides the `request_timeout` and `open_timeout` - # settings. - # - def initialize env: nil, host: nil, connection: nil, metadata_cache: nil, - open_timeout: 0.1, request_timeout: 1.0, - retry_count: 2, retry_interval: 0.1, - retry_backoff_factor: 1.5, retry_max_interval: 0.5 - @disable_metadata_cache = metadata_cache == false - @metadata_cache = metadata_cache || {} - @env = env || ::ENV - @retry_count = retry_count - @retry_interval = retry_interval - @retry_backoff_factor = retry_backoff_factor - @retry_max_interval = retry_max_interval - request_opts = { timeout: request_timeout, open_timeout: open_timeout } - host ||= @env["GCE_METADATA_HOST"] || METADATA_HOST - host = "http://#{host}" unless host.start_with? "http://" - @connection = connection || ::Faraday.new(url: host, request: request_opts) - end - - ## - # Determine whether the application is running on a Knative-based - # hosting platform, such as Cloud Run or Cloud Functions. - # - # @return [Boolean] - # - def knative? - env["K_SERVICE"] ? true : false - end - - ## - # Determine whether the application is running on Google App Engine. - # - # @return [Boolean] - # - def app_engine? - env["GAE_INSTANCE"] ? true : false - end - - ## - # Determine whether the application is running on Google App Engine - # Flexible Environment. - # - # @return [Boolean] - # - def app_engine_flexible? - app_engine? && env["GAE_ENV"] != "standard" - end - - ## - # Determine whether the application is running on Google App Engine - # Standard Environment. - # - # @return [Boolean] - # - def app_engine_standard? - app_engine? && env["GAE_ENV"] == "standard" - end - - ## - # Determine whether the application is running on Google Kubernetes - # Engine (GKE). - # - # @return [Boolean] - # - def kubernetes_engine? - kubernetes_engine_cluster_name ? true : false - end - alias container_engine? kubernetes_engine? - - ## - # Determine whether the application is running on Google Cloud Shell. - # - # @return [Boolean] - # - def cloud_shell? - env["DEVSHELL_GCLOUD_CONFIG"] ? true : false - end - - ## - # Determine whether the application is running on Google Compute Engine. - # - # Note that most other products (e.g. App Engine, Kubernetes Engine, - # Cloud Shell) themselves use Compute Engine under the hood, so this - # method will return true for all the above products. If you want to - # determine whether the application is running on a "raw" Compute Engine - # VM without using a higher level hosting product, use - # {Env#raw_compute_engine?}. - # - # @return [Boolean] - # - def compute_engine? - metadata? - end - - ## - # Determine whether the application is running on "raw" Google Compute - # Engine without using a higher level hosting product such as App - # Engine or Kubernetes Engine. - # - # @return [Boolean] - # - def raw_compute_engine? - !knative? && !app_engine? && !cloud_shell? && metadata? && !kubernetes_engine? - end - - ## - # Returns the unique string ID of the project hosting the application, - # or `nil` if the application is not running on Google Cloud. - # - # @return [String,nil] - # - def 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. - # - # Caveat: this method does not work and returns `nil` on CloudShell. - # - # @return [Integer,nil] - # - def numeric_project_id - # CloudShell's metadata server seems to run in a dummy project. - # We can get the user's normal project ID via environment variables, - # but the numeric ID from the metadata service is not correct. So - # disable this for CloudShell to avoid confusion. - return nil if cloud_shell? - - result = lookup_metadata "project", "numeric-project-id" - result.nil? ? nil : result.to_i - end - - ## - # Returns the name of the VM instance hosting the application, or `nil` - # if the application is not running on Google Cloud. - # - # @return [String,nil] - # - def instance_name - env["GAE_INSTANCE"] || lookup_metadata("instance", "name") - end - - ## - # Returns the description field (which may be the empty string) of the - # VM instance hosting the application, or `nil` if the application is - # not running on Google Cloud. - # - # @return [String,nil] - # - def instance_description - lookup_metadata "instance", "description" - end - - ## - # Returns the zone (for example "`us-central1-c`") in which the instance - # hosting the application lives. Returns `nil` if the application is - # not running on Google Cloud. - # - # @return [String,nil] - # - def instance_zone - result = lookup_metadata "instance", "zone" - result.nil? ? nil : result.split("/").last - end - - ## - # Returns the machine type of the VM instance hosting the application, - # or `nil` if the application is not running on Google Cloud. - # - # @return [String,nil] - # - def instance_machine_type - result = lookup_metadata "instance", "machine-type" - result.nil? ? nil : result.split("/").last - end - - ## - # Returns an array (which may be empty) of all tags set on the VM - # instance hosting the application, or `nil` if the application is not - # running on Google Cloud. - # - # @return [Array,nil] - # - def instance_tags - result = lookup_metadata "instance", "tags" - result.nil? ? nil : JSON.parse(result) - end - - ## - # Returns an array (which may be empty) of all attribute keys present - # for the VM instance hosting the application, or `nil` if the - # application is not running on Google Cloud. - # - # @return [Array,nil] - # - def instance_attribute_keys - result = lookup_metadata "instance", "attributes/" - result.nil? ? nil : result.split - end - - ## - # Returns the value of the given instance attribute for the VM instance - # hosting the application, or `nil` if the given key does not exist or - # application is not running on Google Cloud. - # - # @param [String] key Attribute key to look up. - # @return [String,nil] - # - def instance_attribute key - lookup_metadata "instance", "attributes/#{key}" - end - - ## - # Returns the name of the running Knative service, or `nil` if the - # current code is not running on Knative. - # - # @return [String,nil] - # - def knative_service_id - env["K_SERVICE"] - end - alias knative_service_name knative_service_id - - ## - # Returns the revision of the running Knative service, or `nil` if the - # current code is not running on Knative. - # - # @return [String,nil] - # - def knative_service_revision - env["K_REVISION"] - end - - ## - # Returns the name of the running App Engine service, or `nil` if the - # current code is not running in App Engine. - # - # @return [String,nil] - # - def app_engine_service_id - env["GAE_SERVICE"] - end - alias app_engine_service_name app_engine_service_id - - ## - # Returns the version of the running App Engine service, or `nil` if the - # current code is not running in App Engine. - # - # @return [String,nil] - # - def app_engine_service_version - env["GAE_VERSION"] - end - - ## - # Returns the amount of memory reserved for the current App Engine - # instance, or `nil` if the current code is not running in App Engine. - # - # @return [Integer,nil] - # - def app_engine_memory_mb - result = env["GAE_MEMORY_MB"] - result.nil? ? nil : result.to_i - end - - ## - # Returns the name of the Kubernetes Engine cluster hosting the - # application, or `nil` if the current code is not running in - # Kubernetes Engine. - # - # @return [String,nil] - # - def kubernetes_engine_cluster_name - instance_attribute "cluster-name" - end - alias container_engine_cluster_name kubernetes_engine_cluster_name - - ## - # Returns the name of the Kubernetes Engine namespace hosting the - # application, or `nil` if the current code is not running in - # Kubernetes Engine. - # - # @return [String,nil] - # - def kubernetes_engine_namespace_id - # The Kubernetes namespace is difficult to obtain without help from - # the application using the Downward API. The environment variable - # below is set in some older versions of GKE, and the file below is - # present in Kubernetes as of version 1.9, but it is possible that - # alternatives will need to be found in the future. - env["GKE_NAMESPACE_ID"] || ::IO.read("/var/run/secrets/kubernetes.io/serviceaccount/namespace") - rescue SystemCallError - nil - end - alias container_engine_namespace_id kubernetes_engine_namespace_id - - ## - # Determine whether the Google Compute Engine Metadata Service is running. - # - # @return [Boolean] - # - def metadata? - path = METADATA_ROOT_PATH - if @disable_metadata_cache || !metadata_cache.include?(path) - metadata_cache[path] = retry_or_fail_with false do - resp = connection.get path do |req| - req.headers = { "Metadata-Flavor" => "Google" } - end - resp.status == 200 && resp.headers["Metadata-Flavor"] == "Google" - end - end - metadata_cache[path] - end - - ## - # Retrieve info from the Google Compute Engine Metadata Service. - # Returns `nil` if the Metadata Service is not running or the given - # data is not present. - # - # @param [String] type Type of metadata to look up. Currently supported - # values are "project" and "instance". - # @param [String] entry Metadata entry path to look up. - # @return [String,nil] - # - def lookup_metadata type, entry - return nil unless metadata? - - path = "#{METADATA_PATH_BASE}/#{type}/#{entry}" - if @disable_metadata_cache || !metadata_cache.include?(path) - metadata_cache[path] = retry_or_fail_with nil do - resp = connection.get path do |req| - req.headers = { "Metadata-Flavor" => "Google" } - end - resp.status == 200 ? resp.body.strip : nil - end - end - metadata_cache[path] - end - - ## - # Returns the global instance of {Google::Cloud::Env}. - # - # @return [Google::Cloud::Env] - # - def self.get - ::Google::Cloud.env - end - - private - - attr_reader :connection - attr_reader :env - attr_reader :metadata_cache - - def retry_or_fail_with error_result - retries_remaining = @retry_count - retry_interval = @retry_interval - begin - yield - rescue *METADATA_FAILURE_EXCEPTIONS - retries_remaining -= 1 - if retries_remaining >= 0 - sleep retry_interval - retry_interval *= @retry_backoff_factor - retry_interval = @retry_max_interval if retry_interval > @retry_max_interval - retry - end - error_result - end - end - end - - @env = Env.new - - ## - # Returns the global instance of {Google::Cloud::Env}. - # - # @return [Google::Cloud::Env] - # - def self.env - @env - end - end -end diff --git a/google-cloud-env/lib/google/cloud/env/version.rb b/google-cloud-env/lib/google/cloud/env/version.rb deleted file mode 100644 index 6ca80a4de6bf..000000000000 --- a/google-cloud-env/lib/google/cloud/env/version.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2017 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -module Google - module Cloud - class Env - VERSION = "1.4.0".freeze - end - end -end diff --git a/google-cloud-env/test/google/cloud/env_test.rb b/google-cloud-env/test/google/cloud/env_test.rb deleted file mode 100644 index 1717208ca194..000000000000 --- a/google-cloud-env/test/google/cloud/env_test.rb +++ /dev/null @@ -1,357 +0,0 @@ -# Copyright 2017 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "helper" -require "google/cloud/env" - - -describe Google::Cloud::Env do - let(:instance_name) { "instance-a1b2" } - let(:instance_description) { "" } - let(:instance_zone) { "us-west99-z" } - let(:instance_machine_type) { "z9999-really-really-huge" } - let(:instance_tags) { ["erlang", "elixir"] } - let(:project_id) { "my-project-123" } - let(:numeric_project_id) { 1234567890 } - let(:gae_service) { "default" } - let(:gae_version) { "20170214t123456" } - let(:gae_memory_mb) { 640 } - let(:gke_cluster) { "my-cluster" } - let(:gke_namespace) { "my-namespace" } - let(:gae_standard_runtime) { "ruby25" } - - let :knative_env do - { - "K_SERVICE" => gae_service, - "K_REVISION" => gae_version - } - end - let :gae_flex_env do - { - "GAE_INSTANCE" => instance_name, - "GCLOUD_PROJECT" => project_id, - "GAE_SERVICE" => gae_service, - "GAE_VERSION" => gae_version, - "GAE_MEMORY_MB" => gae_memory_mb - } - end - let :gae_standard_env do - { - "GAE_INSTANCE" => instance_name, - "GOOGLE_CLOUD_PROJECT" => project_id, - "GAE_SERVICE" => gae_service, - "GAE_VERSION" => gae_version, - "GAE_ENV" => "standard", - "GAE_RUNTIME" => gae_standard_runtime, - "GAE_MEMORY_MB" => gae_memory_mb - } - end - let :gke_env do - { - "GKE_NAMESPACE_ID" => gke_namespace - } - end - let :cloud_shell_env do - { - "DEVSHELL_PROJECT_ID" => project_id, - "DEVSHELL_GCLOUD_CONFIG" => "cloudshell-1234" - } - end - let(:gce_env) { {} } - let(:ext_env) { {} } - - def gce_stubs failure_count: 0 - ::Faraday::Adapter::Test::Stubs.new do |stub| - failure_count.times do - stub.get("") { |env| raise ::Errno::EHOSTDOWN } - end - stub.get("") { |env| [200, {"Metadata-Flavor" => "Google"}, ""] } - stub.get("/computeMetadata/v1/project/project-id") { |env| - [200, {}, project_id] - } - stub.get("/computeMetadata/v1/project/numeric-project-id") { |env| - [200, {}, numeric_project_id.to_s] - } - stub.get("/computeMetadata/v1/instance/name") { |env| - [200, {}, instance_name] - } - stub.get("/computeMetadata/v1/instance/zone") { |env| - [200, {}, "/project/#{project_id}/zone/#{instance_zone}"] - } - stub.get("/computeMetadata/v1/instance/description") { |env| - [200, {}, instance_description] - } - stub.get("/computeMetadata/v1/instance/machine-type") { |env| - [200, {}, "/project/#{project_id}/zone/#{instance_machine_type}"] - } - stub.get("/computeMetadata/v1/instance/tags") { |env| - [200, {}, JSON.dump(instance_tags)] - } - end - end - - def gce_conn failure_count: 0 - Faraday::Connection.new do |builder| - builder.adapter :test, gce_stubs(failure_count: failure_count) do |stub| - stub.get(//) { |env| [404, {}, "not found"] } - end - end - end - - def gke_conn failure_count: 0 - Faraday::Connection.new do |builder| - builder.adapter :test, gce_stubs(failure_count: failure_count) do |stub| - stub.get("/computeMetadata/v1/instance/attributes/cluster-name") { |env| - [200, {}, gke_cluster] - } - stub.get(//) { |env| [404, {}, "not found"] } - end - end - end - - def ext_conn failure_count: 0 - Faraday::Connection.new do |builder| - builder.adapter :test do |stub| - stub.get(//) { |env| raise ::Errno::EHOSTDOWN } - end - end - end - - it "returns correct values when running on cloud run" do - env = ::Google::Cloud::Env.new env: knative_env, connection: gce_conn - - env.knative?.must_equal true - env.app_engine?.must_equal false - env.app_engine_flexible?.must_equal false - env.app_engine_standard?.must_equal false - env.kubernetes_engine?.must_equal false - env.cloud_shell?.must_equal false - env.compute_engine?.must_equal true - env.raw_compute_engine?.must_equal false - - env.project_id.must_equal project_id - env.numeric_project_id.must_equal numeric_project_id - env.instance_name.must_equal instance_name - env.instance_description.must_equal instance_description - env.instance_machine_type.must_equal instance_machine_type - env.instance_tags.must_equal instance_tags - - env.app_engine_service_id.must_be_nil - env.app_engine_service_version.must_be_nil - env.app_engine_memory_mb.must_be_nil - - env.kubernetes_engine_cluster_name.must_be_nil - env.kubernetes_engine_namespace_id.must_be_nil - end - - it "returns correct values when running on app engine flex" do - env = ::Google::Cloud::Env.new env: gae_flex_env, connection: gce_conn - - env.knative?.must_equal false - env.app_engine?.must_equal true - env.app_engine_flexible?.must_equal true - env.app_engine_standard?.must_equal false - env.kubernetes_engine?.must_equal false - env.cloud_shell?.must_equal false - env.compute_engine?.must_equal true - env.raw_compute_engine?.must_equal false - - env.project_id.must_equal project_id - env.numeric_project_id.must_equal numeric_project_id - env.instance_name.must_equal instance_name - env.instance_description.must_equal instance_description - env.instance_machine_type.must_equal instance_machine_type - env.instance_tags.must_equal instance_tags - - env.app_engine_service_id.must_equal gae_service - env.app_engine_service_version.must_equal gae_version - env.app_engine_memory_mb.must_equal gae_memory_mb - - env.kubernetes_engine_cluster_name.must_be_nil - env.kubernetes_engine_namespace_id.must_be_nil - end - - it "returns correct values when running on app engine standard" do - env = ::Google::Cloud::Env.new env: gae_standard_env, connection: gce_conn - - env.knative?.must_equal false - env.app_engine?.must_equal true - env.app_engine_flexible?.must_equal false - env.app_engine_standard?.must_equal true - env.kubernetes_engine?.must_equal false - env.cloud_shell?.must_equal false - env.compute_engine?.must_equal true - env.raw_compute_engine?.must_equal false - - env.project_id.must_equal project_id - env.numeric_project_id.must_equal numeric_project_id - env.instance_name.must_equal instance_name - env.instance_description.must_equal instance_description - env.instance_machine_type.must_equal instance_machine_type - env.instance_tags.must_equal instance_tags - - env.app_engine_service_id.must_equal gae_service - env.app_engine_service_version.must_equal gae_version - env.app_engine_memory_mb.must_equal gae_memory_mb - - env.kubernetes_engine_cluster_name.must_be_nil - env.kubernetes_engine_namespace_id.must_be_nil - end - - it "returns correct values when running on kubernetes engine" do - env = ::Google::Cloud::Env.new env: gke_env, connection: gke_conn - - env.knative?.must_equal false - env.app_engine?.must_equal false - env.app_engine_flexible?.must_equal false - env.app_engine_standard?.must_equal false - env.kubernetes_engine?.must_equal true - env.cloud_shell?.must_equal false - env.compute_engine?.must_equal true - env.raw_compute_engine?.must_equal false - - env.project_id.must_equal project_id - env.numeric_project_id.must_equal numeric_project_id - env.instance_name.must_equal instance_name - env.instance_description.must_equal instance_description - env.instance_machine_type.must_equal instance_machine_type - env.instance_tags.must_equal instance_tags - - env.app_engine_service_id.must_be_nil - env.app_engine_service_version.must_be_nil - env.app_engine_memory_mb.must_be_nil - - env.kubernetes_engine_cluster_name.must_equal gke_cluster - env.kubernetes_engine_namespace_id.must_equal gke_namespace - end - - it "returns correct values when running on cloud shell" do - env = ::Google::Cloud::Env.new env: cloud_shell_env, connection: gce_conn - - env.knative?.must_equal false - env.app_engine?.must_equal false - env.app_engine_flexible?.must_equal false - env.app_engine_standard?.must_equal false - env.kubernetes_engine?.must_equal false - env.cloud_shell?.must_equal true - env.compute_engine?.must_equal true - env.raw_compute_engine?.must_equal false - - env.project_id.must_equal project_id - env.numeric_project_id.must_be_nil - env.instance_name.must_equal instance_name - env.instance_description.must_equal instance_description - env.instance_machine_type.must_equal instance_machine_type - env.instance_tags.must_equal instance_tags - - env.app_engine_service_id.must_be_nil - env.app_engine_service_version.must_be_nil - env.app_engine_memory_mb.must_be_nil - - env.kubernetes_engine_cluster_name.must_be_nil - env.kubernetes_engine_namespace_id.must_be_nil - end - - it "returns correct values when running on compute engine" do - env = ::Google::Cloud::Env.new env: gce_env, connection: gce_conn - - env.knative?.must_equal false - env.app_engine?.must_equal false - env.app_engine_flexible?.must_equal false - env.app_engine_standard?.must_equal false - env.kubernetes_engine?.must_equal false - env.cloud_shell?.must_equal false - env.compute_engine?.must_equal true - env.raw_compute_engine?.must_equal true - - env.project_id.must_equal project_id - env.numeric_project_id.must_equal numeric_project_id - env.instance_name.must_equal instance_name - env.instance_description.must_equal instance_description - env.instance_machine_type.must_equal instance_machine_type - env.instance_tags.must_equal instance_tags - - env.app_engine_service_id.must_be_nil - env.app_engine_service_version.must_be_nil - env.app_engine_memory_mb.must_be_nil - - env.kubernetes_engine_cluster_name.must_be_nil - env.kubernetes_engine_namespace_id.must_be_nil - end - - it "returns correct values when not running on gcp" do - env = ::Google::Cloud::Env.new env: gce_env, connection: ext_conn - - env.knative?.must_equal false - env.app_engine?.must_equal false - env.app_engine_flexible?.must_equal false - env.app_engine_standard?.must_equal false - env.kubernetes_engine?.must_equal false - env.cloud_shell?.must_equal false - env.compute_engine?.must_equal false - env.raw_compute_engine?.must_equal false - - env.project_id.must_be_nil - env.numeric_project_id.must_be_nil - env.instance_name.must_be_nil - env.instance_description.must_be_nil - env.instance_machine_type.must_be_nil - env.instance_tags.must_be_nil - - env.app_engine_service_id.must_be_nil - env.app_engine_service_version.must_be_nil - env.app_engine_memory_mb.must_be_nil - - env.kubernetes_engine_cluster_name.must_be_nil - env.kubernetes_engine_namespace_id.must_be_nil - end - - it "fails if requests fail and there are not enough retries" do - conn = gce_conn failure_count: 2 - env = ::Google::Cloud::Env.new env: gce_env, retry_count: 1, - connection: conn - env.compute_engine?.must_equal false - end - - it "succeeds if requests fail and there are sufficient retries" do - conn = gce_conn failure_count: 2 - env = ::Google::Cloud::Env.new env: gce_env, retry_count: 2, - connection: conn - env.compute_engine?.must_equal true - end - - it "recognizes GCE_METADATA_HOST" do - env_vars = { "GCE_METADATA_HOST" => "mymetadata.example.com" } - callable = proc do |url:, **opts| - assert_equal "http://mymetadata.example.com", url - :callable - end - Faraday.stub :new, callable do - env = ::Google::Cloud::Env.new env: env_vars - assert_equal :callable, env.instance_variable_get(:@connection) - end - end - - it "recognizes host override param" do - callable = proc do |url:, **opts| - assert_equal "http://mymetadata.example.com", url - :callable - end - Faraday.stub :new, callable do - env = ::Google::Cloud::Env.new host: "mymetadata.example.com" - assert_equal :callable, env.instance_variable_get(:@connection) - end - end -end diff --git a/google-cloud-env/test/helper.rb b/google-cloud-env/test/helper.rb deleted file mode 100644 index bbfd6cf7294d..000000000000 --- a/google-cloud-env/test/helper.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2017 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require "simplecov" - -gem "minitest" -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" -require "json" diff --git a/google-cloud-error_reporting/Gemfile b/google-cloud-error_reporting/Gemfile index bbec47398105..8fce8690264f 100644 --- a/google-cloud-error_reporting/Gemfile +++ b/google-cloud-error_reporting/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-error_reporting-v1beta1", path: "../google-cloud-error_reporting-v1beta1" gem "google-cloud-errors", path: "../google-cloud-errors" gem "stackdriver-core", path: "../stackdriver-core" diff --git a/google-cloud-firestore/Gemfile b/google-cloud-firestore/Gemfile index 1b2672fe457c..614fb3d0fd0b 100644 --- a/google-cloud-firestore/Gemfile +++ b/google-cloud-firestore/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-firestore-v1", path: "../google-cloud-firestore-v1" diff --git a/google-cloud-logging/Gemfile b/google-cloud-logging/Gemfile index 0b47819a2076..0d36c9a545d4 100644 --- a/google-cloud-logging/Gemfile +++ b/google-cloud-logging/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-error_reporting", path: "../google-cloud-error_reporting" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-logging-v2", path: "../google-cloud-logging-v2" diff --git a/google-cloud-pubsub/Gemfile b/google-cloud-pubsub/Gemfile index e6d44687ef44..b82f648172d7 100644 --- a/google-cloud-pubsub/Gemfile +++ b/google-cloud-pubsub/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-pubsub-v1", path: "../google-cloud-pubsub-v1" diff --git a/google-cloud-resource_manager/Gemfile b/google-cloud-resource_manager/Gemfile index bd73523e6f58..26087012f224 100644 --- a/google-cloud-resource_manager/Gemfile +++ b/google-cloud-resource_manager/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "rake" diff --git a/google-cloud-spanner/Gemfile b/google-cloud-spanner/Gemfile index 7995e1bce627..ea416d196510 100644 --- a/google-cloud-spanner/Gemfile +++ b/google-cloud-spanner/Gemfile @@ -3,7 +3,6 @@ source "http://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-spanner-admin-database-v1", path: "../google-cloud-spanner-admin-database-v1" gem "google-cloud-spanner-admin-instance-v1", path: "../google-cloud-spanner-admin-instance-v1" diff --git a/google-cloud-storage/Gemfile b/google-cloud-storage/Gemfile index b633761a2880..5501396db70f 100644 --- a/google-cloud-storage/Gemfile +++ b/google-cloud-storage/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-pubsub", path: "../google-cloud-pubsub" gem "google-cloud-pubsub-v1", path: "../google-cloud-pubsub-v1" diff --git a/google-cloud-trace/Gemfile b/google-cloud-trace/Gemfile index 21c4d89d5fbc..4520ca1b0f92 100644 --- a/google-cloud-trace/Gemfile +++ b/google-cloud-trace/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-trace-v1", path: "../google-cloud-trace-v1" gem "google-cloud-trace-v2", path: "../google-cloud-trace-v2" diff --git a/google-cloud-translate-v2/Gemfile b/google-cloud-translate-v2/Gemfile index eddeb8d2b4e5..bea5da8ab61c 100644 --- a/google-cloud-translate-v2/Gemfile +++ b/google-cloud-translate-v2/Gemfile @@ -3,5 +3,4 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" diff --git a/integration/rails4_app/Gemfile b/integration/rails4_app/Gemfile index eef68e3ee79c..f7d15b663d35 100644 --- a/integration/rails4_app/Gemfile +++ b/integration/rails4_app/Gemfile @@ -48,7 +48,6 @@ end gem "google-cloud-bigquery", path: "../../google-cloud-bigquery" gem "google-cloud-core", path: "../../google-cloud-core" gem "google-cloud-debugger", path: "../../google-cloud-debugger" -gem "google-cloud-env", path: "../../google-cloud-env" gem "google-cloud-datastore", path: "../../google-cloud-datastore" gem "google-cloud-debugger", path: "../../google-cloud-debugger" gem "google-cloud-dns", path: "../../google-cloud-dns" diff --git a/integration/rails5_app/Gemfile b/integration/rails5_app/Gemfile index c650a2398df3..783a0d57cf7c 100644 --- a/integration/rails5_app/Gemfile +++ b/integration/rails5_app/Gemfile @@ -51,7 +51,6 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem "google-cloud-bigquery", path: "../../google-cloud-bigquery" gem "google-cloud-core", path: "../../google-cloud-core" gem "google-cloud-debugger", path: "../../google-cloud-debugger" -gem "google-cloud-env", path: "../../google-cloud-env" gem "google-cloud-datastore", path: "../../google-cloud-datastore" gem "google-cloud-debugger", path: "../../google-cloud-debugger" gem "google-cloud-dns", path: "../../google-cloud-dns" diff --git a/integration/sinatra2_app/Gemfile b/integration/sinatra2_app/Gemfile index ddb25770afd2..3d3cae593030 100644 --- a/integration/sinatra2_app/Gemfile +++ b/integration/sinatra2_app/Gemfile @@ -5,7 +5,6 @@ gem "sinatra", "~> 2.0" gem "google-cloud-bigquery", path: "../../google-cloud-bigquery" gem "google-cloud-core", path: "../../google-cloud-core" gem "google-cloud-debugger", path: "../../google-cloud-debugger" -gem "google-cloud-env", path: "../../google-cloud-env" gem "google-cloud-datastore", path: "../../google-cloud-datastore" gem "google-cloud-debugger", path: "../../google-cloud-debugger" gem "google-cloud-dns", path: "../../google-cloud-dns" diff --git a/stackdriver-core/Gemfile b/stackdriver-core/Gemfile index bd73523e6f58..26087012f224 100644 --- a/stackdriver-core/Gemfile +++ b/stackdriver-core/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-errors", path: "../google-cloud-errors" gem "rake" diff --git a/stackdriver/Gemfile b/stackdriver/Gemfile index 18ea9be22eea..e9db57b049db 100644 --- a/stackdriver/Gemfile +++ b/stackdriver/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-env", path: "../google-cloud-env" gem "google-cloud-error_reporting", path: "../google-cloud-error_reporting" gem "google-cloud-errors", path: "../google-cloud-errors" gem "google-cloud-logging", path: "../google-cloud-logging"