https://github.com/jbussdieker/ruby-rsync
Ruby/Rsync is a Ruby library that can syncronize files between remote hosts by wrapping a call to the rsync binary.
https://github.com/jbussdieker/ruby-rsync
rsync ruby ruby-library syncronize-files
Last synced: over 1 year ago
JSON representation
Ruby/Rsync is a Ruby library that can syncronize files between remote hosts by wrapping a call to the rsync binary.
- Host: GitHub
- URL: https://github.com/jbussdieker/ruby-rsync
- Owner: jbussdieker
- License: mit
- Created: 2013-07-23T15:52:17.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2022-04-17T20:30:37.000Z (about 4 years ago)
- Last Synced: 2025-03-31T15:18:04.774Z (over 1 year ago)
- Topics: rsync, ruby, ruby-library, syncronize-files
- Language: Ruby
- Homepage:
- Size: 34.2 KB
- Stars: 57
- Watchers: 2
- Forks: 20
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rsync
[](https://travis-ci.org/jbussdieker/ruby-rsync)
[](https://codeclimate.com/github/jbussdieker/ruby-rsync)
[](http://badge.fury.io/rb/rsync)
[](https://coveralls.io/r/jbussdieker/ruby-rsync)
[](https://gemnasium.com/jbussdieker/ruby-rsync)
Ruby/Rsync is a Ruby library that can syncronize files between remote hosts by wrapping a call to the rsync binary.
## Usage
Minimal example
```ruby
require "rsync"
result = Rsync.run("/path/to/src", "/path/to/dest")
```
Complete example
```ruby
require "rsync"
Rsync.run("/path/to/src", "/path/to/dest") do |result|
if result.success?
result.changes.each do |change|
puts "#{change.filename} (#{change.summary})"
end
else
puts result.error
end
end
```