Class: FIR::CLI

Inherits:
Thor show all
Defined in:
lib/fir/cli.rb

Instance Method Summary collapse

Instance Method Details

#build_ipa(*args) ⇒ Object



37
38
39
40
41
# File 'lib/fir/cli.rb', line 37

def build_ipa *args
  prepare :build_ipa

  FIR.build_ipa(*args, options)
end

#help(command = nil, subcommand = false) ⇒ Object



122
123
124
# File 'lib/fir/cli.rb', line 122

def help command = nil, subcommand = false
  super
end

#info(*args) ⇒ Object



46
47
48
49
50
# File 'lib/fir/cli.rb', line 46

def info *args
  prepare :info

  FIR.info(*args, options)
end

#login(*args) ⇒ Object



74
75
76
77
78
79
# File 'lib/fir/cli.rb', line 74

def  *args
  prepare :login

  token = options[:token] || args.first || ask("Please enter your FIR.im API Token:", :white, echo: true)
  FIR.(token)
end

#mapping(*args) ⇒ Object



100
101
102
103
104
# File 'lib/fir/cli.rb', line 100

def mapping *args
  prepare :mapping

  FIR.mapping(*args, options)
end

#me(*args) ⇒ Object



82
83
84
85
86
# File 'lib/fir/cli.rb', line 82

def me *args
  prepare :me

  FIR.me
end

#publish(*args) ⇒ Object



66
67
68
69
70
# File 'lib/fir/cli.rb', line 66

def publish *args
  prepare :publish

  FIR.publish(*args, options)
end

#upgradeObject



108
109
110
111
112
# File 'lib/fir/cli.rb', line 108

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

#versionObject



116
117
118
# File 'lib/fir/cli.rb', line 116

def version
  say "✈ FIR-CLI #{FIR::VERSION}"
end