Class: Appetize::CLI
- Inherits:
-
Thor
- Object
- Thor
- Appetize::CLI
- Defined in:
- lib/appetize/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Constant Summary collapse
- Error =
Error raised by this runner
Class.new(StandardError)
Instance Method Summary collapse
- #delete(public_key, token = nil, api_host = nil) ⇒ Object
- #update(path, public_key, token = nil, api_host = nil) ⇒ Object
- #upload(path, platform, token = nil, api_host = nil) ⇒ Object
- #version ⇒ Object
Instance Method Details
#delete(public_key, token = nil, api_host = nil) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/appetize/cli.rb', line 48 def delete(public_key, token = nil, api_host = nil) if [:help] invoke :help, ["delete"] else require_relative "commands/delete" Appetize::Commands::Delete.new(public_key, token, api_host, ).execute end end |
#update(path, public_key, token = nil, api_host = nil) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/appetize/cli.rb', line 24 def update(path, public_key, token = nil, api_host = nil) if [:help] invoke :help, ["update"] else require_relative "commands/update" Appetize::Commands::Update.new(path, public_key, token, api_host, ).execute end end |
#upload(path, platform, token = nil, api_host = nil) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/appetize/cli.rb', line 36 def upload(path, platform, token = nil, api_host = nil) if [:help] invoke :help, ["upload"] else require_relative "commands/upload" Appetize::Commands::Upload.new(path, platform, token, api_host, ).execute end end |