google-cloud-env 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +5 -0
- data/README.md +26 -15
- data/lib/google/cloud/env.rb +14 -8
- data/lib/google/cloud/env/version.rb +1 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fb29068180ec1331d9cefca4af08d2897d27a939736508cb10062348f2dd25a
|
4
|
+
data.tar.gz: 2732b7f80957d4f5bd0ed8c90ed2ae513dbe0b4d139ada75cf44a28d21178f55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d0bb7a431484820e559f1371a3e11842b305d3762df200d34d4ca1c98552ed5495995e94b75feda46114763e3e62a4dd675418bf1544bcf38a345fe4303d503
|
7
|
+
data.tar.gz: e151394bb98932109e4570c713d7cc7af7a56c8c66dee8064bfa5c00c58e7402a19ba8fba5f5f6239df6554e65c235db4ecd78941cbb413935e68186278fa137
|
data/.yardopts
CHANGED
data/README.md
CHANGED
@@ -1,39 +1,50 @@
|
|
1
1
|
# google-cloud-env
|
2
2
|
|
3
|
-
This library provides information on the application hosting environment for
|
3
|
+
This library provides information on the application hosting environment for
|
4
|
+
apps running on Google Cloud Platform.
|
4
5
|
|
5
|
-
- [google-cloud-env API documentation](http://googlecloudplatform.github.io/google-cloud-ruby
|
6
|
+
- [google-cloud-env API documentation](http://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-env/latest)
|
6
7
|
|
7
8
|
## Supported Ruby Versions
|
8
9
|
|
9
|
-
This library is supported on Ruby 2.
|
10
|
+
This library is supported on Ruby 2.3+.
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
Google provides official support for Ruby versions that are actively supported
|
13
|
+
by Ruby Core—that is, Ruby versions that are either in normal maintenance or in
|
14
|
+
security maintenance, and not end of life. Currently, this means Ruby 2.3 and
|
15
|
+
later. Older versions of Ruby _may_ still work, but are unsupported and not
|
16
|
+
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
17
|
+
about the Ruby support schedule.
|
17
18
|
|
18
19
|
## Versioning
|
19
20
|
|
20
21
|
This library follows [Semantic Versioning](http://semver.org/).
|
21
22
|
|
22
|
-
It is currently in major version zero (0.y.z), which means that anything may
|
23
|
+
It is currently in major version zero (0.y.z), which means that anything may
|
24
|
+
change at any time and the public API should not be considered stable.
|
23
25
|
|
24
26
|
## Contributing
|
25
27
|
|
26
28
|
Contributions to this library are always welcome and highly encouraged.
|
27
29
|
|
28
|
-
See the [Contributing
|
30
|
+
See the [Contributing
|
31
|
+
Guide](http://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-env/latest/file.CONTRIBUTING)
|
32
|
+
for more information on how to get started.
|
29
33
|
|
30
|
-
Please note that this project is released with a Contributor Code of Conduct. By
|
34
|
+
Please note that this project is released with a Contributor Code of Conduct. By
|
35
|
+
participating in this project you agree to abide by its terms. See [Code of
|
36
|
+
Conduct](http://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-env/latest/file.CODE_OF_CONDUCT)
|
37
|
+
for more information.
|
31
38
|
|
32
39
|
## License
|
33
40
|
|
34
|
-
This library is licensed under Apache 2.0. Full license text is available in
|
41
|
+
This library is licensed under Apache 2.0. Full license text is available in
|
42
|
+
[LICENSE](http://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-env/latest/file.LICENSE).
|
35
43
|
|
36
44
|
## Support
|
37
45
|
|
38
|
-
Please [report bugs at the project on
|
39
|
-
|
46
|
+
Please [report bugs at the project on
|
47
|
+
Github](https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues). Don't
|
48
|
+
hesitate to [ask
|
49
|
+
questions](http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby)
|
50
|
+
about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
data/lib/google/cloud/env.rb
CHANGED
@@ -33,21 +33,27 @@ module Google
|
|
33
33
|
#
|
34
34
|
# Obtain an instance of the environment info with:
|
35
35
|
#
|
36
|
-
#
|
37
|
-
#
|
36
|
+
# ```ruby
|
37
|
+
# require "google/cloud/env"
|
38
|
+
# env = Google::Cloud.env
|
39
|
+
# ```
|
38
40
|
#
|
39
41
|
# Then you can interrogate any fields using methods on the object.
|
40
42
|
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
43
|
+
# ```ruby
|
44
|
+
# if env.app_engine?
|
45
|
+
# # App engine specific logic
|
46
|
+
# end
|
47
|
+
# ```
|
44
48
|
#
|
45
49
|
# Any item that does not apply to the current environment will return nil.
|
46
50
|
# For example:
|
47
51
|
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
52
|
+
# ```ruby
|
53
|
+
# unless env.app_engine?
|
54
|
+
# service = env.app_engine_service_id # => nil
|
55
|
+
# end
|
56
|
+
# ```
|
51
57
|
#
|
52
58
|
class Env
|
53
59
|
# @private Base (host) URL for the metadata server.
|
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.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: redcarpet
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rubocop
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,16 +154,16 @@ dependencies:
|
|
140
154
|
name: yard-doctest
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- - "
|
157
|
+
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.1.
|
159
|
+
version: 0.1.13
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- - "
|
164
|
+
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.1.
|
166
|
+
version: 0.1.13
|
153
167
|
description: google-cloud-env provides information on the Google Cloud Platform hosting
|
154
168
|
environment. Applications can use this library to determine hosting context information
|
155
169
|
such as the project ID, whether App Engine is running, what tags are set on the
|