0.02
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Guard::Rsync automatically syncs directories.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0

Runtime

>= 0.4
 Project Readme

Guard::Rsync

Rsync guard allows to automatically sync directories when source file changes.

Focus of this guard task is to sync directories while excluding autogenerated files and their sources.

Install

Please be sure to have Guard installed before continue.

Install the gem:

$ gem install guard-rsync

Add it to your Gemfile (inside development group):

gem 'guard-rsync'

Usage

Please read Guard usage doc

Guardfile

The following example pairs the coffeescript guard with a rsync guard.

group(:build_my_app) do
  guard('rsync', {
    :input => 'apps_src/my_app',
    :output => 'apps',
    :excludes => {
      /(.+)\.coffee$/ => (lambda {|m| "#{m[1]}.js"})
    },
    :run_group_on_start => true
  }) do
    watch(%r{^apps_src/my_app/(.+\.(?!coffee)(.*)|[^.]+)$})
  end

  guard 'coffeescript', :input => 'apps_src/my_app', :output => 'apps/my_app'
end

Author

Kristofor Selden