net-ssh 2.9.2 → 2.9.3.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aac9757449c9d417f334f8a5c44b9b69105c4c9b
4
- data.tar.gz: eda8ba20fad936162084101482eb1f1c821b67a3
3
+ metadata.gz: ec0f0d0b39f574411bd29862e5a2daa9a1b3dc91
4
+ data.tar.gz: a168942e250f47b0667d7d565f140feb9583b9dd
5
5
  SHA512:
6
- metadata.gz: fc1b60e3b51388d6b66fc38b7d4aaba56ead796820c2374a0aad1b48de094c2fb382db4159425d404f66612d8e61f0a1436b16dd90873235fcacca9b64bf3da5
7
- data.tar.gz: f5dce76345e1774539a47d70c4f516e52164171d38da7569fd2f0489f34cc8599d0914115ad2108d89ca12cf667fa36a062a188508d3d136692075421d4e0307
6
+ metadata.gz: c1232cbcb52c0f9fbc4d3d2d8e340f9d3a64bde61cf4f579faaa189e815280cc986ee28d55ecb1d019623a6597310eda24fb88e74382e85b986a6a6390bdb645
7
+ data.tar.gz: d88ec6f463ada1697a50f1f71e1de20f537d17edf873f76d06034031a5b72ef8520a714ce18af7127e0c89596f81becb8662e0624399a10d7cde0cce87cdae6b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,10 +1,18 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.9.3"
4
- - "2.0.0"
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - 2.2.0
7
+ - jruby-head
8
+ - jruby-19mode
9
+ - 1.8.7
5
10
 
6
-
7
- install: gem install jeweler test-unit mocha
11
+ install: gem install test-unit mocha
8
12
 
9
13
  script: rake test
10
14
 
15
+ matrix:
16
+ allow_failures:
17
+ - rvm: jruby-head
18
+ - rvm: 1.8.7
@@ -1,3 +1,10 @@
1
+ === 2.9.4-beta1
2
+
3
+ * Use sysread and syswrite on Windows instead of read_nonblock and write [marc-etienne]
4
+ * Windows/peagant: use fiddle on ruby 2.2+/windows [Charlie Savage]
5
+ * Check if ssh key is a file [kiela]
6
+
7
+ === 2.9.3
1
8
  === 2.9.2-rc3
2
9
 
3
10
  * Remove advertised algorithms that were not working (curve25519-sha256@libssh.org) [mfazekas]
data/Rakefile CHANGED
@@ -8,6 +8,7 @@
8
8
  require "rubygems"
9
9
  require "rake"
10
10
  require "rake/clean"
11
+ if RUBY_VERSION >= '1.9.0'
11
12
  require "rdoc/task"
12
13
 
13
14
  task :default => ["build"]
@@ -55,11 +56,6 @@ rescue LoadError
55
56
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
56
57
  end
57
58
 
58
- require 'rake/testtask'
59
- Rake::TestTask.new do |t|
60
- t.libs = ["lib", "test"]
61
- end
62
-
63
59
  extra_files = %w[LICENSE.txt THANKS.txt CHANGES.txt ]
64
60
  RDoc::Task.new do |rdoc|
65
61
  rdoc.rdoc_dir = "rdoc"
@@ -73,3 +69,12 @@ RDoc::Task.new do |rdoc|
73
69
  rdoc.rdoc_files.include(file) if File.exists?(file)
74
70
  }
75
71
  end
72
+ end
73
+
74
+ require 'rake/testtask'
75
+ Rake::TestTask.new do |t|
76
+ t.libs = ["lib", "test"]
77
+ if RUBY_VERSION < '1.9.0'
78
+ t.ruby_opts << '-rubygems'
79
+ end
80
+ end
@@ -188,14 +188,18 @@ module Net
188
188
  def prepare_identities_from_files
189
189
  key_files.map do |file|
190
190
  public_key_file = file + ".pub"
191
- if File.readable?(public_key_file)
192
- { :load_from => :pubkey_file, :file => file }
193
- elsif File.readable?(file)
191
+ if readable_file?(public_key_file)
192
+ { :load_from => :pubkey_file, :file => public_key_file }
193
+ elsif readable_file?(file)
194
194
  { :load_from => :privkey_file, :file => file }
195
195
  end
196
196
  end.compact
197
197
  end
198
198
 
199
+ def readable_file?(path)
200
+ File.file?(path) && File.readable?(path)
201
+ end
202
+
199
203
  # Prepared identities from user key_data, preserving their order and sources.
200
204
  def prepare_identities_from_data
