capistrano/capistrano — pull request #767 by torrancew (2013-11-05 17:43:03+00:00)
Title: Extend remote_file DSL method  - closes #762

Extends remote_file to support a task with a full path for a name. When
the name is not a full path, remote_file now degrades gracefully via use
of Dir.tmpdir

It's unclear to me at this time if capistrano v3/sshkit support windows,
but it would appear that pathname.absolute? may not, based on some brief
research (though I don't have a Windows box to test this with).

It is also unclear to me how safe/trustworthy the method
`task.keys.first` is for returning the unscoped task name, but splitting
on ':' would *certainly* break windows paths, so it was avoided in case
that was a concern. The intent of that block is so that if a
`remote_file` is declared in a namespace, the path could be retrieved
from `define_remote_file_task`