gce-host 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/gce/host/cli.rb +1 -1
- data/lib/gce/host/config.rb +8 -3
- data/lib/gce/host/gce_client.rb +1 -1
- data/lib/gce/host/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9058278fe6965657e42e0852b083ecc42ab3b43
|
4
|
+
data.tar.gz: 7d6687397b875e5e477e94c45d4db37c1b1417d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dac786e7a247fa314955ed1a452e201e57696cf3ed0a0f8d07e8ba18e207392ddcb7a80736f1aadaae98d14231ad3e8838757d2fe809e703969e736044663fe
|
7
|
+
data.tar.gz: 57ed8dc3ed59addae4be3745bb671fb7fec1b17248b50af71efe8bb8ec46e1e86e7dff9ad0b065ac51a3275468b288723d109fb24dee3e24a7db3f3f87373eaf
|
data/CHANGELOG.md
CHANGED
data/lib/gce/host/cli.rb
CHANGED
data/lib/gce/host/config.rb
CHANGED
@@ -23,11 +23,16 @@ class GCE
|
|
23
23
|
|
24
24
|
def self.credentials_file
|
25
25
|
# ref. https://developers.google.com/identity/protocols/application-default-credentials
|
26
|
-
@credentials_file ||= File.expand_path(ENV['GOOGLE_APPLICATION_CREDENTIALS'] || config.fetch('GOOGLE_APPLICATION_CREDENTIALS', nil) ||
|
26
|
+
@credentials_file ||= File.expand_path(ENV['GOOGLE_APPLICATION_CREDENTIALS'] || config.fetch('GOOGLE_APPLICATION_CREDENTIALS', nil) ||
|
27
|
+
(File.exist?(global_application_default_credentials_file) ? global_application_default_credentials_file : application_default_credentials_file))
|
27
28
|
end
|
28
29
|
|
29
|
-
def self.
|
30
|
-
@
|
30
|
+
def self.application_default_credentials_file
|
31
|
+
@application_default_credentials_file ||= File.expand_path("~/.config/gcloud/application_default_credentials.json")
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.global_application_default_credentials_file
|
35
|
+
@global_application_default_credentials_file ||= '/etc/google/auth/application_default_credentials.json'
|
31
36
|
end
|
32
37
|
|
33
38
|
def self.credentials
|
data/lib/gce/host/gce_client.rb
CHANGED
@@ -27,7 +27,7 @@ class GCE
|
|
27
27
|
scope = "https://www.googleapis.com/auth/compute.readonly"
|
28
28
|
client = Google::Apis::ComputeV1::ComputeService.new
|
29
29
|
client.client_options.application_name = 'gce-host'
|
30
|
-
client.client_options.
|
30
|
+
client.client_options.application_version = GCE::Host::VERSION
|
31
31
|
client.request_options.retries = Config.retries
|
32
32
|
client.request_options.timeout_sec = Config.timeout_sec
|
33
33
|
client.request_options.open_timeout_sec = Config.open_timeout_sec
|
data/lib/gce/host/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gce-host
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|