Execute.define_task do desc "reset", "Reset the rhoconnect database (you will need to run rhoconnect:get_token afterwards)" def reset invoke :config confirm = ask " Are you sure? Resetting will remove all data!\n" + " It will also return an error code to all\n" + " existing devices when they connect! (yes/no):" if confirm == 'yes' RestClient.post("#{$url}/api/admin/reset", { :api_token => $token }) puts "Database reset." else puts "Cancelling." end #if end #reset end #do