gce-host 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11da91db2ba8227040083a5d3218a605a152806c
4
- data.tar.gz: 9a9a3eeac561bf5d71e3e6837f7d806c8f52c2c0
3
+ metadata.gz: 6ef21bb063baf67ca6ebbd8620a68b5c36d07a02
4
+ data.tar.gz: c15e417a245e58a4e96a6ba629195f7f11c9ff23
5
5
  SHA512:
6
- metadata.gz: 956450a2c82839583b8eaa320f98053a5aca06195fa2b72871b3dd3548b3dfc96f77dcfc1106c98f51d6942efc364338f4bd7ade18acf66e75212acb7380c2a8
7
- data.tar.gz: 036e69ccea0d735495e5cfddb6bb972d72957ea6dd99c3aa1373328d3d09623727c8d26fa81c1e20b3f3e9bd3ce235f47d4b78f37e08fa8a35c9728e95c97cb8
6
+ metadata.gz: 0b8cd4fa2a9ebf45b5a1e119ef4df7da5246aa7e7d4b25b788db6449ff601a65ab3518a1656e769fbe63e81ab252e0c6e108d16f74b0efaf9d21866fd5bded0e
7
+ data.tar.gz: 4f277937da5b05987d449aebd0e3138c41fcd6484b55adc0d8be6433f0e40a0ea5f309296964daaf4d7ab6ca3d35b8fcffd1076f9a96c8879ef6177ea884e1cd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.3.3 (2016/11/26)
2
+
3
+ Enhancements
4
+
5
+ * Get auth_method from type in credentials if it exists
6
+
1
7
  # 0.3.2 (2016/11/25)
2
8
 
3
9
  Enhancements
data/README.md CHANGED
@@ -21,9 +21,9 @@ You can write a configuration file located at `/etc/sysconfig/gce-host` (You can
21
21
 
22
22
  GOOGLE API parameters:
23
23
 
24
- * **AUTH_METHOD (optional)**: Authentication method. Currently, `compute_engine`, `service_account`, `authorized_user`, and `application_default` is available. The default is `application_default`
24
+ * **AUTH_METHOD (optional)**: Authentication method. Currently, `compute_engine`, `service_account`, `authorized_user`, and `application_default` is available. The default is `type` in `GOOGLE_APPLICATION_CREDENTIALS` if it exists, otherwise `compute_engine`.
25
25
  * **GOOGLE_APPLICATION_CREDENTIALS (optional)**: Specify path of json credential file. The default is `~/.config/gcloud/application_default_credentials.json`.
26
- * **GOOGLE_PROJECT (optional)**: Specify project name of your GCP account. It tries to retrieve project_id if service account json is given in `GOOGLE_APPLICATION_CREDENTIALS`.
26
+ * **GOOGLE_PROJECT (optional)**: Specify project name of your GCP account. The default is `project_id` in `GOOGLE_APPLICATION_CREDENTIALS` if it exists (typically, available in service acaccount json)
27
27
 
28
28
  gce-host parameters:
29
29
 
@@ -16,7 +16,7 @@ class GCE
16
16
  end
17
17
 
18
18
  def self.auth_method
19
- @auth_method ||= ENV['AUTH_METHOD'] || config.fetch('AUTH_METHOD', nil) || 'application_default'
19
+ @auth_method ||= ENV['AUTH_METHOD'] || config.fetch('AUTH_METHOD', nil) || credentials['type'] || 'compute_engine'
20
20
  end
21
21
 
22
22
  def self.credentials_file
@@ -1,5 +1,5 @@
1
1
  class GCE
2
2
  class Host
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
5
  end
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.3.2
4
+ version: 0.3.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: 2016-11-25 00:00:00.000000000 Z
11
+ date: 2016-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client