lib/vagrant-pristine/plugin.rb in vagrant-pristine-0.1.0 vs lib/vagrant-pristine/plugin.rb in vagrant-pristine-0.2.0

- old
+ new

@@ -1,6 +1,8 @@ require_relative 'version' +require 'vagrant' +require Vagrant.source_root.join('plugins/commands/up/start_mixins') module VagrantPlugins module Pristine class Plugin < Vagrant.plugin('2') name 'vagrant-pristine' @@ -9,28 +11,31 @@ Command end end class Command < Vagrant.plugin(2, :command) + include VagrantPlugins::CommandUp::StartMixins + def execute options = { force: false, parallel: true } opts = OptionParser.new do |o| o.banner = "Usage: vagrant pristine [vm-name]" o.separator "" + build_start_options(o, options) + o.on("-f", "--force", "Destroy without confirmation.") do |f| options[:force] = f end o.on("--[no-]parallel", "Enable or disable parallelism if provider supports it.") do |parallel| options[:parallel] = parallel end - o.on("--provider provider", String, "Back the machine with a specific provider.") do |provider| options[:provider] = provider end