Module: DTR::SyncCodebase::WorkingEnvExt
- Includes:
- SyncService
- Defined in:
- lib/dtr/agent/sync_codebase.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#sync_codebase
#lookup_file, #provide_file
#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
Class Method Details
.included(base) ⇒ Object
20
21
22
23
|
# File 'lib/dtr/agent/sync_codebase.rb', line 20
def self.included(base)
base.alias_method_chain :setup_env, :sync_codebase
base.alias_method_chain :working_dir, :sync_codebase
end
|
Instance Method Details
#setup_env_with_sync_codebase(setup_env_cmd) ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/dtr/agent/sync_codebase.rb', line 25
def setup_env_with_sync_codebase(setup_env_cmd)
unless same_working_dir_with_master_process?
Dir.chdir(working_dir_without_sync_codebase) do
sync_codebase
end
end
setup_env_without_sync_codebase(setup_env_cmd)
end
|
#working_dir_with_sync_codebase ⇒ Object
34
35
36
|
# File 'lib/dtr/agent/sync_codebase.rb', line 34
def working_dir_with_sync_codebase
same_working_dir_with_master_process? ? Dir.pwd : File.join(working_dir_without_sync_codebase, package_name)
end
|