Module: Tomo::CLI::DeployOptions

Included in:
Tomo::Commands::Deploy, Tomo::Commands::Run, Tomo::Commands::Setup
Defined in:
lib/tomo/cli/deploy_options.rb

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object

rubocop:disable Metrics/MethodLength



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/tomo/cli/deploy_options.rb', line 6

def self.included(mod) # rubocop:disable Metrics/MethodLength
  mod.class_eval do
    option :environment,
           "-e, --environment ENVIRONMENT",
           "Specify environment to use (e.g. production)",
           values: :environment_names

    option :settings,
           "-s, --setting NAME=VALUE",
           "Override setting NAME with the given VALUE",
           values: :setting_completions

    option :dry_run,
           "--[no-]dry-run",
           "Simulate running tasks instead of using real SSH" do |dry|
      Tomo.dry_run = dry
    end

    after_parse :prompt_for_environment
  end
end