Class: Luban::Deployment::Application::Worker
- Inherits:
-
Worker::Base
- Object
- Worker::Base
- Luban::Deployment::Application::Worker
- Includes:
- Service::Worker::Base, Worker::Paths::Remote
- Defined in:
- lib/luban/deployment/cli/application/worker.rb
Direct Known Subclasses
Constant Summary
Constants included from Parameters::General
Parameters::General::DefaultLubanRootPath
Constants included from Helpers::Utils
Instance Attribute Summary
Attributes inherited from Worker::Base
Attributes included from Helpers::Utils
Attributes included from Helpers::Configuration
Instance Method Summary collapse
- #package_bin_path(package_name) ⇒ Object
- #package_path(package_name) ⇒ Object
- #package_version(package_name) ⇒ Object
- #packages ⇒ Object
- #release_path ⇒ Object
- #release_tag ⇒ Object
- #releases_path ⇒ Object
- #service_entry ⇒ Object
Methods included from Service::Worker::Base
#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
Methods included from Worker::Paths::Remote
#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
Methods inherited from Worker::Base
#dry_run?, #env_name, #force?, #initialize, #linux?, #osx?, #run, #target_full_name, #target_major_version, #target_name, #target_patch_level, #target_version
Methods included from Parameters::Base
Methods included from Parameters::General
Methods included from Helpers::Utils
#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
Methods included from Helpers::Configuration
#ask, #default_templates_paths, #fetch, #find_template_file, #load_configuration_file, #primary, #release_roles, #role, #roles, #server, #set, #set_default, #syntax_error?
Constructor Details
This class inherits a constructor from Luban::Deployment::Worker::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Luban::Deployment::Helpers::Utils
Instance Method Details
#package_bin_path(package_name) ⇒ Object
21 22 23 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 21 def package_bin_path(package_name) @package_bin_path ||= package_path(package_name).join('bin') end |
#package_path(package_name) ⇒ Object
16 17 18 19 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 16 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
14 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 14 def package_version(package_name); packages[package_name.to_sym].current_version; end |
#packages ⇒ Object
12 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 12 def packages; task.opts.packages; end |
#release_path ⇒ Object
35 36 37 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 35 def release_path @release_path ||= releases_path.join(release_tag) end |
#release_tag ⇒ Object
29 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 29 def release_tag; task.opts.release[:tag]; end |
#releases_path ⇒ Object
31 32 33 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 31 def releases_path @releases_path ||= super.join('app') end |
#service_entry ⇒ Object
25 26 27 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 25 def service_entry @service_entry ||= "#{env_name.gsub('/', '.')}.app" end |