201
205
  key_data.map do |data|
@@ -209,7 +213,7 @@ module Net
209
213
  begin
210
214
  case identity[:load_from]
211
215
  when :pubkey_file
212
- key = KeyFactory.load_public_key(identity[:file] + ".pub")
216
+ key = KeyFactory.load_public_key(identity[:file])
213
217
  { :public_key => key, :from => :file, :file => identity[:file] }
214
218
  when :privkey_file
215
219
  private_key = KeyFactory.load_private_key(identity[:file], options[:passphrase], ask_passphrase)
@@ -1,10 +1,20 @@
1
- require 'dl/import'
2
-
3
1
  if RUBY_VERSION < "1.9"
2
+ require 'dl/import'
4
3
  require 'dl/struct'
5
- else
4
+ elsif RUBY_VERSION < "2.2"
5
+ require 'dl/import'
6
6
  require 'dl/types'
7
7
  require 'dl'
8
+ else
9
+ require 'fiddle'
10
+ require 'fiddle/types'
11
+ require 'fiddle/import'
12
+
13
+ # For now map DL to Fiddler versus updating all the code below
14
+ module DL
15
+ CPtr = Fiddle::Pointer
16
+ RUBY_FREE = Fiddle::RUBY_FREE
17
+ end
8
18
  end
9
19
 
10
20
  require 'net/ssh/errors'
@@ -36,12 +46,17 @@ module Net; module SSH; module Authentication
36
46
  dlload 'advapi32'
37
47
 
38
48
  SIZEOF_DWORD = DL.sizeof('L')
39
- else
49
+ elsif RUBY_VERSION < "2.2"
40
50
  extend DL::Importer
41
51
  dlload 'user32','kernel32', 'advapi32'
42
52
  include DL::Win32Types
43
53
 
44
54
  SIZEOF_DWORD = DL::SIZEOF_LONG
55
+ else
56
+ extend Fiddle::Importer
57
+ dlload 'user32','kernel32', 'advapi32'
58
+ include Fiddle::Win32Types
59
+ SIZEOF_DWORD = Fiddle::SIZEOF_LONG
45
60
  end
46
61
 
47
62
  typealias("LPCTSTR", "char *") # From winnt.h
@@ -1,4 +1,5 @@
1
1
  require 'socket'
2
+ require 'rubygems'
2
3
  require 'net/ssh/proxy/errors'
3
4
  require 'net/ssh/ruby_compat'
4
5
 
@@ -67,12 +68,24 @@ module Net; module SSH; module Proxy
67
68
  end
68
69
  @command_line = command_line
69
70
  class << io
70
- def send(data, flag)
71
- write_nonblock(data)
72
- end
71
+ if Gem.win_platform?
72
+ # read_nonblock and write_nonblock are not available on Windows
73
+ # pipe. Use sysread and syswrite as a replacement works.
74
+ def send(data, flag)
75
+ syswrite(data)
76
+ end
73
77
 
74
- def recv(size)
75
- read_nonblock(size)
78
+ def recv(size)
79
+ sysread(size)
80
+ end
81
+ else
82
+ def send(data, flag)
83
+ write_nonblock(data)
84
+ end
85
+
86
+ def recv(size)
87
+ read_nonblock(size)
88
+ end
76
89
  end
77
90
  end
78
91
  io
@@ -76,7 +76,6 @@ module Net; module SSH; module Transport
76
76
  cipher.padding = 0
77
77
 
78
78
  cipher.extend(Net::SSH::Transport::CTR) if (name =~ /-ctr(@openssh.org)?$/)
79
-
80
79
  cipher.iv = Net::SSH::Transport::KeyExpander.expand_key(cipher.iv_len, options[:iv], options) if ossl_name != "rc4"
81
80
 
82
81
  key_len = KEY_LEN_OVERRIDE[name] || cipher.key_len
@@ -63,14 +63,15 @@ module Net; module SSH; module Transport
63
63
  @options = options
64
64
 
65
65
  debug { "establishing connection to #{@host}:#{@port}" }
66
- factory = options[:proxy] || TCPSocket
67
- @socket = timeout(options[:timeout] || 0) {
68
- case
69
- when options[:proxy] then factory.open(@host, @port, options)
70
- when @bind_address.nil? then factory.open(@host, @port)
71
- else factory.open(@host, @port, @bind_address)
66
+
67
+ @socket = timeout(options[:timeout] || 0) do
68
+ if (factory = options[:proxy])
69
+ factory.open(@host, @port, options)
70
+ else
71
+ TCPSocket.open(@host, @port, @bind_address)
72
72
  end
73
- }
73
+ end
74
+
74
75
  @socket.extend(PacketStream)
