Skip to content

Commit

Permalink
switch src & dest in Syncer::RSync::Pull
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed Jan 4, 2012
1 parent 2376660 commit de5b323
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/backup/syncer/rsync/pull.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def perform!
@directories.each do |directory|
Logger.message("#{ self.class } started syncing '#{ directory }'.")
Logger.silent(
run("#{ utility(:rsync) } #{ options } '#{ path }' '#{ username }@#{ ip }:#{ directory }'")
run("#{ utility(:rsync) } #{ options } '#{ username }@#{ ip }:#{ directory }' '#{ path }'")
)
end
remove_password_file!
Expand Down
8 changes: 4 additions & 4 deletions spec/syncer/rsync/pull_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@
rsync.expects(:utility).with(:rsync).returns(:rsync).twice
rsync.expects(:remove_password_file!)
rsync.expects(:run).with("rsync --archive --delete --compress -e 'ssh -p 22' --password-file='#{rsync.instance_variable_get('@password_file').path}' " +
"'backups/' 'my_username@123.45.678.90:/some/random/directory'")
"'my_username@123.45.678.90:/some/random/directory' 'backups/'")
rsync.expects(:run).with("rsync --archive --delete --compress -e 'ssh -p 22' --password-file='#{rsync.instance_variable_get('@password_file').path}' " +
"'backups/' 'my_username@123.45.678.90:/another/random/directory'")
"'my_username@123.45.678.90:/another/random/directory' 'backups/'")
rsync.perform!
end

Expand All @@ -194,9 +194,9 @@
rsync.expects(:utility).with(:rsync).returns(:rsync).twice
rsync.expects(:remove_password_file!)
rsync.expects(:run).with("rsync --archive --delete --compress -e 'ssh -p 22' " +
"'backups/' 'my_username@123.45.678.90:/some/random/directory'")
"'my_username@123.45.678.90:/some/random/directory' 'backups/'")
rsync.expects(:run).with("rsync --archive --delete --compress -e 'ssh -p 22' " +
"'backups/' 'my_username@123.45.678.90:/another/random/directory'")
"'my_username@123.45.678.90:/another/random/directory' 'backups/'")
rsync.perform!
end
end
Expand Down

0 comments on commit de5b323

Please sign in to comment.