Class: Neptuno::CLI::Configure

Inherits:
Base
  • Object
show all
Defined in:
lib/neptuno/cli/configure.rb

Overview

Configure Neptuno defaults

Constant Summary

Constants inherited from Base

Base::ABORT_MESSAGE

Constants included from TTY::Command

TTY::Command::TTY, TTY::Command::TTYP

Constants included from TTY::Config

TTY::Config::ABORT_MESSAGE, TTY::Config::TTY

Constants included from TTY::File

TTY::File::ABORT_MESSAGE, TTY::File::TTY

Constants included from TTY::Prompt

TTY::Prompt::TTY

Instance Method Summary collapse

Methods inherited from Base

#command_service_to, #command_services_to, #initialize

Methods included from TTY::Command

#command, #command_p, #neptuno_command

Methods included from TTY::Config

#auto_restart_procs, #config, #configured_services, #docker_compose_hash, #docker_compose_services, #get_dependants, #healthy_services, #json_services_status, #running_services, #services, #services_with_procs, #starting_services

Methods included from TTY::File

#file, #in_service?, #make_service_files, #neptuno_path, #project, #service

Methods included from TTY::Prompt

#prompt

Constructor Details

This class inherits a constructor from Neptuno::CLI::Base

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
# File 'lib/neptuno/cli/configure.rb', line 9

def call(**)
  configured_services = config.fetch("configured_services")
  configured_services = prompt.multi_select("Active services: ", config.fetch("services")) do |menu|
    menu.default(*configured_services)
  end
  config.set(:configured_services, value: configured_services)
  config.write(force: true)
end