class Michael::CLI

Handle the application command line parsing and the dispatch to various command objects

@api public

Constants

Error

Error raised by this runner

Public Instance Methods

auth(*) click to toggle source
# File lib/michael/cli.rb, line 39
def auth(*)
  if options[:help]
    invoke :help, ['auth']
  else
    require_relative 'commands/auth'
    ttycfg = TTY::Config.new
    ttycfg.append_path(Michael::CONFIG_DIR_ABSOLUTE_PATH)
    ttycfg.filename = Michael::CONFIG_FILENAME

    cfg = Michael::Services::Configuration.new(ttycfg)

    token = Michael::Services::Github::Token.new(cfg)

    Michael::Commands::Auth.new(TTY::Prompt.new, token, options).execute
  end
end
version() click to toggle source
# File lib/michael/cli.rb, line 22
def version
  require_relative 'version'
  puts "v#{Michael::VERSION}"
end