net-ssh 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -90,6 +90,20 @@ Lastly, if you want to run the tests or use any of the Rake tasks, you'll need:
90
90
 
91
91
  NOTE: If you are running on jruby you need to install jruby-pageant manually (gemspec doesn't allow for platform specific dependencies).
92
92
 
93
+ == RUBY 1.8 SUPPORT
94
+
95
+ net-ssh supports Ruby 1.8.x up until the 2.5.1 release. Later releases will work but the test suite is no longer guaranteed to pass all tests.
96
+
97
+ == JRUBY 1.6
98
+
99
+ There is an issue with jruby-openssl that produces the following error in jruby 1.6:
100
+
101
+ <ArgumentError> wrong number of arguments (2 for 1)
102
+ /home/offers/tracking/shared/bundle/jruby/1.8/gems/net-ssh-2.6.0/lib/net/ssh/key_factory.rb:77:in `load_data_private_key'
103
+
104
+ You can downgrade jruby-openssl to version 0.7.4 (before they added the PKey.read method) to resolve it or upgrade jruby to 1.7. See issue #61 for more info: https://github.com/net-ssh/net-ssh/issues/61.
105
+
106
+
93
107
  == ARCFOUR SUPPORT:
94
108
 
95
109
  from Karl Varga:
@@ -190,8 +190,9 @@ module Net
190
190
  if auth.authenticate("ssh-connection", user, options[:password])
191
191
  connection = Connection::Session.new(transport, options)
192
192
  if block_given?
193
- yield connection
193
+ retval = yield connection
194
194
  connection.close
195
+ retval
195
196
  else
196
197
  return connection
197
198
  end
@@ -10,6 +10,7 @@ module Net; module SSH; module Test
10
10
  # channel = session.opens_channel
11
11
  # channel.sends_exec "ls"
12
12
  # channel.gets_data "result of ls"
13
+ # channel.gets_extended_data "some error coming from ls"
13
14
  # channel.gets_close
14
15
  # channel.sends_close
15
16
  # end
@@ -104,6 +105,14 @@ module Net; module SSH; module Test
104
105
  script.gets_channel_data(self, data)
105
106
  end
106
107
 
108
+ # Scripts the reception of a channel extended data packet from the remote
109
+ # end.
110
+ #
111
+ # channel.gets_extended_data "whoops"
112
+ def gets_extended_data(data)
113
+ script.gets_channel_extended_data(self, data)
114
+ end
115
+
107
116
  # Scripts the reception of an "exit-status" channel request packet.
108
117
  #
109
118
  # channel.gets_exit_status(127)
@@ -32,7 +32,7 @@ module Net; module SSH; module Test
32
32
  raise Net::SSH::Exception, "expected NEWKEYS" unless buffer.type == NEWKEYS
33
33
 
34
34
  { :session_id => "abc-xyz",
35
- :server_key => OpenSSL::PKey::RSA.new(32),
35
+ :server_key => OpenSSL::PKey::RSA.new(512),
36
36
  :shared_secret => OpenSSL::BN.new("1234567890", 10),
37
37
  :hashing_algorithm => OpenSSL::Digest::SHA1 }
38
38
  end
@@ -65,6 +65,7 @@ module Net; module SSH; module Test
65
65
  when CHANNEL_OPEN then [:string, :long, :long, :long]
66
66
  when CHANNEL_OPEN_CONFIRMATION then [:long, :long, :long, :long]
67
67
  when CHANNEL_DATA then [:long, :string]
68
+ when CHANNEL_EXTENDED_DATA then [:long, :long, :string]
68
69
  when CHANNEL_EOF, CHANNEL_CLOSE, CHANNEL_SUCCESS, CHANNEL_FAILURE then [:long]
69
70
  when CHANNEL_REQUEST
70
71
  parts = [:long, :string, :bool]
@@ -111,6 +111,15 @@ module Net; module SSH; module Test
111
111
  events << RemotePacket.new(:channel_data, channel.local_id, data)
112
112
  end
113
113
 
114
+ # Scripts the reception of a channel extended data packet from the remote
115
+ # host by the given Net::SSH::Test::Channel +channel+. This will typically
116
+ # be called via Net::SSH::Test::Channel#gets_extended_data.
117
+ #
118
+ # Currently the only extended data type is stderr == 1.
119
+ def gets_channel_extended_data(channel, data)
120
+ events << RemotePacket.new(:channel_extended_data, channel.local_id, 1, data)
121
+ end
122
+
114
123
  # Scripts the reception of a channel request packet from the remote host by
115
124
  # the given Net::SSH::Test::Channel +channel+. This will typically be
116
125
  # called via Net::SSH::Test::Channel#gets_exit_status.
@@ -51,7 +51,7 @@ module Net; module SSH
51
51
  MINOR = 6
52
52
 
53
53
  # The tiny component of this version of the Net::SSH library
54
- TINY = 1
54
+ TINY = 2
55
55
 
56
56
  # The current version of the Net::SSH library as a Version instance
57
57
  CURRENT = new(MAJOR, MINOR, TINY)
@@ -1,7 +1,7 @@
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.6.1"
4
+ s.version = "2.6.2"
5
5
  s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
6
6
  s.description = s.summary + " It allows you to write programs that invoke and interact with processes on remote servers, via SSH2."
7
7
  s.authors = ["Jamis Buck", "Delano Mandelbaum"]
@@ -13,11 +13,15 @@ Run a single test file like this:
13
13
 
14
14
  EXPECTED RESULTS
15
15
 
16
- * Ruby 1.8: all tests pass
17
-
18
16
  * Ruby 1.9: all tests pass
19
17
 
20
- * JRuby 1.5: 99% tests pass (448 tests, 1846 assertions, 1 failures)
18
+ * Ruby 1.8: all tests pass (up until version 2.5)
19
+
20
+ * JRuby 1.7: 98% test pass (510 tests, 1914 assertions, 2 failures, 9 errors)
21
+
22
+ * JRuby 1.6: 98% test pass (510 tests, 1914 assertions, 4 failures, 5 errors)
23
+
24
+ * JRuby 1.5: 98% tests pass (510 tests, 1914 assertions, 5 failures, 5 errors)
21
25
 
22
26
 
23
27
  PORT FORWARDING TESTS
@@ -1,3 +1,5 @@
1
+ $: << '.'
2
+
1
3
  # $ ruby -Ilib -Itest -rrubygems test/test_all.rb
2
4
  # $ ruby -Ilib -Itest -rrubygems test/transport/test_server_version.rb
3
5
  Dir.chdir(File.dirname(__FILE__)) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-18 00:00:00.000000000 Z
13
+ date: 2012-11-22 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: ! 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.
16
16
  It allows you to write programs that invoke and interact with processes on remote