75
76
  @socket.logger = @logger
76
77
 
@@ -51,11 +51,11 @@ module Net; module SSH
51
51
  MINOR = 9
52
52
 
53
53
  # The tiny component of this version of the Net::SSH library
54
- TINY = 2
54
+ TINY = 3
55
55
 
56
56
  # The prerelease component of this version of the Net::SSH library
57
57
  # nil allowed
58
- PRE = nil
58
+ PRE = 'beta1'
59
59
 
60
60
  # The current version of the Net::SSH library as a Version instance
61
61
  CURRENT = new(*[MAJOR, MINOR, TINY, PRE].compact)
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: net-ssh 2.9.2 ruby lib
5
+ # stub: net-ssh 2.9.3.beta1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "net-ssh"
9
- s.version = "2.9.2"
9
+ s.version = "2.9.3.beta1"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Jamis Buck", "Delano Mandelbaum", "Mikl\u{f3}s Fazekas"]
14
14
  s.cert_chain = ["net-ssh-public_cert.pem"]
15
- s.date = "2015-01-09"
15
+ s.date = "2015-01-27"
16
16
  s.description = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2."
17
17
  s.email = "net-ssh@solutious.com"
18
18
  s.extra_rdoc_files = [
@@ -156,7 +156,9 @@ module Authentication
156
156
 
157
157
  def stub_file_private_key(name, key, options = {})
158
158
  manager.add(name)
159
+ File.stubs(:file?).with(name).returns(true)
159
160
  File.stubs(:readable?).with(name).returns(true)
161
+ File.stubs(:file?).with(name + ".pub").returns(true)
160
162
  File.stubs(:readable?).with(name + ".pub").returns(false)
161
163
 
162
164
  case options.fetch(:passphrase, :indifferently)
@@ -179,7 +181,9 @@ module Authentication
179
181
 
180
182
  def stub_file_public_key(name, key)
181
183
  manager.add(name)
184
+ File.stubs(:file?).with(name).returns(true)
182
185
  File.stubs(:readable?).with(name).returns(false)
186
+ File.stubs(:file?).with(name + ".pub").returns(true)
183
187
  File.stubs(:readable?).with(name + ".pub").returns(true)
184
188
 
185
189
  Net::SSH::KeyFactory.expects(:load_public_key).with(name + ".pub").returns(key).at_least_once
@@ -315,7 +315,7 @@ module Transport
315
315
  def session(options={})
316
316
  @session ||= begin
317
317
  host = options.delete(:host) || "net.ssh.test"
318
- TCPSocket.stubs(:open).with(host, options[:port] || 22).returns(socket)
318
+ TCPSocket.stubs(:open).with(host, options[:port] || 22, nil).returns(socket)
319
319
  Net::SSH::Transport::ServerVersion.stubs(:new).returns(server_version)
320
320
  Net::SSH::Transport::Algorithms.stubs(:new).returns(algorithms)
321
321
 
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.9.2
4
+ version: 2.9.3.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -31,7 +31,7 @@ cert_chain:
31
31
  MbvRpzgROzyfw1qYi4dnIyMwTtXFFcZ0a2jpxHPkcTYFK6TzvFgDLAP0Y/u9jqUQ
32
32
  eZ7/3CdSi/isZHEw
33
33
  -----END CERTIFICATE-----
34
- date: 2015-01-09 00:00:00.000000000 Z
34
+ date: 2015-01-27 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: test-unit
@@ -243,9 +243,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
- - - '>='
246
+ - - '>'
247
247
  - !ruby/object:Gem::Version
248
- version: '0'
248
+ version: 1.3.1
249
249
  requirements: []
250
250
  rubyforge_project: net-ssh
251
251
  rubygems_version: 2.2.2
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- �,�|�';��C�YYy1�|S��Z����{�/�x/�؂�&o�9B<ߘ�8��;@s3��w$���Rn���uԃ���ï7AW��X�6��6d��T�Ǿ�=�.�]����×
1
+ �����"e�k�<�wж�.)ì-0oeb�;S�k~'}M��mR��Q�|��*��,ލC�A�D�ߪ�~��k@�t��Y�O����9qa�}� �6-!�y�8���)2�g���]��D���\ ��-(��F���!^���:�=���Q����A�;g�J�f00��co��l/Pi��<�DQ��u�ѡ�ze���?��zb���jU�ъ�i虃6�݇R��,��g����cҔ�n�ζ/n���u���{���Ʒ