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 CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git', :tag => 'v1.1.5'
3
+ gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git', :tag => 'v1.2.1'
4
4
  gemspec
@@ -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 defined in Vagrantfile
23
- # and check if is either true or false accordingly
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 defined in Vagrantfile
30
- # and check if is either true or false accordingly
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 defined in Vagrantfile
37
- # and check if is an Array accordingly
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
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module HostManager
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
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 = false
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.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-17 00:00:00.000000000 Z
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