1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

use a hash not nil for default scp_options

This commit is contained in:
Phil Cohen 2011-06-11 00:50:45 -07:00
parent b9198da1f7
commit a840dd7224
7 changed files with 7 additions and 7 deletions

View file

@ -200,7 +200,7 @@ module Fog
Fog::SSH.new(public_ip_address, username, options).run(commands) Fog::SSH.new(public_ip_address, username, options).run(commands)
end end
def scp(local_path, remote_path, scp_options = nil) def scp(local_path, remote_path, scp_options = {})
requires :public_ip_address, :username requires :public_ip_address, :username
options = {} options = {}

View file

@ -128,7 +128,7 @@ module Fog
Fog::SSH.new(ips.first['address'], username, options).run(commands) Fog::SSH.new(ips.first['address'], username, options).run(commands)
end end
def scp(local_path, remote_path, scp_options = nil) def scp(local_path, remote_path, scp_options = {})
requires :ips, :username requires :ips, :username
options = {} options = {}

View file

@ -78,7 +78,7 @@ module Fog
Fog::SSH.new(ip['ip'], username, options).run(commands) Fog::SSH.new(ip['ip'], username, options).run(commands)
end end
def scp(local_path, remote_path, scp_options = nil) def scp(local_path, remote_path, scp_options = {})
requires :ip, :username requires :ip, :username
options = {} options = {}

View file

@ -120,7 +120,7 @@ module Fog
Fog::SSH.new(public_ip_address, username, options).run(commands) Fog::SSH.new(public_ip_address, username, options).run(commands)
end end
def scp(local_path, remote_path, scp_options = nil) def scp(local_path, remote_path, scp_options = {})
requires :public_ip_address, :username requires :public_ip_address, :username
options = {} options = {}

View file

@ -110,7 +110,7 @@ module Fog
Fog::SSH.new(addresses.first, username, options).run(commands) Fog::SSH.new(addresses.first, username, options).run(commands)
end end
def scp(local_path, remote_path, scp_options = nil) def scp(local_path, remote_path, scp_options = {})
requires :addresses, :username requires :addresses, :username
options = {} options = {}

View file

@ -151,7 +151,7 @@ module Fog
end end
end end
def scp(local_path, remote_path, scp_options = nil) def scp(local_path, remote_path, scp_options = {})
raise 'Not Implemented' raise 'Not Implemented'
# requires :addresses, :username # requires :addresses, :username
# #

View file

@ -45,7 +45,7 @@ module Fog
@options = { :paranoid => false }.merge(options) @options = { :paranoid => false }.merge(options)
end end
def upload(local_path, remote_path, scp_options = nil) def upload(local_path, remote_path, scp_options = {})
begin begin
Net::SCP.start(@address, @username, @options) do |scp| Net::SCP.start(@address, @username, @options) do |scp|
scp.upload!(local_path, remote_path, scp_options) do |ch, name, sent, total| scp.upload!(local_path, remote_path, scp_options) do |ch, name, sent, total|