lib/berkshelf/vagrant.rb in berkshelf-0.6.0.beta1 vs lib/berkshelf/vagrant.rb in berkshelf-0.6.0.beta2

- old
+ new

@@ -16,16 +16,16 @@ autoload :Config, 'berkshelf/vagrant/config' autoload :Middleware, 'berkshelf/vagrant/middleware' class << self # @param [Vagrant::Action::Environment] env + # + # @return [String, nil] def shelf_for(env) - unless env[:global_config].vm.host_name - return nil - end + return nil if env[:vm].uuid.nil? - File.join(Berkshelf.berkshelf_path, "vagrant", env[:global_config].vm.host_name) + File.join(Berkshelf.berkshelf_path, "vagrant", env[:vm].uuid) end # @param [Symbol] shortcut # @param [Vagrant::Config::Top] config # @@ -62,10 +62,10 @@ ::Vagrant.actions[action].insert(::Vagrant::Action::General::Validate, Berkshelf::Vagrant::Action::Validate) ::Vagrant.actions[action].insert(::Vagrant::Action::VM::Provision, Berkshelf::Vagrant::Middleware.install) ::Vagrant.actions[action].insert(::Vagrant::Action::VM::Provision, Berkshelf::Vagrant::Middleware.upload) end - ::Vagrant.actions[:destroy].insert(::Vagrant::Action::VM::CleanMachineFolder, Berkshelf::Vagrant::Middleware.clean) + ::Vagrant.actions[:destroy].insert(::Vagrant::Action::VM::ProvisionerCleanup, Berkshelf::Vagrant::Middleware.clean) end end end end