lib/acquia_toolbelt/cli/file.rb in acquia_toolbelt-2.3.1 vs lib/acquia_toolbelt/cli/file.rb in acquia_toolbelt-2.3.2

- old
+ new

@@ -2,15 +2,15 @@ class CLI class Files < AcquiaToolbelt::Thor # Public: Copy files from one environment to another. # # Returns a status message from the task. - desc "copy", "Copy files from one environment to another." - method_option :origin, :type => :string, :aliases => %w(-o), :required => true, - :desc => "Source environment for the file copy." - method_option :target, :type => :string, :aliases => %w(-t), :required => true, - :desc => "Target environment for the file copy." + desc 'copy', 'Copy files from one environment to another.' + method_option :origin, :type => :string, :aliases => %w(-o), + :required => true, :desc => 'Source environment for the file copy.' + method_option :target, :type => :string, :aliases => %w(-t), + :required => true, :desc => 'Target environment for the file copy.' def copy if options[:subscription] subscription = options[:subscription] else subscription = AcquiaToolbelt::CLI::API.default_subscription @@ -18,10 +18,10 @@ source = options[:origin] target = options[:target] file_copy = AcquiaToolbelt::CLI::API.request "sites/#{subscription}/files-copy/#{source}/#{target}", "POST" - if file_copy["id"] + if file_copy['id'] ui.success "File copy from #{source} to #{target} has started." else ui.fail AcquiaToolbelt::CLI::API.display_error(file_copy) end end