class Toolshed::Commands::SCPBase

Shared code between scp classes

Private Instance Methods

scp_options(options = nil) click to toggle source
# File lib/toolshed/commands/scp_base.rb, line 10
def scp_options(options = nil) # rubocop:disable AbcSize
  options ||= {}
  options[:remote_host] = read_user_input('Remote Host?', required: true) if options[:remote_host].nil? # rubocop:disable LineLength
  options[:remote_path] = read_user_input('Remote Path?', required: true) if options[:remote_path].nil? # rubocop:disable LineLength
  options[:local_path] = read_user_input('Local Path?', required: true) if options[:local_path].nil? # rubocop:disable LineLength
  options[:username] = read_user_input('Username?', required: true) if options[:username].nil? # rubocop:disable LineLength
  options[:password] = read_user_input_password(options[:password])
  options
end