class Luban::Deployment::Application::Constructor
Public Instance Methods
cleanup()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 33 def cleanup execute("find #{tmp_path}/* -type f|xargs rm -f") update_result "Temporary files in app environment is cleaned up." end
destroy()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 19 def destroy task.opts.destroy_project ? destroy_project : destroy_app end
destroy_app()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 28 def destroy_app rmdir(app_path) update_result "The application environment is destroyed." end
destroy_project()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 23 def destroy_project rmdir(project_path) update_result "The project environment is destroyed." end
envrc_template_file()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 5 def envrc_template_file @envrc_template_file ||= find_template_file("envrc.erb") end
setup()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 13 def setup bootstrap create_envrc_files update_result "Application environment is setup successfully." end
unset_envrc_template_file()
click to toggle source
# 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
Protected Instance Methods
bootstrap()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 40 def bootstrap assure_dirs(downloads_path, archived_logs_path, tmp_path, app_bin_path, app_tmp_path, releases_path, packages_path, shared_path) assure_dirs(docker_path) if dockerized? end
create_envrc_files()
click to toggle source
# File lib/luban/deployment/cli/application/constructor.rb, line 47 def create_envrc_files upload_by_template(file_to_upload: envrc_file, template_file: envrc_template_file, auto_revision: true) upload_by_template(file_to_upload: unset_envrc_file, template_file: unset_envrc_template_file, auto_revision: true) end