mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
some small fixups
This commit is contained in:
parent
1cf33ccc7a
commit
28c1d90d63
1 changed files with 11 additions and 5 deletions
|
@ -1,3 +1,5 @@
|
|||
require 'delegate'
|
||||
|
||||
module Fog
|
||||
module SSH
|
||||
|
||||
|
@ -42,7 +44,7 @@ module Fog
|
|||
|
||||
@address = address
|
||||
@username = username
|
||||
@debug = options.delete :debug
|
||||
@debug = options.delete :debug
|
||||
@options = { :paranoid => false }.merge(options)
|
||||
end
|
||||
|
||||
|
@ -92,13 +94,17 @@ module Fog
|
|||
|
||||
end
|
||||
|
||||
require 'delegate'
|
||||
|
||||
class DebugString < SimpleDelegator
|
||||
|
||||
def initialize(string='')
|
||||
super
|
||||
end
|
||||
|
||||
def <<(add_me)
|
||||
puts add_me
|
||||
super
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Result
|
||||
|
@ -120,8 +126,8 @@ module Fog
|
|||
|
||||
def initialize(command, debug=false)
|
||||
@command = command
|
||||
@stderr = debug ? DebugString.new('') : ''
|
||||
@stdout = debug ? DebugString.new('') : ''
|
||||
@stderr = debug ? DebugString.new : ''
|
||||
@stdout = debug ? DebugString.new : ''
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue