Class: Luban::Deployment::Application::Worker
Constant Summary
Parameters::General::DefaultLubanRootPath
Helpers::Utils::LogLevels
Instance Attribute Summary
Attributes inherited from Worker::Base
#task
#backend
#config
Instance Method Summary
collapse
#compose_command, #control_file_name, #control_file_path, #log_file_name, #log_file_path, #log_path, #logrotate_file_name, #logrotate_file_path, #pid_file_name, #pid_file_path, #pids_path, #profile_path
#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, #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?
Instance Method Details
#package_bin_path(package_name) ⇒ Object
25
26
27
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 25
def package_bin_path(package_name)
@package_bin_path ||= package_path(package_name).join('bin')
end
|
#package_path(package_name) ⇒ Object
20
21
22
23
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 20
def package_path(package_name)
@package_path ||= luban_install_path.join('pkg', package_name.to_s, 'versions',
package_version(package_name))
end
|
#package_version(package_name) ⇒ Object
18
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 18
def package_version(package_name); packages[package_name.to_sym].current_version; end
|
#packages ⇒ Object
16
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 16
def packages; task.opts.packages; end
|
#release_path ⇒ Object
39
40
41
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 39
def release_path
@release_path ||= releases_path.join(release_tag)
end
|
#release_tag ⇒ Object
33
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 33
def release_tag; task.opts.release[:tag]; end
|
#releases_path ⇒ Object
35
36
37
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 35
def releases_path
@releases_path ||= super.join('app')
end
|
#service_entry ⇒ Object
29
30
31
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 29
def service_entry
@service_entry ||= "#{env_name.gsub('/', '.')}.app"
end
|
#shell_setup_commands ⇒ Object
8
9
10
|
# File 'lib/luban/deployment/cli/application/worker.rb', line 8
def shell_setup_commands
super << "cd #{release_path}"
end
|