Class: Luban::Deployment::Runner
Constant Summary
Parameters::General::DefaultLubanRootPath
Instance Attribute Summary
#config
Instance Method Summary
collapse
#current_uid, #current_user, included
#parameter
#ask, #fetch, #find_template_file, #load_configuration_file, #primary, #release_roles, #role, #roles, #server, #set, #set_default, #syntax_error?
Instance Method Details
#config_file ⇒ Object
20
21
22
|
# File 'lib/luban/deployment/runner.rb', line 20
def config_file
@config_file ||= work_dir.join(lubanfile)
end
|
#default_rc ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/luban/deployment/runner.rb', line 10
def default_rc
@default_rc ||= { 'luban_roles' => %i(app),
'luban_root_path' => Parameters::General::DefaultLubanRootPath,
'stages' => %w(development staging production),
'author' => { 'name' => 'author name', 'email' => '[email protected]' }
}
end
|
#init_project(args:, opts:) ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/luban/deployment/runner.rb', line 26
def init_project(args:, opts:)
if new_project?
project args[:project]
if project == '.'
work_dir Pathname.pwd
project work_dir.basename(".deploy").to_s
end
end
singleton_class.send(:include, Luban::Deployment::Helpers::Generator::Project)
create_project_skeleton
end
|
#lubanfile ⇒ Object
18
|
# File 'lib/luban/deployment/runner.rb', line 18
def lubanfile; @lubanfile ||= 'Lubanfile.rb'; end
|
#new_project? ⇒ Boolean
24
|
# File 'lib/luban/deployment/runner.rb', line 24
def new_project?; !!@new_project; end
|