class FIR::CLI
Public Instance Methods
build_apk(*args)
click to toggle source
# File lib/fir/cli.rb, line 80 def build_apk(*args) prepare :build_apk FIR.build_apk(*args, options) end
build_ipa(*args)
click to toggle source
# File lib/fir/cli.rb, line 48 def build_ipa(*args) prepare :build_ipa FIR.build_ipa(*args, options) end
dingtalk(*args)
click to toggle source
# File lib/fir/cli.rb, line 133 def dingtalk(*args) prepare :dingtalk FIR.dingtalk(*args, options) end
help(command = nil, subcommand = false)
click to toggle source
Calls superclass method
# File lib/fir/cli.rb, line 178 def help(command = nil, subcommand = false) super end
info(*args)
click to toggle source
# File lib/fir/cli.rb, line 89 def info(*args) prepare :info FIR.info(*args, options) end
invoke_command(command, *args)
click to toggle source
Calls superclass method
# File lib/fir/cli.rb, line 183 def invoke_command(command, *args) logfile = options[:logfile].blank? ? STDOUT : options[:logfile] logfile = '/dev/null' if options[:quiet] FIR.logger = Logger.new(logfile) FIR.logger.level = options[:verbose] ? Logger::INFO : Logger::ERROR super end
login(*args)
click to toggle source
# File lib/fir/cli.rb, line 147 def login(*args) prepare :login token = options[:token] || args.first || ask('Please enter your fir.im API Token:', :white, echo: true) FIR.login(token) end
me()
click to toggle source
# File lib/fir/cli.rb, line 155 def me prepare :me FIR.me end
publish(*args)
click to toggle source
# File lib/fir/cli.rb, line 122 def publish(*args) prepare :publish FIR.publish(*args, options) end
upgrade()
click to toggle source
# File lib/fir/cli.rb, line 163 def upgrade prepare :upgrade say '✈ Upgrade fir-cli (use `gem install fir-cli --no-ri --no-rdoc`)' say `gem install fir-cli --no-ri --no-rdoc` end
version()
click to toggle source
# File lib/fir/cli.rb, line 172 def version say "✈ fir-cli #{FIR::VERSION}" end
Private Instance Methods
prepare(task)
click to toggle source
# File lib/fir/cli.rb, line 195 def prepare(task) if options.help? help(task.to_s) raise SystemExit end $DEBUG = true if ENV['DEBUG'] end