vmc-ng/lib/vmc/cli/app.rb in vmc-0.4.0.beta.81 vs vmc-ng/lib/vmc/cli/app.rb in vmc-0.4.0.beta.82

- old
+ new

@@ -24,11 +24,11 @@ "Getting applications" end apps = with_progress(msg) do - client.apps(2) + (space || client).apps(2) end if apps.empty? and !quiet? line line "No applications." @@ -76,11 +76,17 @@ desc "Show app information" group :apps input :app, :argument => :required, :from_given => by_name("app"), :desc => "App to show" def app - display_app(input[:app]) + app = input[:app] + + if quiet? + line app.name + else + display_app(app) + end end desc "Push an application, syncing changes if it exists" group :apps, :manage input(:name, :argument => true, :desc => "Application name") { @@ -791,11 +797,11 @@ end true end - IS_UTF8 = !!(ENV["LC_ALL"] || ENV["LC_CTYPE"] || ENV["LANG"])["UTF-8"] + IS_UTF8 = !!(ENV["LC_ALL"] || ENV["LC_CTYPE"] || ENV["LANG"] || "")["UTF-8"] def display_app(a) status = app_status(a) line "#{c(a.name, :name)}: #{status}" @@ -968,10 +974,12 @@ with_progress("Creating #{c(app.name, :name)}") do app.create! end + invoke :map, :app => app, :url => url if url && v2? + bindings = [] if input[:create_services] && !force? while true invoke :create_service, { :app => app }, :plan => :interact @@ -998,12 +1006,10 @@ rescue err "Upload failed. Try again with 'vmc push'." raise end - invoke :map, :app => app, :url => url if url && v2? - invoke :start, :app => app if input[:start] end def upload_app(app, path) with_progress("Uploading #{c(app.name, :name)}") do @@ -1082,10 +1088,10 @@ :warning end end def app_status(a) - health = a.health + health = v2? ? a.status : a.health if a.debug_mode == "suspend" && health == "0%" c("suspended", :neutral) else c(health.downcase, state_color(health))