class Tachikoma::CLI
Command for Tachikoma
Public Class Methods
help(shell, *)
click to toggle source
# File lib/tachikoma/cli.rb, line 47 def self.help(shell, *) list = printable_tasks shell.say 'Commands:' shell.print_table(list, indent: 2, truncate: true) shell.say class_options_help(shell) shell.say <<-USAGE Tasks: rake tachikoma:run_bundler # run tachikoma with bundler rake tachikoma:run_carton # run tachikoma with carton rake tachikoma:run_none # run tachikoma with none rake tachikoma:run_david # run tachikoma with david rake tachikoma:run_composer # run tachikoma with composer rake tachikoma:run_cocoapods # run tachikoma with cocoapods rake tachikoma:run_carthage # run tachikoma with carthage rake tachikoma:run_ncu # run tachikoma with npm-check-updates rake tachikoma:run_yarn # run tachikoma with yarn USAGE end
source_root()
click to toggle source
# File lib/tachikoma/cli.rb, line 68 def self.source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates')) end
Public Instance Methods
init()
click to toggle source
# File lib/tachikoma/cli.rb, line 11 def init require 'fileutils' copy_or_append_file_lists = %w( .gitignore Rakefile data/__user_config__.yaml ) copy_file_lists = %w( repos/.gitkeep data/bot-motoko-tachikoma.yaml ) copy_or_append_file_lists.each do |target| if File.exist?(target) append_to_file target do File.read(File.join(self.class.source_root, target)) end else copy_file target end end copy_file_lists.each do |target| copy_file target end puts 'tachikoma init completed!' puts 'You might want to see README!' end
version()
click to toggle source
# File lib/tachikoma/cli.rb, line 43 def version puts Tachikoma::VERSION end