Sha256: 15afa8efa8a9b05eb3495e76f6e45e72d595264fb8556f6e318299c0ddc13ec6

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

require 'albacore/support/albacore_helper'
require 'net/sftp'

class Sftp
	include YAMLConfig
	include Logging
	
	attr_accessor :server, :username, :password, :upload_files
	
	def initialize
		super()
		@upload_files = {}
	end	
	
	def upload()
		Net::SFTP.start(@server, @username, :password => @password) do |sftp|
			@logger.debug "Starting File Upload"
			@upload_files.each {|local_file, remote_file|
				@logger.debug "Uploading #{local_file} to #{remote_file}"
				sftp.upload!(local_file, remote_file)
			}
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
albacore-0.0.7 lib/albacore/sftp.rb