Class: CopyBot::Steps::DownloadRemoteDbDump

Inherits:
BaseStep
  • Object
show all
Defined in:
lib/copy_bot/steps/download_remote_db_dump.rb

Instance Attribute Summary

Attributes inherited from BaseStep

#message, #success

Instance Method Summary collapse

Methods inherited from BaseStep

#initialize

Constructor Details

This class inherits a constructor from CopyBot::Steps::BaseStep

Instance Method Details

#runString

Returns:

  • (String)


5
6
7
8
9
10
# File 'lib/copy_bot/steps/download_remote_db_dump.rb', line 5

def run
  return @message = 'Missing S3 credentials in config' unless s3_credentials

  @success = source_object.download_file(destination_file_path)
  @message = @success ? successful_download_message : 'Remote DB dump download failed.'
end