guard-autoupload
Autoupload plugin used for uploading all local changes to remote host. Uses either SFTP or FTP.
Installation
Add this line to your application's Gemfile:
gem 'guard-autoupload'
And then execute:
$ bundle
Or install it yourself as:
$ gem install guard-autoupload
Usage
Sample guardfile:
opts = {
:protocol => :scp, # Protocol used to connect to remote host.
# Possible values are :scp, :sftp and :ftp.
# Of these :scp is the preferred one for
# its stability.
:host => "remote_host",
# :port => 22, # Uncomment this if you need to set port to
# something else than default.
:user => "username",
:password => "password",
:remote => "remote_path",
:verbose => false, # if true you get all outputs
:quiet => false, # if true outputs only on exceptions.
:remote_delete => true # delete the remote file if local file is deleted (defaults to true)
}
guard :autoupload, opts do
watch(/^((?!Guardfile$).)*$/)
# Matches every other file but Guardfile. This way we don't
# accidentally upload the credentials.
end
Contributing
- Fork it ( https://github.com/jyrkij/guard-autoupload/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Author
This guard plugin was written by Jyrki Lilja and is used at FocusFlow. The code is hevily based on vincenthu's guard-flopbox and bgarret's guard-ftpsync.