Class: SmartMachine::Syncer

Inherits:
Base
  • Object
show all
Defined in:
lib/smart_machine/syncer.rb

Instance Method Summary collapse

Methods inherited from Base

#machine_has_engine_installed?, #platform_on_machine?, #user_bash

Methods included from Logger

configure_logger_for, included, #logger, logger_for

Constructor Details

#initializeSyncer

Returns a new instance of Syncer.



3
4
# File 'lib/smart_machine/syncer.rb', line 3

def initialize
end

Instance Method Details

#rsync(*args) ⇒ Object



19
20
21
# File 'lib/smart_machine/syncer.rb', line 19

def rsync(*args)
  exec "rsync #{args.join(' ')}"
end

#sync(initial: false) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/smart_machine/syncer.rb', line 6

def sync(initial: false)
  puts "-----> Syncing SmartMachine"

  push if initial

  # Uncomment this if you want to implement pull in sync.
  # Ideally please remove this functionality in favour of entire server folder backup feature.
  #pull
  push

  puts "-----> Syncing SmartMachine Complete"
end