Class: VPS::CLI::Playbook::State::SSHMock

Inherits:
Object
  • Object
show all
Defined in:
lib/vps/cli/playbook/state.rb

Instance Method Summary collapse

Instance Method Details

#exec!(command) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/vps/cli/playbook/state.rb', line 8

def exec!(command)
  case command
  when "cat /etc/lsb-release"
    "    DISTRIB_ID=Ubuntu\n    DISTRIB_RELEASE=18.04\n    DISTRIB_CODENAME=bionic\n    DISTRIB_DESCRIPTION=\"Ubuntu 18.04.2 LTS\"\n    LSB\n  when \"pwd\"\n    \"/home/myapp\"\n  else\n    raise \"Encountered unexpected command: \#{command}\"\n  end\nend\n"