lib/shelly/cli/backup.rb in shelly-0.4.24 vs lib/shelly/cli/backup.rb in shelly-0.4.25

- old
+ new

@@ -7,11 +7,11 @@ module CLI class Backup < Command namespace :backup include Helpers - before_hook :logged_in?, :only => [:list, :get, :create, :restore, :import] + before_hook :logged_in?, :only => [:list, :get, :create, :new, :restore, :import] class_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify cloud" method_option :all, :type => :boolean, :aliases => "-a", :desc => "Show all backups" @@ -62,9 +62,10 @@ desc "create [DB_KIND]", "Create backup of given database" long_desc %{ Create backup of given database. If database kind is not specified, Cloudfile must be present to backup all configured databases. } + map "new" => :create def create(kind = nil) app = multiple_clouds(options[:cloud], "backup create [DB_KIND]") cloudfile = Cloudfile.new unless kind || cloudfile.present? say_error "Cloudfile must be present in current working directory or specify database kind with:", :with_exit => false