class GrowlDown::GDScp
Public Class Methods
new(output)
click to toggle source
# File lib/growl-down/gd_scp.rb, line 3 def initialize(output) @output = output end
Public Instance Methods
download(remote, local_path)
click to toggle source
# File lib/growl-down/gd_scp.rb, line 7 def download(remote, local_path) @output.puts "Downloading #{remote}" params = remote.split(":") file = params.last.split("/").last Net::SCP.start(params[0], "clint") do |scp| scp.download!(params[1], local_path, {:recursive => true, :verbose => true}) do |ch, name, sent, total| # => progress? end end @output.puts "Finished!" g = Growl.new "localhost", "GrowlDown", ["GrowlDown Notification"] g.notify "GrowlDown Notification", "#{file}", "Download complete" end