diff --git a/Gemfile b/Gemfile index fa75df1..e7e2013 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ source 'https://rubygems.org' +gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git', :tag => 'v1.1.5' gemspec diff --git a/lib/vagrant-hostmanager/plugin.rb b/lib/vagrant-hostmanager/plugin.rb index ea09565..7a97da2 100644 --- a/lib/vagrant-hostmanager/plugin.rb +++ b/lib/vagrant-hostmanager/plugin.rb @@ -13,24 +13,21 @@ module VagrantPlugins action_hook(:hostmanager_up, :machine_action_up) do |hook| setup_i18n setup_logging - - # TODO use hook.append when defect is fixed within vagrant - hook.after(ProviderVirtualBox::Action::Boot, Action::UpdateHostsFile) + hook.append(Action::UpdateHostsFile) end action_hook(:hostmanger_destroy, :machine_action_destroy) do |hook| setup_i18n setup_logging - - # TODO use hook.append when defect is fixed within vagrant - hook.after( - ProviderVirtualBox::Action::DestroyUnusedNetworkInterfaces, - Action::UpdateHostsFile) + hook.append(Action::UpdateHostsFile) end def self.setup_i18n - I18n.load_path << File.expand_path('locales/en.yml', HostManager.source_root) + I18n.load_path << File.expand_path( + 'locales/en.yml', + HostManager.source_root) I18n.reload! + Helpers::Translator.plugin_namespace = 'vagrant_hostmanager' end diff --git a/lib/vagrant-hostmanager/version.rb b/lib/vagrant-hostmanager/version.rb index 293a107..a4b4b02 100644 --- a/lib/vagrant-hostmanager/version.rb +++ b/lib/vagrant-hostmanager/version.rb @@ -1,5 +1,5 @@ module VagrantPlugins module HostManager - VERSION = '0.0.1' + VERSION = '0.0.2' end end diff --git a/test/Vagrantfile b/test/Vagrantfile index 85a2322..42d71d2 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -1,6 +1,8 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +Vagrant.require_plugin('vagrant-hostmanager') + Vagrant.configure('2') do |config| config.vm.box = 'precise64-chef11.2' config.vm.box_url = 'https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.2.0.box' diff --git a/test/test.sh b/test/test.sh index 461e86e..cf9569a 100755 --- a/test/test.sh +++ b/test/test.sh @@ -1,9 +1,3 @@ -gem uninstall -a vagrant-hostmanager -gem build *.gemspec -gem install *.gem -rm *.gem -vagrant plugin install vagrant-hostmanager - cd test vagrant up