lib/rush/box.rb in rush-0.1 vs lib/rush/box.rb in rush-0.2
- old
+ new
@@ -47,9 +47,28 @@
connection.processes.map do |ps|
Rush::Process.new(ps, self)
end
end
+ # Execute a command in the standard unix shell. Until the day when it's no
+ # longer needed...
+ def bash(command)
+ connection.bash(command)
+ end
+
+ # Returns true if the box is responding to commands.
+ def alive?
+ connection.alive?
+ end
+
+ # This is called automatically the first time an action is invoked, but you
+ # may wish to call it manually ahead of time in order to have the tunnel
+ # already set up and running. You can also use this to pass a timeout option,
+ # either :timeout => (seconds) or :timeout => :infinite.
+ def establish_connection(options={})
+ connection.ensure_tunnel(options)
+ end
+
def connection # :nodoc:
@connection ||= make_connection
end
def make_connection # :nodoc: