Class: Luban::Deployment::Application::Constructor
- Inherits:
-
Worker
- Object
- Worker::Base
- Worker
- Luban::Deployment::Application::Constructor
- Defined in:
- lib/luban/deployment/cli/application/constructor.rb
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
- #cleanup ⇒ Object
- #destroy ⇒ Object
- #destroy_app ⇒ Object
- #destroy_project ⇒ Object
- #envrc_template_file ⇒ Object
- #setup ⇒ Object
- #unset_envrc_template_file ⇒ Object
Methods inherited from Worker
#bundle_command, #bundle_executable, #gemfile, #has_gemfile?, #profile_name, #release_path, #release_tag, #releases_path, #ruby_bin_path, #shell_setup
Methods included from Service::Worker::Base
#control_file_name, #control_file_path, #log_file_name, #log_file_path, #log_path, #output_redirection, #pid_file_name, #pid_file_path, #pids_path, #profile_name, #profile_path, #service_entry, #shell_command, #shell_delimiter, #shell_output, #shell_prefix, #shell_setup
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, #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
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
#env_name, #logrotate_count, #monitor_itself?, #monitorable?
Methods included from Parameters::Base
Methods included from Parameters::Project
#monitor_defined?, #process_monitor_via
Methods included from Parameters::General
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
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
#cleanup ⇒ Object
32 33 34 35 |
# File 'lib/luban/deployment/cli/application/constructor.rb', line 32 def cleanup execute("find #{tmp_path}/* -type f|xargs rm -f") update_result "Temporary files in app environment is cleaned up." end |
#destroy ⇒ Object
18 19 20 |
# File 'lib/luban/deployment/cli/application/constructor.rb', line 18 def destroy task.opts.destroy_project ? destroy_project : destroy_app end |
#destroy_app ⇒ Object
27 28 29 30 |
# File 'lib/luban/deployment/cli/application/constructor.rb', line 27 def destroy_app rmdir(app_path) update_result "The application environment is destroyed." end |
#destroy_project ⇒ Object
22 23 24 25 |
# File 'lib/luban/deployment/cli/application/constructor.rb', line 22 def destroy_project rmdir(project_path) update_result "The project environment is destroyed." end |
#envrc_template_file ⇒ Object
5 6 7 |
# File 'lib/luban/deployment/cli/application/constructor.rb', line 5 def envrc_template_file @envrc_template_file ||= find_template_file("envrc.erb") end |
#setup ⇒ Object
13 14 15 16 |
# File 'lib/luban/deployment/cli/application/constructor.rb', line 13 def setup bootstrap create_envrc_files end |
#unset_envrc_template_file ⇒ Object
9 10 11 |
# File 'lib/luban/deployment/cli/application/constructor.rb', line 9 def unset_envrc_template_file @unset_envrc_template_file ||= find_template_file("unset_envrc.erb") end |