Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #927 from freeformz/remove_ssh_debug

Revert "Add debug option to Fog::Compute::Server#ssh"
  • Loading branch information...
commit 0ed426b7144a1de156add3d0c5187e9ef52a6bb8 2 parents b0fc606 + 741bb1f
@freeformz freeformz authored
Showing with 4 additions and 18 deletions.
  1. +4 −18 lib/fog/core/ssh.rb
View
22 lib/fog/core/ssh.rb
@@ -48,7 +48,6 @@ def initialize(address, username, options)
@address = address
@username = username
- @debug = options.delete :debug
@options = { :paranoid => false }.merge(options)
end
@@ -58,7 +57,7 @@ def run(commands, &blk)
begin
Net::SSH.start(@address, @username, @options) do |ssh|
commands.each do |command|
- result = Result.new(command, @debug)
+ result = Result.new(command)
ssh.open_channel do |ssh_channel|
ssh_channel.request_pty
ssh_channel.exec(command) do |channel, success|
@@ -100,19 +99,6 @@ def run(commands, &blk)
end
- class DebugString < SimpleDelegator
-
- def initialize(string='')
- super
- end
-
- def <<(add_me)
- puts add_me
- super
- end
-
- end
-
class Result
attr_accessor :command, :stderr, :stdout, :status
@@ -130,10 +116,10 @@ def display_stderr
Formatador.display_line(stderr.split("\r\n"))
end
- def initialize(command, debug=false)
+ def initialize(command)
@command = command
- @stderr = debug ? DebugString.new : ''
- @stdout = debug ? DebugString.new : ''
+ @stderr = ''
+ @stdout = ''
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.