lib/kontena/plugin/digital_ocean/nodes/terminate_command.rb in kontena-plugin-digitalocean-0.3.1.rc1 vs lib/kontena/plugin/digital_ocean/nodes/terminate_command.rb in kontena-plugin-digitalocean-0.3.1

- old
+ new

@@ -1,6 +1,6 @@ -require_relative '../prompts' +require 'kontena/plugin/digital_ocean/prompts' module Kontena::Plugin::DigitalOcean::Nodes class TerminateCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions @@ -10,17 +10,17 @@ option "--token", "TOKEN", "DigitalOcean API token", environment_variable: "DO_TOKEN" option "--force", :flag, "Force remove", default: false, attribute_name: :forced def execute suppress_warnings # until DO merges resource_kit pr #32 + require 'kontena/machine/digital_ocean' require_api_url require_current_grid token = require_token node_name = ask_node(token) do_token = ask_do_token confirm_command(node_name) unless forced? - require_relative '../../../machine/digital_ocean' grid = client(require_token).get("grids/#{current_grid}") destroyer = destroyer(client(token), do_token) destroyer.run!(grid, node_name) ensure resume_warnings