require 'claide' require "tty-spinner" module Lhj # command plugin class Command < CLAide::Command require 'lhj/command/init' require 'lhj/command/head_import' require 'lhj/command/refactor_rename' require 'lhj/command/local/fetch' require 'lhj/command/local/filter' require 'lhj/command/local/local' require 'lhj/command/local/micro_service' require 'lhj/command/local/local_upload' require 'lhj/command/oss' require 'lhj/command/oss/del' require 'lhj/command/oss/upload' require 'lhj/command/oss/list' require 'lhj/command/view' require 'lhj/command/rename_image' require 'lhj/command/trans' require 'lhj/command/yapi' self.abstract_command = true self.command = 'lhj' def spinner @spinner ||= TTY::Spinner.new('[:spinner]正在处理...', output: $stdout, format: :dots) end def auto_spin spinner.auto_spin puts "\n" end def stop spinner.stop('Done!') end end end