vagrant-ghost 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 +3 -0
- data/lib/vagrant-ghost/Ghost.rb +2 -12
- data/lib/vagrant-ghost/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b233d3a7bcaa30a0a97e71f8b7555d9d8222437d
|
4
|
+
data.tar.gz: 5d745a441cab76a002f7b413f626453aebc88f04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f28245f962ff4169d1575102f0bc3d8c1ee492291afdd6968fb334446ad41346d1d74c4bfc2a532b81e6881ad42a0e86abca26946a29ad8b766dc5be4be5dc56
|
7
|
+
data.tar.gz: 8e18cf77f010ede1ef69a5606b5cf1749cbb688a8e5266593d5b73c310667cd1b6a4b33a406df14a86f8f1db06966e0b15bea237dcf12cd9e810554e31b64510
|
data/README.md
CHANGED
@@ -28,6 +28,9 @@ This ip and the hostname will be used for the entry in the /etc/hosts file.
|
|
28
28
|
|
29
29
|
## Changelog
|
30
30
|
|
31
|
+
### 0.1.3
|
32
|
+
* Consoldiate `/config/hosts` and `/aliases` to just `/**/aliases`
|
33
|
+
|
31
34
|
### 0.1.2
|
32
35
|
* Make the CLI command scan a local hosts setup files (`/config/hosts` and `/aliases`) to rebuild the hosts map
|
33
36
|
|
data/lib/vagrant-ghost/Ghost.rb
CHANGED
@@ -26,22 +26,12 @@ module VagrantPlugins
|
|
26
26
|
hostnames = Array(@machine.config.vm.hostname)
|
27
27
|
|
28
28
|
# Regenerate hostsfile
|
29
|
-
paths = Dir[File.join( '
|
30
|
-
|
29
|
+
paths = Dir[File.join( '**', 'aliases' )]
|
30
|
+
aliases = paths.map do |path|
|
31
31
|
lines = File.readlines(path).map(&:chomp)
|
32
32
|
lines.grep(/\A[^#]/)
|
33
33
|
end.flatten.uniq
|
34
34
|
|
35
|
-
# Pull in managed aliases
|
36
|
-
local = Dir[File.join( '**', 'aliases' )]
|
37
|
-
local_hosts = local.map do |path|
|
38
|
-
lines = File.readlines(path).map(&:chomp)
|
39
|
-
lines.grep(/\A[^#]/)
|
40
|
-
end.flatten.uniq
|
41
|
-
|
42
|
-
# Merge our lists together
|
43
|
-
aliases = ( hosts << local_hosts ).flatten!
|
44
|
-
|
45
35
|
# Concat with the local hostname
|
46
36
|
hostnames.concat( aliases )
|
47
37
|
|