Class: Central::Cli::Apps::ShowCommand

Inherits:
Clamp::Command
  • Object
show all
Includes:
Common, Common, StackOptions
Defined in:
lib/central/cli/apps/show_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#app_json, #create_yml, #current_dir, #extend_env_vars, #extend_options, #extend_secrets, #load_services, #normalize_env_vars, #parse_services, #prefixed_name, #require_config_file, #service_exists?, #token, #valid_addons

Methods included from Services::ServicesHelper

#create_service, #delete_service, #deploy_service, #get_service, #int_to_filesize, #parse_image, #parse_links, #parse_log_opts, #parse_memory, #parse_ports, #parse_relative_time, #parse_secrets, #parse_service_id, #restart_service, #scale_service, #show_service, #start_service, #stop_service, #update_service, #wait_for_deploy_to_finish

Methods included from Common

#access_token=, #add_master, #api_url, #api_url=, #clear_current_stack, #client, #current_master, #current_master=, #current_master_index, #current_stack, #current_stack=, #ensure_custom_ssl_ca, #require_api_url, #require_current_stack, #require_token, #reset_client, #save_settings, #settings, #settings_filename

Methods included from StackOptions

included

Instance Attribute Details

#service_prefixObject (readonly)

Returns the value of attribute service_prefix.



14
15
16
# File 'lib/central/cli/apps/show_command.rb', line 14

def service_prefix
  @service_prefix
end

#servicesObject (readonly)

Returns the value of attribute services.



14
15
16
# File 'lib/central/cli/apps/show_command.rb', line 14

def services
  @services
end

Instance Method Details

#executeObject



16
17
18
19
20
21
# File 'lib/central/cli/apps/show_command.rb', line 16

def execute
  require_config_file(filename)

  @service_prefix = project_name || current_dir
  show_service(require_token, prefixed_name(service))
end