lib/shelly/cli/main.rb in shelly-0.4.17 vs lib/shelly/cli/main.rb in shelly-0.4.18

- old
+ new

@@ -226,18 +226,23 @@ desc "delete", "Delete the cloud" method_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify cloud" def delete app = multiple_clouds(options[:cloud], "delete") - say "You are about to delete application: #{app}." - say "Press Control-C at any moment to cancel." - say "Please confirm each question by typing yes and pressing Enter." + say_new_line - ask_to_delete_files - ask_to_delete_database - ask_to_delete_application + say "You are going to:" + say " * remove all files stored in the persistent storage for #{app}," + say " * remove all database data for #{app}," + say " * remove #{app} cloud from Shelly Cloud" + say_new_line + say "This action is permanent and can not be undone.", :red + say_new_line + ask_to_delete_application app + app.delete + say_new_line say "Scheduling application delete - done" if App.inside_git_repository? app.remove_git_remote say "Removing git remote - done" @@ -426,10 +431,11 @@ code_name.blank? ? default_code_name : code_name end def ask_for_databases kinds = Shelly::App::DATABASE_CHOICES - databases = ask("Which database do you want to use #{kinds.join(", ")} (postgresql - default):") + databases = ask("Which databases do you want to use " \ + "#{kinds.join(", ")} (postgresql - default):") begin databases = databases.split(/[\s,]/).reject(&:blank?) valid = valid_databases?(databases) break if valid databases = ask("Unknown database kind. Supported are: #{kinds.join(", ")}:")