Class: UploadCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
bin/filefm

Instance Method Summary collapse

Instance Method Details

#executeObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'bin/filefm', line 23

def execute
  uri = URI.parse(target)
  begin
    FileFM.upload source, 
                  target, 
                  :username => user,
                  :password => password,
                  :secure => !insecure?,
                  :auth_url => auth_url,
                  :progressbar => !no_progressbar?
  rescue => e
    puts e.class
    puts e.backtrace
    puts "ERROR: #{e.message}"
  end
end