Class: Luban::Deployment::Package::Worker
Constant Summary
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_bin_path, #app_path, #app_tmp_path, #current_app_path, #downloads_path, #env_path, #envrc_file, #etc_path, #logrotate_path, #luban_install_path, #project_path, #releases_path, #shared_path, #tmp_path, #unset_envrc_file
#dry_run?, #env_name, #force?, #initialize, #linux?, #osx?, #run, #target_full_name, #target_major_version, #target_name, #target_patch_level, #target_version
#parameter
included
#assure, #assure_dirs, #assure_symlink, #capture, #check_pass?, #chmod, #cp, #directory?, #file?, #hardware_name, #host, #hostname, #ln, #match?, #md5_for_file, #md5_matched?, #method_missing, #mkdir, #mv, #now, #os_name, #os_release, #readlink, #render_template, #revision_match?, #rm, #rmdir, #sudo, #symlink?, #upload_by_template, #url_exists?, #user_home
#ask, #default_templates_paths, #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
8
9
10
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 8
def package_class(package)
Luban::Deployment::Package::Base.package_class(package)
end
|
.worker_class(worker, **opts) ⇒ Object
12
13
14
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 12
def worker_class(worker, **opts)
Luban::Deployment::Package::Base.worker_class(worker, **opts)
end
|
Instance Method Details
#bin_path ⇒ Object
57
58
59
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 57
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
41
42
43
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 41
def current_bin_path
@current_bin_path ||= current_path.join('bin')
end
|
#current_path ⇒ Object
37
38
39
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 37
def current_path
@current_path ||= app_path.join(package_name)
end
|
#install_path ⇒ Object
53
54
55
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 53
def install_path
@install_path ||= package_versions_path.join(package_version)
end
|
#package_downloads_path ⇒ Object
65
66
67
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 65
def package_downloads_path
@package_downloads_path ||= downloads_path.join(package_name)
end
|
#package_path ⇒ Object
45
46
47
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 45
def package_path
@package_path ||= luban_install_path.join('pkg', package_name)
end
|
#package_tmp_path ⇒ Object
61
62
63
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 61
def package_tmp_path
@package_tmp_path ||= package_path.join('tmp')
end
|
#package_versions_path ⇒ Object
49
50
51
|
# File 'lib/luban/deployment/cli/package/worker.rb', line 49
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
|