class Pennyworth::VagrantRunner
Public Class Methods
new(box, vagrant_dir, username)
click to toggle source
# File lib/pennyworth/vagrant_runner.rb, line 20 def initialize(box, vagrant_dir, username) @box = box @username = username @vagrant = Vagrant.new(vagrant_dir) end
Public Instance Methods
cleanup_directory(_dir)
click to toggle source
# File lib/pennyworth/vagrant_runner.rb, line 40 def cleanup_directory(_dir) # The machine will be reset anyway after the tests, so this is is a NOP end
start()
click to toggle source
# File lib/pennyworth/vagrant_runner.rb, line 26 def start @vagrant.run "destroy", @box @vagrant.run "up", @box ip = @vagrant.ssh_config(@box)[@box]["HostName"] @command_runner = RemoteCommandRunner.new(ip, @username) ip end
stop()
click to toggle source
# File lib/pennyworth/vagrant_runner.rb, line 36 def stop @vagrant.run "halt", @box end