Module | UploadUtils
In: | lib/facets/more/uploadutils.rb

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/’.

### Methods

files ftp rsync sftp stage_linkdir stage_transfer upload upload_parameters

### Public Instance methods

files( dir, copy )

Put together the list of files to copy.

ftp( keys )

Use ftp to upload files.

rsync( keys )

Use rsync to upload files.

sftp( keys )

Use sftp to upload files.

stage_linkdir( dir, list )

When using stage options this will create temporary linked location.

stage_transfer( list )

Combine three part stage list into a two part from->to list.

Using the stage list of three space separated fields.

      fromdir file todir

This is used to generate a from -> to list of the form:

     fromdir/file todir/file

upload( protocol, opts )

Upload via given protocol.

upload_parameters( keys )

parse publishing options.

[Validate]