Class: CfDeployer::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/cf_deployer/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/cf_deployer/cli.rb', line 5

def self.exit_on_failure?
  true
end

Instance Method Details

#config(environment) ⇒ Object



36
37
38
39
# File 'lib/cf_deployer/cli.rb', line 36

def config environment
  prep_for_action :config, environment
  CfDeployer.config merged_options
end

#deploy(environment, component = nil) ⇒ Object



17
18
19
20
# File 'lib/cf_deployer/cli.rb', line 17

def deploy environment, component = nil
  prep_for_action :deploy, environment, component
  CfDeployer.deploy merged_options
end

#destroy(environment, component = nil) ⇒ Object



30
31
32
33
# File 'lib/cf_deployer/cli.rb', line 30

def destroy environment, component = nil
  prep_for_action :destroy, environment, component
  CfDeployer.destroy merged_options
end

#diff(environment, component = nil) ⇒ Object



42
43
44
45
# File 'lib/cf_deployer/cli.rb', line 42

def diff environment, component = nil
  prep_for_action :diff, environment, component
  CfDeployer.diff merged_options
end

#json(environment, component = nil) ⇒ Object



48
49
50
51
# File 'lib/cf_deployer/cli.rb', line 48

def json environment, component = nil
  prep_for_action :json, environment, component
  CfDeployer.json merged_options
end

#kill_inactive(environment, component) ⇒ Object



62
63
64
65
# File 'lib/cf_deployer/cli.rb', line 62

def kill_inactive environment, component
  prep_for_action :kill_inactive, environment, component
  CfDeployer.kill_inactive merged_options
end

#runhook(environment, component, hook_name) ⇒ Object



23
24
25
26
27
# File 'lib/cf_deployer/cli.rb', line 23

def runhook environment, component, hook_name
  @hook_name = hook_name.to_sym
  prep_for_action :runhook, environment, component
  CfDeployer.runhook merged_options
end

#status(environment, component = nil) ⇒ Object



56
57
58
59
# File 'lib/cf_deployer/cli.rb', line 56

def status environment, component = nil
  prep_for_action :status, environment, component
  CfDeployer.status merged_options
end

#switch(environment, component) ⇒ Object



68
69
70
71
# File 'lib/cf_deployer/cli.rb', line 68

def switch environment, component
  prep_for_action :switch, environment, component
  CfDeployer.switch merged_options
end