Class: Eien::CLI::Apps
Instance Method Summary collapse
Methods inherited from CLI
Instance Method Details
#create(name) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/eien/cli/apps.rb', line 24 def create(name) rescue_and_exit do context = ::Eien.context_or_default([:context]) require_context!(context) ::Eien::Apps::CreateTask.new( context, name, [:namespace] || name, ).run! end end |
#delete(app) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/eien/cli/apps.rb', line 55 def delete(app) rescue_and_exit do context = ::Eien.context_or_default([:context]) require_context!(context) if confirm!("You are about to delete #{app} app.", app) ::Eien::Apps::DeleteTask.new( context, app, ).run! end end end |
#list ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/eien/cli/apps.rb', line 11 def list rescue_and_exit do context = ::Eien.context_or_default([:context]) require_context!(context) ::Eien::Apps::ListTask.new(context).run! end end |
#select(app) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/eien/cli/apps.rb', line 40 def select(app) rescue_and_exit do context = ::Eien.context_or_default([:context]) require_context!(context) ::Eien::Apps::SelectTask.new( context, app, ).run! end end |
#status ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/eien/cli/apps.rb', line 73 def status rescue_and_exit do context = ::Eien.context_or_default([:context]) app = ::Eien.app_or_default([:app]) require_context!(context) require_context!(app) ::Eien::Apps::StatusTask.new( context, app, ).run! end end |