UploadUtils

Upload files to host. These means of uploading are current supported: ftp, sftp, scp and rsync.

    user       Username for host.
    host       Host server's domain name.
    root       Document root path on host.
    copy       Directory of files to publish, or
               Files to publish using from and to.

    dryrun     If true only pretend to upload.
    quiet      Supress all output.
    verbose    Provide extra details.

The copy parameter allows you to simply specify a file or directory which will be published to host‘s document root location.

If you need more control over which files to publish where, you can use the copy parameter instead. Provide an array of pattern strings in the form of "{from} {to}". If the desitination is the host‘s document root you do not need to specify the {to} part. For example:

    copy = [ 'web/*', 'doc/api/* doc/api' ]

The first copies the files under your project‘s web directory to the host‘s document root. The second copies your projects doc/api files to the doc/api location on the host.

The internal template used for the outbound destination is ‘username@host:root/’.

AUTHORS

  • Thomas Sawyer

TODOs

  • Needs general improvements.
  • Reduce shelling-out.
  • Incorporate password into scp and ftp ?
  • rsync needs —delete option

COPYRIGHT

  Copyright (c) 2006 Thomas Sawyer

LICENSE

  Ruby License

  This module is free software. You may use, modify, and/or redistribute this
  software under the same terms as Ruby.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.
Required Files