lib/shelly/cli/main.rb in shelly-0.2.12 vs lib/shelly/cli/main.rb in shelly-0.2.13
- old
+ new
@@ -192,14 +192,13 @@
desc "start", "Start the cloud"
method_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify cloud"
def start
app = multiple_clouds(options[:cloud], "start")
- app.start
+ deployment_id = app.start
say "Starting cloud #{app}.", :green
- say "This can take up to 10 minutes."
- say "Check status with: `shelly list`"
+ deployment_progress(app, deployment_id, "Starting cloud")
rescue Client::ConflictException => e
case e[:state]
when "running"
say_error "Not starting: cloud '#{app}' is already running"
when "deploying", "configuring"
@@ -265,13 +264,13 @@
method_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify cloud"
def stop
app = multiple_clouds(options[:cloud], "stop")
stop_question = "Are you sure you want to shut down '#{app}' cloud (yes/no):"
if ask(stop_question) == "yes"
- app.stop
+ deployment_id = app.stop
say_new_line
- say "Cloud '#{app}' stopped"
+ deployment_progress(app, deployment_id, "Stopping cloud")
end
rescue Client::ConflictException => e
case e[:state]
when "deploying"
say_error "Your cloud is currently being deployed and it can not be stopped."
@@ -366,11 +365,12 @@
desc "redeploy", "Redeploy application"
method_option :cloud, :type => :string, :aliases => "-c",
:desc => "Specify which cloud to redeploy application for"
def redeploy
app = multiple_clouds(options[:cloud], "redeploy")
- app.redeploy
+ deployment_id = app.redeploy
say "Redeploying your application for cloud '#{app}'", :green
+ deployment_progress(app, deployment_id, "Cloud redeploy")
rescue Client::ConflictException => e
case e[:state]
when "deploying", "configuring"
say_error "Your application is being redeployed at the moment"
when "no_code", "no_billing", "turned_off"