Class: Kamal::Cli::Base

Inherits:
Thor
  • Object
show all
Includes:
SSHKit::DSL
Defined in:
lib/kamal/cli/base.rb

Direct Known Subclasses

Accessory, App, Build, Lock, Main, Proxy, Prune, Registry, Secrets, Server

Defined Under Namespace

Classes: LockHeldError, LockMissingError

Constant Summary collapse

VERBOSITY =
{ verbose: :debug, quiet: :error }.freeze
AUTOMATIC_DEPLOY_LOCK_MESSAGE =
"Automatic deploy lock"

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = [], local_options = {}, config = {}) ⇒ Base

Returns a new instance of Base.



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/kamal/cli/base.rb', line 35

def initialize(args = [], local_options = {}, config = {})
  if config[:current_command].is_a?(Kamal::Cli::Alias::Command)
    # When Thor generates a dynamic command, it doesn't attempt to parse the arguments.
    # For our purposes, it means the arguments are passed in args rather than local_options.
    super([], args, config)
  else
    super
  end

  initialize_commander unless KAMAL.configured?
end

Class Method Details

.dynamic_command_classObject



15
# File 'lib/kamal/cli/base.rb', line 15

def self.dynamic_command_class() Kamal::Cli::Alias::Command end

.exit_on_failure?Boolean

Returns:

  • (Boolean)


14
# File 'lib/kamal/cli/base.rb', line 14

def self.exit_on_failure?() true end