vmc-ng/lib/vmc/cli.rb in vmc-0.4.0.beta.23 vs vmc-ng/lib/vmc/cli.rb in vmc-0.4.0.beta.24
- old
+ new
@@ -8,20 +8,22 @@
require "cfoundry"
require "vmc/constants"
require "vmc/errors"
+require "vmc/spacing"
require "vmc/cli/help"
require "vmc/cli/interactive"
$vmc_asked_auth = false
module VMC
class CLI < Mothership
include VMC::Interactive
+ include VMC::Spacing
include Mothership::Pretty
include Mothership::Progress
option :help, :alias => "-h", :type => :boolean,
:desc => "Show command usage & instructions"
@@ -56,11 +58,11 @@
:desc => "Show API requests and responses"
def default_action
if option(:version)
- puts "vmc #{VERSION}"
+ line "vmc #{VERSION}"
else
super
end
end
@@ -96,11 +98,11 @@
err e.message
rescue CFoundry::Denied => e
if !$vmc_asked_auth && e.error_code == 200
$vmc_asked_auth = true
- puts ""
- puts c("Not authenticated! Try logging in:", :warning)
+ line
+ line c("Not authenticated! Try logging in:", :warning)
invoke :login
retry
end