vagrant-ghost 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +7 -6
- data/README.md +8 -2
- data/lib/vagrant-ghost/Ghost.rb +4 -4
- data/lib/vagrant-ghost/config.rb +1 -1
- data/lib/vagrant-ghost/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: fdcee953a7b942812d06c3a2311c74c18e24dd42
|
4
|
+
data.tar.gz: 44e3a97e416b4da90a8066bdf80ca11db4addda2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 128a6e57ddd0658057f9961e27828c8d1380c9d3b7442d6170da2d6ed59eb7b5d2ec16fe788e449e815bee87c7413b5d7955e7a8fb47cf0b1bea4ca12a260119
|
7
|
+
data.tar.gz: b0586fa5d86ba5d5ba603ef09e5f743d706f36b1086b8e669ad786ffba077c033d6dfc506231e6f636c960df0111c372ddef1d9a7ac575b65ed8d177ce5088a3
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -22,14 +22,20 @@ At the moment, the only things you need, are the hostname and a :private_network
|
|
22
22
|
|
23
23
|
config.vm.network :private_network, ip: "192.168.3.10"
|
24
24
|
config.vm.hostname = "www.testing.de"
|
25
|
-
config.ghost.
|
25
|
+
config.ghost.hosts = ["alias.testing.de", "alias2.somedomain.com"]
|
26
26
|
|
27
27
|
This ip and the hostname will be used for the entry in the /etc/hosts file.
|
28
|
+
|
29
|
+
Additional aliases can be added by creating an `/aliases` file at the root of the Vagrant machine installation with one host alias per line. This file will be re-imported whenever Vagrant Ghost updates the hostsfile.
|
28
30
|
|
29
31
|
## Changelog
|
30
32
|
|
33
|
+
### 0.2.0
|
34
|
+
* Use `ghost.config.hosts` to set static hosts while pulling dynamic ones from an `/aliases` file
|
35
|
+
* Update documentation
|
36
|
+
|
31
37
|
### 0.1.3
|
32
|
-
*
|
38
|
+
* Consolidate `/config/hosts` and `/aliases` to just `/**/aliases`
|
33
39
|
|
34
40
|
### 0.1.2
|
35
41
|
* Make the CLI command scan a local hosts setup files (`/config/hosts` and `/aliases`) to rebuild the hosts map
|
data/lib/vagrant-ghost/Ghost.rb
CHANGED
@@ -25,7 +25,7 @@ module VagrantPlugins
|
|
25
25
|
def getHostnames
|
26
26
|
hostnames = Array(@machine.config.vm.hostname)
|
27
27
|
|
28
|
-
# Regenerate
|
28
|
+
# Regenerate hosts from aliases file
|
29
29
|
paths = Dir[File.join( '**', 'aliases' )]
|
30
30
|
aliases = paths.map do |path|
|
31
31
|
lines = File.readlines(path).map(&:chomp)
|
@@ -35,9 +35,9 @@ module VagrantPlugins
|
|
35
35
|
# Concat with the local hostname
|
36
36
|
hostnames.concat( aliases )
|
37
37
|
|
38
|
-
#
|
39
|
-
if @machine.config.ghost.
|
40
|
-
@machine.config.ghost.
|
38
|
+
# Fetch static hosts from the configuration
|
39
|
+
if @machine.config.ghost.hosts
|
40
|
+
hostnames.concat( @machine.config.ghost.hosts )
|
41
41
|
end
|
42
42
|
|
43
43
|
return hostnames
|
data/lib/vagrant-ghost/config.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-ghost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John P Bloch
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-04-
|
12
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|