diff options
author | Miklos Fazekas <mfazekas@szemafor.com> | 2018-03-21 16:09:10 +0100 |
---|---|---|
committer | Miklos Fazekas <mfazekas@szemafor.com> | 2018-03-21 16:09:18 +0100 |
commit | 069c2e5c1036445d924d3a00a17111322473765a (patch) | |
tree | defc9c72322b151ccdd9dafad7e24a19ef71405c /lib/net/ssh/proxy/command.rb | |
parent | 8f545802bbf05931dfcb46434a54c1fdfdfb7fb4 (diff) | |
download | net-ssh-069c2e5c1036445d924d3a00a17111322473765a.tar.gz |
Whitespace fixeswhitespace-fixes
Diffstat (limited to 'lib/net/ssh/proxy/command.rb')
-rw-r--r-- | lib/net/ssh/proxy/command.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/net/ssh/proxy/command.rb b/lib/net/ssh/proxy/command.rb index 0229ae7..02cf472 100644 --- a/lib/net/ssh/proxy/command.rb +++ b/lib/net/ssh/proxy/command.rb @@ -3,8 +3,8 @@ require 'rubygems' require 'net/ssh/proxy/errors' require 'net/ssh/ruby_compat' -module Net - module SSH +module Net + module SSH module Proxy # An implementation of a command proxy. To use it, instantiate it, @@ -20,13 +20,13 @@ module Net class Command # The command line template attr_reader :command_line_template - + # The command line for the session attr_reader :command_line - + # Timeout in seconds in open, defaults to 60 attr_accessor :timeout - + # Create a new socket factory that tunnels via a command executed # with the user's shell, which is composed from the given command # template. In the command template, `%h' will be substituted by @@ -36,7 +36,7 @@ module Net @command_line = nil @timeout = 60 end - + # Return a new socket connected to the given host and port via the # proxy that was requested when the socket factory was instantiated. def open(host, port, connection_options = nil) @@ -83,7 +83,7 @@ module Net def io.send(data, flag) syswrite(data) end - + def io.recv(size) sysread(size) end @@ -97,7 +97,7 @@ module Net end result end - + def io.recv(size) begin result = read_nonblock(size) @@ -113,11 +113,12 @@ module Net end io end - + def close_on_error(io) Process.kill('TERM', io.pid) Thread.new { io.close } end - end - -end; end; end + end + end + end +end |