Class: Omc::Cli

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

Instance Method Summary collapse

Instance Method Details

#console(stack) ⇒ Object



26
27
28
29
# File 'lib/omc/cli.rb', line 26

def console(stack)
  command = StackCommand.new(, user, stack, app: options[:app], layer: options[:layer])
  command.console
end

#db(stack) ⇒ Object



33
34
35
36
# File 'lib/omc/cli.rb', line 33

def db(stack)
  command = StackCommand.new(, user, stack, app: options[:app], layer: options[:layer])
  command.db
end

#ssh(stack) ⇒ Object



13
14
15
16
# File 'lib/omc/cli.rb', line 13

def ssh(stack)
  command = StackCommand.new(, user, stack, layer: options[:layer])
  command.ssh
end

#ssh_exec(stack, user_command) ⇒ Object



19
20
21
22
# File 'lib/omc/cli.rb', line 19

def ssh_exec(stack, user_command)
  command = StackCommand.new(, user, stack, layer: options[:layer])
  command.ssh_and_execute user_command
end

#status(stack) ⇒ Object



46
47
48
49
# File 'lib/omc/cli.rb', line 46

def status(stack)
  command = StackCommand.new(, user, stack, app: options[:app], layer: options[:layer])
  command.status(self)
end

#unicorn(action, stack) ⇒ Object



40
41
42
43
# File 'lib/omc/cli.rb', line 40

def unicorn(action, stack)
  command = StackCommand.new(, user, stack, app: options[:app])
  command.unicorn(action)
end