Class: Takeltau::InitTakelage

Inherits:
SubCommandBase show all
Includes:
ConfigModule, GitCheckClean, GitCheckWorkspace, InitLib, InitTakelageRake, LoggingModule, ProjectModule, SystemModule, Thor::Actions
Defined in:
lib/takeltau/init/takelage/cli.rb

Overview

takeltau init takelage

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InitTakelageRake

#init_takelage_rake

Methods included from GitCheckWorkspace

#git_check_workspace

Methods included from GitCheckClean

#git_check_clean

Methods included from ProjectModule

#initialize_project, #project

Methods included from ConfigModule

#config, #configured?, #initialize_config

Methods included from SystemModule

#command_available_else_error?, #hash_to_yaml, #read_yaml_erb_file, #read_yaml_file, #rm_fr, #run, #run_and_capture, #run_and_exit, #run_and_fork, #try, #write_file

Methods included from LoggingModule

#initialize_logging, #log

Methods inherited from SubCommandBase

banner, subcommand_prefix

Constructor Details

#initialize(args = [], local_options = {}, configuration = {}) ⇒ InitTakelage

Define templates



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/takeltau/init/takelage/cli.rb', line 19

def initialize(args = [], local_options = {}, configuration = {})
  # initialize thor parent class
  super

  @gitignore = {
    name: '.gitignore',
    template: '../templates/gitignore.tt'
  }
  @hgclone = {
    name: 'hgclone',
    template: 'templates/hgclone.tt'
  }
  @projectyml = {
    name: 'project.yml',
    template: 'templates/projectyml.tt'
  }
  @rakefile = {
    name: 'Rakefile',
    template: '../templates/Rakefile.tt'
  }
end

Class Method Details

.source_rootObject

Provide template path for Thor:Actions



42
43
44
# File 'lib/takeltau/init/takelage/cli.rb', line 42

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#rakeObject

Initialize takelage rake project [NAME].



54
55
56
# File 'lib/takeltau/init/takelage/cli.rb', line 54

def rake
  exit init_takelage_rake
end