Sha256: 4f9f34d9824daf6f8058098f274d6401e2642d4b80c013ae35fcb633d54b60a1

Contents?: true

Size: 547 Bytes

Versions: 3

Compression:

Stored size: 547 Bytes

Contents

require_relative 'common'

module Kontena
  module Machine
    module Vagrant
      class MasterDestroyer
        include Kontena::Machine::Vagrant::Common
        include Kontena::Cli::ShellSpinner

        def run!
          vagrant_path = "#{Dir.home}/.krates/vagrant_master"
          Dir.chdir(vagrant_path) do
            spinner "Triggering termination of Krates Master from Vagrant"
            run_command('vagrant destroy -f')
            FileUtils.remove_entry_secure(vagrant_path)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
krates-plugin-vagrant-0.3.6 lib/kontena/machine/vagrant/master_destroyer.rb
krates-plugin-vagrant-0.3.5 lib/kontena/machine/vagrant/master_destroyer.rb
krates-plugin-vagrant-0.3.4 lib/kontena/machine/vagrant/master_destroyer.rb