Module: DTR::SyncCodebase::WorkingEnvExt

Includes:
SyncService
Defined in:
lib/dtr/agent/sync_codebase.rb

Instance Method Summary collapse

Methods included from SyncService

#sync_codebase

Methods included from DTR::Service::File

#lookup_file, #provide_file

Methods included from DTR::Service::Rinda

#lookup, #lookup_ring, #start_service, #stop_service

Methods included from Package

#do_work, #package_cmd, #package_copy_file, #package_dir, #package_dir_path, #package_file, #package_name, #unpackage_cmd

Instance Method Details

#synchronize_for(runners) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/dtr/agent/sync_codebase.rb', line 20

def synchronize_for(runners)
  Dir.chdir(base_dir) do
    sync_codebase do
      FileUtils.rm_rf(package_name)
      do_work(unpackage_cmd)
      runners.each do |runner_name|
        dir = File.expand_path escape_dir(runner_name)
        FileUtils.rm_rf(dir)
        FileUtils.cp_r(package_name, dir)
      end
    end
  end
end