lib/shelly/cli/deploys.rb in shelly-0.0.37 vs lib/shelly/cli/deploys.rb in shelly-0.0.38

- old
+ new

@@ -5,16 +5,17 @@ module CLI class Deploys < Command namespace :deploys include Helpers + before_hook :logged_in?, :only => [:list, :show] + before_hook :cloudfile_present?, :only => [:list, :show] + desc "list", "Lists deploy logs" method_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify which cloud to show deploy logs for" def list - logged_in? - say_error "No Cloudfile found" unless Cloudfile.present? multiple_clouds(options[:cloud], "deploys list", "Select cloud to view deploy logs using:") logs = @app.deploy_logs unless logs.empty? say "Available deploy logs", :green logs.each do |log| @@ -33,10 +34,9 @@ desc "show LOG", "Show specific deploy log" method_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify which cloud to show deploy logs for" def show(log = nil) - say_error "No Cloudfile found" unless Cloudfile.present? specify_log(log) multiple_clouds(options[:cloud], "deploys show #{log}", "Select log and cloud to view deploy logs using:") content = @app.deploy_log(log) say "Log for deploy done on #{content["created_at"]}", :green if content["bundle_install"]