lib/kitchen/driver/vagrant.rb in kitchen-vagrant-0.17.0.beta.4 vs lib/kitchen/driver/vagrant.rb in kitchen-vagrant-0.17.0.rc.1

- old
+ new

@@ -19,10 +19,11 @@ require "erb" require "fileutils" require "rubygems/version" require "kitchen" +require "kitchen/driver/vagrant_version" module Kitchen module Driver @@ -31,10 +32,14 @@ # @author Fletcher Nichol <fnichol@nichol.ca> class Vagrant < Kitchen::Driver::Base include ShellOut + kitchen_driver_api_version 2 + + plugin_version Kitchen::Driver::VAGRANT_VERSION + default_config(:box) { |driver| driver.default_box } required_config :box default_config :box_check_update, nil @@ -115,9 +120,10 @@ def destroy(state) return if state[:hostname].nil? create_vagrantfile @vagrantfile_created = false + instance.transport.connection(state).close run("vagrant destroy -f") FileUtils.rm_rf(vagrant_root) info("Vagrant instance #{instance.to_str} destroyed.") state.delete(:hostname) end