Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/net/ssh/multi/pending_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def remote(port, host, remote_port, remote_host="127.0.0.1")

def replay_on(session)
forward = session.forward
@recordings.each {|args| forward.send *args}
@recordings.each { |args| forward.send(*args) }
end
end

Expand Down
1 change: 1 addition & 0 deletions lib/net/ssh/multi/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def initialize(master, host, options={})

@gateway = @options.delete(:via)
@failed = false
@session = @ready_session = nil
end

# Returns the value of the server property with the given +key+. Server
Expand Down
4 changes: 2 additions & 2 deletions lib/net/ssh/multi/session_actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def open_channel(type="session", *extra, &on_confirm)
# end
def exec(command, &block)
open_channel do |channel|
channel.exec(command) do |ch, success|
raise "could not execute command: #{command.inspect} (#{ch[:host]})" unless success
channel.exec(command) do |c, success|
raise "could not execute command: #{command.inspect} (#{c[:host]})" unless success

channel.on_data do |ch, data|
if block
Expand Down
2 changes: 1 addition & 1 deletion test/channel_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class ChannelTest < Minitest::Test
def test_each_should_iterate_over_each_component_channel
channels = [c1 = mock('channel'), c2 = mock('channel'), c3 = mock('channel')]
channels = [mock('channel'), mock('channel'), mock('channel')]
channel = Net::SSH::Multi::Channel.new(mock('session'), channels)
result = []
channel.each { |c| result << c }
Expand Down
2 changes: 1 addition & 1 deletion test/session_actions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_exec_with_block_should_pass_data_and_extended_data_to_block
c.expects(:on_extended_data).yields(c, 1, "stderr")
c.expects(:on_request)
results = {}
@session.exec("something") do |c, stream, data|
@session.exec("something") do |_, stream, data|
results[stream] = data
end
assert_equal({:stdout => "stdout", :stderr => "stderr"}, results)
Expand Down