net-ssh-net-ssh 2.0.13 → 2.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +7 -0
- data/lib/net/ssh/buffered_io.rb +3 -2
- data/lib/net/ssh/connection/session.rb +2 -1
- data/lib/net/ssh/ruby_compat.rb +29 -1
- data/lib/net/ssh/transport/hmac/abstract.rb +1 -0
- data/lib/net/ssh/transport/packet_stream.rb +7 -5
- data/lib/net/ssh/version.rb +1 -1
- data/net-ssh.gemspec +2 -2
- metadata +4 -2
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
|
2
2
|
|
3
|
+
=== 2.0.14 / 28 Aug 2009
|
4
|
+
|
5
|
+
* Fix for IO#select threading bug in Ruby 1.8 (LH-1) [Daniel Azuma]
|
6
|
+
|
7
|
+
* Fix for "uninitialized constant OpenSSL::Digest::MD5" exception in Net::SFTP [DL Redden]
|
8
|
+
|
9
|
+
|
3
10
|
=== 2.0.13 / 17 Aug 2009
|
4
11
|
|
5
12
|
* Added fix for hanging in ServerVersion#negotiate! when using SOCKS5 proxy (GH-9) [Gerald Talton]
|
data/lib/net/ssh/buffered_io.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'net/ssh/buffer'
|
2
2
|
require 'net/ssh/loggable'
|
3
|
+
require 'net/ssh/ruby_compat'
|
3
4
|
|
4
5
|
module Net; module SSH
|
5
6
|
|
@@ -109,7 +110,7 @@ module Net; module SSH
|
|
109
110
|
def wait_for_pending_sends
|
110
111
|
send_pending
|
111
112
|
while output.length > 0
|
112
|
-
result =
|
113
|
+
result = Net::SSH::Compat.io_select(nil, [self]) or next
|
113
114
|
next unless result[1].any?
|
114
115
|
send_pending
|
115
116
|
end
|
@@ -146,4 +147,4 @@ module Net; module SSH
|
|
146
147
|
end
|
147
148
|
end
|
148
149
|
|
149
|
-
end; end
|
150
|
+
end; end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'net/ssh/loggable'
|
2
|
+
require 'net/ssh/ruby_compat'
|
2
3
|
require 'net/ssh/connection/channel'
|
3
4
|
require 'net/ssh/connection/constants'
|
4
5
|
require 'net/ssh/service/forward'
|
@@ -197,7 +198,7 @@ module Net; module SSH; module Connection
|
|
197
198
|
|
198
199
|
r = listeners.keys
|
199
200
|
w = r.select { |w2| w2.respond_to?(:pending_write?) && w2.pending_write? }
|
200
|
-
readers, writers, =
|
201
|
+
readers, writers, = Net::SSH::Compat.io_select(r, w, nil, wait)
|
201
202
|
|
202
203
|
postprocess(readers, writers)
|
203
204
|
end
|
data/lib/net/ssh/ruby_compat.rb
CHANGED
@@ -1,7 +1,35 @@
|
|
1
|
+
require 'thread'
|
2
|
+
|
1
3
|
class String
|
2
4
|
if RUBY_VERSION < "1.9"
|
3
5
|
def getbyte(index)
|
4
6
|
self[index]
|
5
7
|
end
|
6
8
|
end
|
7
|
-
end
|
9
|
+
end
|
10
|
+
|
11
|
+
module Net; module SSH
|
12
|
+
|
13
|
+
# This class contains miscellaneous patches and workarounds
|
14
|
+
# for different ruby implementations.
|
15
|
+
class Compat
|
16
|
+
|
17
|
+
# A workaround for an IO#select threading bug in MRI 1.8.
|
18
|
+
# See: http://net-ssh.lighthouseapp.com/projects/36253/tickets/1-ioselect-threading-bug-in-ruby-18
|
19
|
+
# Also: http://redmine.ruby-lang.org/issues/show/1993
|
20
|
+
if RUBY_VERSION >= '1.9' || RUBY_PLATFORM == 'java'
|
21
|
+
def self.io_select(*params)
|
22
|
+
IO.select(*params)
|
23
|
+
end
|
24
|
+
else
|
25
|
+
SELECT_MUTEX = Mutex.new
|
26
|
+
def self.io_select(*params)
|
27
|
+
SELECT_MUTEX.synchronize do
|
28
|
+
IO.select(*params)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end; end
|
@@ -1,10 +1,12 @@
|
|
1
1
|
require 'net/ssh/buffered_io'
|
2
2
|
require 'net/ssh/errors'
|
3
3
|
require 'net/ssh/packet'
|
4
|
+
require 'net/ssh/ruby_compat'
|
4
5
|
require 'net/ssh/transport/cipher_factory'
|
5
6
|
require 'net/ssh/transport/hmac'
|
6
7
|
require 'net/ssh/transport/state'
|
7
8
|
|
9
|
+
|
8
10
|
module Net; module SSH; module Transport
|
9
11
|
|
10
12
|
# A module that builds additional functionality onto the Net::SSH::BufferedIo
|
@@ -62,13 +64,13 @@ module Net; module SSH; module Transport
|
|
62
64
|
Socket.getnameinfo(addr, Socket::NI_NUMERICHOST | Socket::NI_NUMERICSERV).first
|
63
65
|
end
|
64
66
|
end
|
65
|
-
|
67
|
+
|
66
68
|
# Returns true if the IO is available for reading, and false otherwise.
|
67
69
|
def available_for_read?
|
68
|
-
result =
|
70
|
+
result = Net::SSH::Compat.io_select([self], nil, nil, 0)
|
69
71
|
result && result.first.any?
|
70
72
|
end
|
71
|
-
|
73
|
+
|
72
74
|
# Returns the next full packet. If the mode parameter is :nonblock (the
|
73
75
|
# default), then this will return immediately, whether a packet is
|
74
76
|
# available or not, and will return nil if there is no packet ready to be
|
@@ -86,7 +88,7 @@ module Net; module SSH; module Transport
|
|
86
88
|
return packet if packet
|
87
89
|
|
88
90
|
loop do
|
89
|
-
result =
|
91
|
+
result = Net::SSH::Compat.io_select([self]) or next
|
90
92
|
break if result.first.any?
|
91
93
|
end
|
92
94
|
|
@@ -227,4 +229,4 @@ module Net; module SSH; module Transport
|
|
227
229
|
end
|
228
230
|
end
|
229
231
|
|
230
|
-
end; end; end
|
232
|
+
end; end; end
|
data/lib/net/ssh/version.rb
CHANGED
data/net-ssh.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
@spec = Gem::Specification.new do |s|
|
2
2
|
s.name = "net-ssh"
|
3
3
|
s.rubyforge_project = 'net-ssh'
|
4
|
-
s.version = "2.0.
|
4
|
+
s.version = "2.0.14"
|
5
5
|
s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
|
6
6
|
s.description = s.summary
|
7
7
|
s.authors = ["Jamis Buck", "Delano Mandelbaum"]
|
8
|
-
s.email = "net-ssh@solutious.com"
|
8
|
+
s.email = ["net-ssh@solutious.com", "net-ssh@solutious.com"]
|
9
9
|
s.homepage = "http://rubyforge.org/projects/net-ssh/"
|
10
10
|
|
11
11
|
s.extra_rdoc_files = %w[README.rdoc THANKS.rdoc CHANGELOG.rdoc]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ssh-net-ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -15,7 +15,9 @@ default_executable:
|
|
15
15
|
dependencies: []
|
16
16
|
|
17
17
|
description: "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
|
18
|
-
email:
|
18
|
+
email:
|
19
|
+
- net-ssh@solutious.com
|
20
|
+
- net-ssh@solutious.com
|
19
21
|
executables: []
|
20
22
|
|
21
23
|
extensions: []
|