module InitLib
takeltau init takelage lib
Private Instance Methods
_init_lib_bit_check()
click to toggle source
Check bit.
# File lib/takeltau/init/lib.rb, line 18 def _init_lib_bit_check return false unless command_available_else_error? config.active['cmd_bit'] return true unless bit_check_workspace log.error 'bit is already initialized!' false end
_init_lib_bit_init()
click to toggle source
Init bit.
# File lib/takeltau/init/lib.rb, line 27 def _init_lib_bit_init log.info 'Initializing bit workspace' return false unless try config.active['cmd_init_lib_bit_init'] true end
_init_lib_bit_require_import()
click to toggle source
Import bit components.
# File lib/takeltau/init/lib.rb, line 8 def _init_lib_bit_require_import if config.active['init_bit_require_import'] == 'true' log.info 'Importing bit components' return false unless bit_require_import end true end
_init_lib_files_check(files)
click to toggle source
Check files.
# File lib/takeltau/init/lib.rb, line 52 def _init_lib_files_check(files) exit_status = true files.each do |file| if _file_exists? file[:name] log.error "File exists: #{file[:name]}" exit_status = false end end exit_status end
_init_lib_files_create(files)
click to toggle source
Create files.
# File lib/takeltau/init/lib.rb, line 64 def _init_lib_files_create(files) files.each do |file| template file[:template], file[:name] end true end
_init_lib_git_add_all()
click to toggle source
Run git add –all.
# File lib/takeltau/init/lib.rb, line 72 def _init_lib_git_add_all log.info 'Preparing initial git commit' return false unless try config.active['cmd_init_lib_git_add_all'] true end
_init_lib_git_check()
click to toggle source
Check git.
# File lib/takeltau/init/lib.rb, line 35 def _init_lib_git_check return false unless command_available_else_error? config.active['cmd_git'] return true unless git_check_workspace log.error 'git is already initialized!' false end
_init_lib_git_commit_initial()
click to toggle source
Run git commit -m “Initial commit”.
# File lib/takeltau/init/lib.rb, line 80 def _init_lib_git_commit_initial log.info 'Saving initial git commit' return false unless try config.active['cmd_init_lib_git_commit_initial'] true end
_init_lib_git_init()
click to toggle source
Init git.
# File lib/takeltau/init/lib.rb, line 44 def _init_lib_git_init log.info 'Initializing git workspace' return false unless try config.active['cmd_init_lib_git_init'] true end