Class: DeepTest::Distributed::RSync

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_test/distributed/rsync.rb

Defined Under Namespace

Classes: Args

Class Method Summary collapse

Class Method Details

.push(address, sync_options, destination) ⇒ Object



4
5
6
# File 'lib/deep_test/distributed/rsync.rb', line 4

def self.push(address, sync_options, destination)
  sync(:push, address, sync_options, destination)
end

.sync(operation, address, sync_options, destination) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/deep_test/distributed/rsync.rb', line 8

def self.sync(operation, address, sync_options, destination)
  command = Args.new(address, sync_options).send("#{operation}_command", 
                                            destination)

  DeepTest.logger.debug { "rsycing: #{command}" }
  successful = system command
  raise "RSync Failed!!" unless successful
end