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 +4 -4
- data/README.md +1 -0
- data/lib/gcloud_hosts/runner.rb +3 -4
- data/lib/gcloud_hosts/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d797a4aee8298bc9c402112a7f2ae29f6db05025
|
4
|
+
data.tar.gz: cec519d870df45c1ac5b8f2bda8c7de91fe30df7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
```
|
data/lib/gcloud_hosts/runner.rb
CHANGED
@@ -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
|
data/lib/gcloud_hosts/version.rb
CHANGED
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.
|
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-
|
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:
|