Class: Luban::Deployment::Runner

Inherits:
CLI::Application
  • Object
show all
Includes:
Helpers::Configuration, Parameters::General
Defined in:
lib/luban/deployment/runner.rb

Constant Summary

Constants included from Parameters::General

Parameters::General::DefaultLubanRootPath

Instance Attribute Summary

Attributes included from Helpers::Configuration

#config

Instance Method Summary collapse

Methods included from Parameters::General

included

Methods included from Parameters::Base

#parameter

Methods included from Helpers::Configuration

#ask, #fetch, #find_template_file, #load_configuration_file, #primary, #release_roles, #role, #roles, #server, #set, #set_default, #syntax_error?

Instance Method Details

#config_fileObject



19
20
21
# File 'lib/luban/deployment/runner.rb', line 19

def config_file
  @config_file ||= work_dir.join(lubanfile)
end

#default_rcObject



10
11
12
13
14
15
# 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)
                  }
end

#init_project(args:, opts:) ⇒ Object



23
24
25
26
27
# File 'lib/luban/deployment/runner.rb', line 23

def init_project(args:, opts:)
  set_default :project, args[:project]
  singleton_class.send(:include, Luban::Deployment::Helpers::Generator::Project)
  create_project_skeleton
end

#lubanfileObject



17
# File 'lib/luban/deployment/runner.rb', line 17

def lubanfile; @lubanfile ||= 'Lubanfile.rb'; end