google-cloud-env 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +4 -4
- data/lib/google/cloud/env.rb +3 -1
- data/lib/google/cloud/env/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5882fde9edf76ee2c9f1e0d0f778009a9e7e5ddb60b770cc2e33c80c527debc
|
4
|
+
data.tar.gz: e86f1d130b57000bdd80b34b0c04dd2849af88827e78ad10b4c884914c221389
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44a6feec89cef1114361b03118f64b3af679ac5ab2048a51407a9767ba4d9d7898cfaa1c15f4bc1c971cb015b9fe42f8d8bda780ef76881df6e374725552e67a
|
7
|
+
data.tar.gz: 99dafff56a0b4e4ab6c82f0413c342f3bbecd3e13a8016efb87a88ba222de292976c2e8256c8d1bc672a4433a1ab500b6e9e856c48049296b42fe3ecc6f27cc8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.2.1 / 2019-08-23
|
4
|
+
|
5
|
+
#### Bug Fixes
|
6
|
+
|
7
|
+
* Send Metadata-Flavor header when testing the metadata server root
|
8
|
+
|
9
|
+
#### Documentation
|
10
|
+
|
11
|
+
* Update documentation
|
12
|
+
|
3
13
|
### 1.2.0 / 2019-06-19
|
4
14
|
|
5
15
|
* Support separate timeout for connecting to the metadata server vs the entire request
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
This library provides information on the application hosting environment for
|
4
4
|
apps running on Google Cloud Platform.
|
5
5
|
|
6
|
-
- [google-cloud-env API documentation](https://googleapis.
|
6
|
+
- [google-cloud-env API documentation](https://googleapis.dev/ruby/google-cloud-env/latest)
|
7
7
|
|
8
8
|
## Supported Ruby Versions
|
9
9
|
|
@@ -28,18 +28,18 @@ change at any time and the public API should not be considered stable.
|
|
28
28
|
Contributions to this library are always welcome and highly encouraged.
|
29
29
|
|
30
30
|
See the [Contributing
|
31
|
-
Guide](https://googleapis.
|
31
|
+
Guide](https://googleapis.dev/ruby/google-cloud-env/latest/file.CONTRIBUTING.html)
|
32
32
|
for more information on how to get started.
|
33
33
|
|
34
34
|
Please note that this project is released with a Contributor Code of Conduct. By
|
35
35
|
participating in this project you agree to abide by its terms. See [Code of
|
36
|
-
Conduct](https://googleapis.
|
36
|
+
Conduct](https://googleapis.dev/ruby/google-cloud-env/latest/file.CODE_OF_CONDUCT.html)
|
37
37
|
for more information.
|
38
38
|
|
39
39
|
## License
|
40
40
|
|
41
41
|
This library is licensed under Apache 2.0. Full license text is available in
|
42
|
-
[LICENSE](https://googleapis.
|
42
|
+
[LICENSE](https://googleapis.dev/ruby/google-cloud-env/latest/file.LICENSE.html).
|
43
43
|
|
44
44
|
## Support
|
45
45
|
|
data/lib/google/cloud/env.rb
CHANGED
@@ -356,7 +356,9 @@ module Google
|
|
356
356
|
path = METADATA_ROOT_PATH
|
357
357
|
if @disable_metadata_cache || !metadata_cache.include?(path)
|
358
358
|
metadata_cache[path] = retry_or_fail_with false do
|
359
|
-
resp = connection.get path
|
359
|
+
resp = connection.get path do |req|
|
360
|
+
req.headers = { "Metadata-Flavor" => "Google" }
|
361
|
+
end
|
360
362
|
resp.status == 200 && resp.headers["Metadata-Flavor"] == "Google"
|
361
363
|
end
|
362
364
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-env
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
- !ruby/object:Gem::Version
|
203
203
|
version: '0'
|
204
204
|
requirements: []
|
205
|
-
rubygems_version: 3.0.
|
205
|
+
rubygems_version: 3.0.4
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Google Cloud Platform hosting environment information.
|