gcloud_hosts 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67c9cf2078e975e924cf0c7da637214ef0959379
4
- data.tar.gz: 22e9c351e240c14e1e0ec341bd2dee7f7b66020d
3
+ metadata.gz: d797a4aee8298bc9c402112a7f2ae29f6db05025
4
+ data.tar.gz: cec519d870df45c1ac5b8f2bda8c7de91fe30df7
5
5
  SHA512:
6
- metadata.gz: a97080304ac9a2d7332d9ed2e127478d291e645114b83a7d5b7b9144789d66c692e0c5691169969fe80482f4d5763f8566041f522e09bb6e840d9980c5c37099
7
- data.tar.gz: 4597b5ba293d1e6b9dff6126f095a230af5a3373332c9cdd37ef026ddbc85374a697b84f7e556c827528fb6de981c1e30213eb0355280b79018f5423881a1b3f
6
+ metadata.gz: 615a2921ca25a12f88c9a324c9cb6b3ff5e7505b76506fe85a032e4a2ed9b01d04ccc57c1c6395163130888568d34d3b80ed418973b6bebc0fa4db2873ff74ec
7
+ data.tar.gz: 1d59772a0603508e27aa79f84d1a0ef4699b99203f61a5e4ac0a76ca24ec592e7e256ae8e9ef321da021092c34f9bdb47455e8bd37947cb085e97b86898a5ef8
data/README.md CHANGED
@@ -30,6 +30,7 @@ Usage: $ gcloud_hosts [options]
30
30
  -b, --backup BACKUP Path to backup original hosts file to. Defaults to FILE with '.bak' extension appended.
31
31
  --[no-]dry-run Dry run, do not modify hosts file. Defaults to false
32
32
  --[no-]delete Delete the project from hosts file. Defaults to false
33
+ --[no-]clear Clear all gcloud host entries from hosts file. Defaults to false
33
34
  --help Show this message
34
35
  --version Show version
35
36
  ```
@@ -17,9 +17,6 @@ module GcloudHosts
17
17
  if project == ""
18
18
  project = env["core"]["project"].to_s.strip
19
19
  end
20
- if project == ""
21
- raise AuthError.new("No gcloud project specified.")
22
- end
23
20
 
24
21
  backup = @options[:backup] ||
25
22
  @options[:file] + '.bak'
@@ -27,13 +24,15 @@ module GcloudHosts
27
24
  if @options[:clear]
28
25
  Updater.clear(@options[:file], backup, @options[:dry_run])
29
26
  else
27
+ if project == ""
28
+ raise AuthError.new("No gcloud project specified.")
29
+ end
30
30
  if @options[:domain]
31
31
  domain = @options[:domain].to_s.strip
32
32
  else
33
33
  domain = "c.#{project}.internal"
34
34
  end
35
35
 
36
-
37
36
  if @options[:delete]
38
37
  new_hosts_list = []
39
38
  else
@@ -1,3 +1,3 @@
1
1
  module GcloudHosts
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gcloud_hosts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Tongen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-22 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -99,4 +99,3 @@ signing_key:
99
99
  specification_version: 4
100
100
  summary: Update your hosts file based on gcloud compute instances
101
101
  test_files: []
102
- has_rdoc: