Class: Luban::Deployment::Package::Worker
Constant Summary
Luban::Deployment::Parameters::Application::DefaultLogrotateInterval, Luban::Deployment::Parameters::Application::DefaultLogrotateMaxAge
Luban::Deployment::Parameters::General::DefaultLubanRootPath
Helpers::Utils::LogLevels
Instance Attribute Summary
Attributes inherited from Worker::Base
#task
#backend
#config
Class Method Summary
collapse
Instance Method Summary
collapse
#app_archives_path, #app_bin_path, #app_path, #app_tmp_path, #archived_logs_path, #archives_path, #current_app_path, #downloads_path, #env_path, #envrc_file, #luban_install_path, #package_bin_path, #package_install_path, #project_path, #releases_path, #shared_path, #tmp_path, #unset_envrc_file
#dry_run?, #force?, #initialize, #linux?, #method_missing, #osx?, #packages, #run, #target_full_name, #target_major_version, #target_name, #target_patch_level, #target_version
#env_name, #logrotate_count, #monitor_itself?, #monitorable?
#parameter
#monitor_defined?, #process_monitor_via
included
#assure, #assure_dirs, #assure_symlink, #capture, #check_pass?, #chmod, #cp, #directory?, #exists?, #file?, #hardware_name, #host, #hostname, #ln, #match?, #md5_for, #md5_for_dir, #md5_for_file, #md5_matched?, #mkdir, #mv, #now, #os_name, #os_release, #readlink, #render_template, #revision_match?, #rm, #rmdir, #sudo, #symlink?, #touch, #truncate, #upload_by_template, #url_exists?, #user_home
#ask, #fetch, #find_template_file, #load_configuration_file, #primary, #release_roles, #role, #roles, #server, #set, #set_default, #syntax_error?
Class Method Details
.define_executable(*names) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 16
def define_executable(*names)
names.each do |name|
define_method("#{name}_executable") do
if instance_variable_defined?("@#{__method__}")
instance_variable_get("@#{__method__}")
else
instance_variable_set("@#{__method__}", bin_path.join(name))
end
end
end
end
|
.package_class(package) ⇒ Object
.worker_class(worker, **opts) ⇒ Object
Instance Method Details
#bin_path ⇒ Object
56
57
58
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 56
def bin_path
@bin_path ||= install_path.join('bin')
end
|
#child? ⇒ Boolean
34
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 34
def child?; !parent.nil?; end
|
#current_bin_path ⇒ Object
40
41
42
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 40
def current_bin_path
@current_bin_path ||= current_path.join('bin')
end
|
#current_path ⇒ Object
36
37
38
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 36
def current_path
@current_path ||= app_path.join(package_name)
end
|
#install_path ⇒ Object
52
53
54
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 52
def install_path
@install_path ||= package_versions_path.join(package_version)
end
|
#package_downloads_path ⇒ Object
64
65
66
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 64
def package_downloads_path
@package_downloads_path ||= downloads_path.join(package_name)
end
|
#package_path ⇒ Object
44
45
46
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 44
def package_path
@package_path ||= luban_install_path.join('pkg', package_name)
end
|
#package_tmp_path ⇒ Object
60
61
62
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 60
def package_tmp_path
@package_tmp_path ||= package_path.join('tmp')
end
|
#package_versions_path ⇒ Object
48
49
50
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 48
def package_versions_path
@package_versions_path ||= package_path.join('versions')
end
|
#parent ⇒ Object
33
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 33
def parent; task.opts.parent; end
|