lib/pushwagner/static.rb in pushwagner-0.0.1.6 vs lib/pushwagner/static.rb in pushwagner-0.0.1.7

- old
+ new

@@ -12,13 +12,14 @@ def deploy environment.static.each do |name, files| environment.hosts.each do |host| Net::SCP.start(host, environment.user) do |scp| - puts "Uploading files to #{host}:#{environment.path_prefix}/#{name}/" + dest = name.start_with?('/') ? name : "#{environment.path_prefix}/#{name}/" + puts "Uploading files to #{host}:#{dest}/" files.each do |f| if File.exists?(f) - scp.upload!(f, "#{environment.path_prefix}/#{name}/", :recursive => File.directory?(f)) + scp.upload!(f, dest, :recursive => File.directory?(f)) else puts "Warning: File #{f} does not exist" end end end