class FIR::CLI
Public Instance Methods
build_apk(*args)
click to toggle source
# File lib/fir/cli.rb, line 78 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 47 def build_ipa(*args) prepare :build_ipa FIR.build_ipa(*args, options) end
help(command = nil, subcommand = false)
click to toggle source
Calls superclass method
# File lib/fir/cli.rb, line 187 def help(command = nil, subcommand = false) super end
info(*args)
click to toggle source
# File lib/fir/cli.rb, line 87 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 192 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::DEBUG : Logger::ERROR super end
login(*args)
click to toggle source
# File lib/fir/cli.rb, line 156 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 164 def me prepare :me FIR.me end
publish(*args)
click to toggle source
# File lib/fir/cli.rb, line 149 def publish(*args) prepare :publish FIR.publish(*args, options) end
upgrade()
click to toggle source
# File lib/fir/cli.rb, line 172 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 181 def version say "✈ fir-cli #{FIR::VERSION}" end
Private Instance Methods
prepare(task)
click to toggle source
# File lib/fir/cli.rb, line 204 def prepare(task) if options.help? help(task.to_s) raise SystemExit end $DEBUG = true if ENV['DEBUG'] end