Class: NeetoDeploy::CLI::Exec::Base

Inherits:
Base
  • Object
show all
Includes:
Constants, Session
Defined in:
lib/neeto_deploy/cli/exec/base.rb

Constant Summary collapse

CONSOLE_EXECUTABLE =
{
  mac: "console-linux-arm64",
  linux: "console-linux-amd64"
}.freeze

Constants included from Constants

Constants::NEETO_DEPLOY_CLI_API_CONSOLE_SESSION_BASE_URL

Instance Attribute Summary collapse

Attributes inherited from Base

#ui

Instance Method Summary collapse

Methods included from Session

#common_body, require_app_option, #send_delete_request, #send_get_request, #send_patch_request, #send_post_request

Methods included from Constants

#console_session_base_url

Methods inherited from Base

#create_config_dir

Constructor Details

#initialize(app_name) ⇒ Base

Returns a new instance of Base.



25
26
27
28
# File 'lib/neeto_deploy/cli/exec/base.rb', line 25

def initialize(app_name)
  super()
  @app_name = app_name
end

Instance Attribute Details

#app_nameObject (readonly)

Returns the value of attribute app_name.



23
24
25
# File 'lib/neeto_deploy/cli/exec/base.rb', line 23

def app_name
  @app_name
end

Instance Method Details

#process!Object



30
31
32
33
34
35
36
37
# File 'lib/neeto_deploy/cli/exec/base.rb', line 30

def process!
  start_spinner
  send_console_session_request
  ui.error("\n#{@response.body}") and return unless @response.success?

  start_console
  connection_cleanup_callback
end