Class: Fastlane::Actions::SftpDownloadAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/sftp/actions/sftp_download.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



37
38
39
# File 'lib/fastlane/plugin/sftp/actions/sftp_download.rb', line 37

def self.authors
  ['[email protected]']
end

.available_optionsObject



33
34
35
# File 'lib/fastlane/plugin/sftp/actions/sftp_download.rb', line 33

def self.available_options
  Sftp::Options.available_options_download
end

.descriptionObject



24
25
26
# File 'lib/fastlane/plugin/sftp/actions/sftp_download.rb', line 24

def self.description
  'download files from a remote Server via SFTP'
end

.detailsObject



28
29
30
31
# File 'lib/fastlane/plugin/sftp/actions/sftp_download.rb', line 28

def self.details
  # Optional:
  "TODO"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/fastlane/plugin/sftp/actions/sftp_download.rb', line 41

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/fastlane/plugin/sftp/actions/sftp_download.rb', line 8

def self.run(params)
  # sh 'bundle exec rubocop -D'
  FastlaneCore::PrintTable.print_values(config: params, hide_keys: [:server_password], mask_keys: [:server_key, :server_key_passphrase], title: "SFTP Download #{Sftp::VERSION} Summary")

  UI.success('SFTP Downloader running...')
  downloader = Sftp::Downloader.new(params)
  result = downloader.download
  msg = 'Download failed. Check out the error above.'
  UI.user_error!(msg) unless result
  UI.success('Finished the download.')
end