vagrant-ghost 0.1.3 → 0.2.0

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: b233d3a7bcaa30a0a97e71f8b7555d9d8222437d
4
- data.tar.gz: 5d745a441cab76a002f7b413f626453aebc88f04
3
+ metadata.gz: fdcee953a7b942812d06c3a2311c74c18e24dd42
4
+ data.tar.gz: 44e3a97e416b4da90a8066bdf80ca11db4addda2
5
5
  SHA512:
6
- metadata.gz: f28245f962ff4169d1575102f0bc3d8c1ee492291afdd6968fb334446ad41346d1d74c4bfc2a532b81e6881ad42a0e86abca26946a29ad8b766dc5be4be5dc56
7
- data.tar.gz: 8e18cf77f010ede1ef69a5606b5cf1749cbb688a8e5266593d5b73c310667cd1b6a4b33a406df14a86f8f1db06966e0b15bea237dcf12cd9e810554e31b64510
6
+ metadata.gz: 128a6e57ddd0658057f9961e27828c8d1380c9d3b7442d6170da2d6ed59eb7b5d2ec16fe788e449e815bee87c7413b5d7955e7a8fb47cf0b1bea4ca12a260119
7
+ data.tar.gz: b0586fa5d86ba5d5ba603ef09e5f743d706f36b1086b8e669ad786ffba077c033d6dfc506231e6f636c960df0111c372ddef1d9a7ac575b65ed8d177ce5088a3
data/.gitignore CHANGED
@@ -1,7 +1,8 @@
1
- *gem
2
- .bindle
3
- .config
4
- Gemfile.lock
5
- doc
6
- pkg
1
+ *gem
2
+ .bindle
3
+ .config
4
+ Gemfile.lock
5
+ doc
6
+ pkg
7
+ vendor
7
8
  .idea
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.aliases = ["alias.testing.de", "alias2.somedomain.com"]
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
- * Consoldiate `/config/hosts` and `/aliases` to just `/**/aliases`
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
@@ -25,7 +25,7 @@ module VagrantPlugins
25
25
  def getHostnames
26
26
  hostnames = Array(@machine.config.vm.hostname)
27
27
 
28
- # Regenerate hostsfile
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
- # Update the achine configuration
39
- if @machine.config.ghost.aliases
40
- @machine.config.ghost.aliases = aliases
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
@@ -3,7 +3,7 @@ require "vagrant"
3
3
  module VagrantPlugins
4
4
  module Ghost
5
5
  class Config < Vagrant.plugin("2", :config)
6
- attr_accessor :aliases
6
+ attr_accessor :hosts
7
7
  attr_accessor :id
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Ghost
3
- VERSION = "0.1.3"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.3
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-02 00:00:00.000000000 Z
12
+ date: 2015-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler