vagrant-hostmanager 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/lib/vagrant-hostmanager/config.rb +6 -12
- data/lib/vagrant-hostmanager/version.rb +1 -1
- data/test/Vagrantfile +1 -1
- metadata +2 -2
data/Gemfile
CHANGED
@@ -19,24 +19,18 @@ module VagrantPlugins
|
|
19
19
|
def validate(machine)
|
20
20
|
errors = Array.new
|
21
21
|
|
22
|
-
# check if auto_update option is
|
23
|
-
|
24
|
-
if (machine.config.hostmanager.auto_update &&
|
25
|
-
![TrueClass, FalseClass].include?(auto_update.class))
|
22
|
+
# check if auto_update option is either true or false
|
23
|
+
if ![TrueClass, FalseClass].include?(auto_update.class)
|
26
24
|
errors << "A value for hostmanager.auto_update can be true or false."
|
27
25
|
end
|
28
26
|
|
29
|
-
# check if ignore_private_ip option is
|
30
|
-
|
31
|
-
if (machine.config.hostmanager.ignore_private_ip &&
|
32
|
-
![TrueClass, FalseClass].include?(ignore_private_ip.class))
|
27
|
+
# check if ignore_private_ip option is either true or false
|
28
|
+
if ![TrueClass, FalseClass].include?(ignore_private_ip.class)
|
33
29
|
errors << "A value for hostmanager.ignore_private_ip can be true or false."
|
34
30
|
end
|
35
31
|
|
36
|
-
# check if aliases option is
|
37
|
-
|
38
|
-
if (machine.config.hostmanager.aliases &&
|
39
|
-
!machine.config.hostmanager.aliases.kind_of?(Array))
|
32
|
+
# check if aliases option is an Array
|
33
|
+
if !machine.config.hostmanager.aliases.kind_of?(Array)
|
40
34
|
errors << "A value for hostmanager.aliases must be an Array."
|
41
35
|
end
|
42
36
|
|
data/test/Vagrantfile
CHANGED
@@ -7,7 +7,7 @@ Vagrant.configure('2') do |config|
|
|
7
7
|
config.vm.box = 'precise64-chef11.2'
|
8
8
|
config.vm.box_url = 'https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.2.0.box'
|
9
9
|
|
10
|
-
config.hostmanager.auto_update =
|
10
|
+
config.hostmanager.auto_update = true
|
11
11
|
|
12
12
|
config.vm.define :server1 do |server|
|
13
13
|
server.vm.hostname = 'fry'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hostmanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Vagrant plugin that manages the /etc/hosts file within a multi-machine
|
15
15
|
environment
|