Class: Omc::Cli

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

Instance Method Summary collapse

Instance Method Details

#console(stack) ⇒ Object



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

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

#db(stack) ⇒ Object



49
50
51
52
# File 'lib/omc/cli.rb', line 49

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

#ssh(stack) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/omc/cli.rb', line 15

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

#ssh_exec(stack, user_command) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/omc/cli.rb', line 28

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

#status(stack) ⇒ Object



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

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

#unicorn(action, stack) ⇒ Object



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

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