Class: Luban::Deployment::Application::Worker
- Inherits:
-
Worker::Base
- Object
- Worker::Base
- Luban::Deployment::Application::Worker
- Defined in:
- lib/luban/deployment/cli/application/worker.rb
Direct Known Subclasses
Configurator, Constructor, Controller, Crontab, Dockerizer, Publisher
Constant Summary
Constants included from Parameters::Application
Parameters::Application::DefaultLogrotateInterval, Parameters::Application::DefaultLogrotateMaxAge
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
- #bundle_command(cmd, **opts) ⇒ Object
- #bundle_executable ⇒ Object
- #docker_path ⇒ Object
- #gemfile ⇒ Object
- #has_gemfile? ⇒ Boolean
- #profile_name ⇒ Object
- #release_path ⇒ Object
- #release_tag ⇒ Object
- #releases_path ⇒ Object
- #ruby_bin_path ⇒ Object
- #shell_setup ⇒ Object
Methods included from Package::Worker::Base
#package_bin_path, #package_install_path, #packages_path
Methods included from Service::Worker::Base
#control_file_dir, #control_file_name, #control_file_path, #control_path, #log_file_name, #log_file_path, #log_path, #output_redirection, #pid_file_name, #pid_file_path, #pids_path, #profile_path, #service_entry, #shell_command, #shell_delimiter, #shell_output, #shell_prefix
Methods included from Worker::Paths::Remote
#app_archives_path, #app_bin_path, #app_path, #app_tmp_path, #archived_logs_path, #archives_path, #current_app_path, #deployment_projects_path, #docker_root_path, #downloads_path, #env_path, #envrc_file, #packages_root_path, #project_path, #releases_root_path, #shared_path, #tmp_path, #unset_envrc_file
Methods inherited from Worker::Base
#dry_run?, #force?, #initialize, #linux?, #method_missing, #osx?, #packages, #run, #target_full_name, #target_major_version, #target_name, #target_patch_level, #target_version
Methods included from Parameters::Application
#dockerize, #dockerized?, #env_name, #logrotate_count, #monitor_itself?, #monitorable?
Methods included from Parameters::Base
Methods included from Parameters::Docker
#validate_for_docker_cert_path
Methods included from Parameters::Project
#monitor_defined?, #process_monitor_via
Methods included from Parameters::General
#current_uid, #current_user, included
Methods included from Helpers::Utils
#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, #with_clean_env
Methods included from Helpers::Configuration
#ask, #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::Worker::Base
Instance Method Details
#bundle_command(cmd, **opts) ⇒ Object
47 48 49 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 47 def bundle_command(cmd, **opts) shell_command("#{bundle_executable} exec #{cmd}", **opts) end |
#bundle_executable ⇒ Object
43 44 45 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 43 def bundle_executable @bundle_executable ||= ruby_bin_path.join('bundle') end |
#docker_path ⇒ Object
23 24 25 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 23 def docker_path @docker_path ||= docker_root_path.join(project, application) end |
#gemfile ⇒ Object
9 10 11 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 9 def gemfile @gemfile ||= release_path.join('Gemfile') end |
#has_gemfile? ⇒ Boolean
13 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 13 def has_gemfile?; file?(gemfile); end |
#profile_name ⇒ Object
27 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 27 def profile_name; 'app'; 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 ||= releases_root_path.join(project, application, 'app') end |
#ruby_bin_path ⇒ Object
39 40 41 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 39 def ruby_bin_path @ruby_bin_path ||= package_bin_path('ruby') end |
#shell_setup ⇒ Object
15 16 17 |
# File 'lib/luban/deployment/cli/application/worker.rb', line 15 def shell_setup @shell_setup ||= super << "cd #{release_path}" end |