net-ssh 2.6.7 → 2.6.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ === 2.6.8 / 6 Jul 2013
3
+
4
+ * Added support for host wildcard substitution [GabKlein]
5
+ * Added a wait to the loop in close to help fix possible blocks [Josh Kalderimis]
6
+ * Fixed test file encoding issues with Ruby 2.0 (#87) [voxik]
7
+
8
+
2
9
  === 2.6.7 / 11 Apr 2013
3
10
 
4
11
  * Decreased default packet size to 32768 as described in RFC 4253 [Olipro]
data/README.rdoc CHANGED
@@ -1,5 +1,8 @@
1
1
  = Net::SSH 2.x
2
2
 
3
+ <em><b>Please note: this project is in maintenance mode. It is not under active development but pull requests are very much welcome. Just be sure to include tests! -- delano</b></em>
4
+
5
+
3
6
  * Docs: http://net-ssh.github.com/net-ssh
4
7
  * Issues: https://github.com/net-ssh/net-ssh/issues
5
8
  * Codes: https://github.com/net-ssh/net-ssh
@@ -94,7 +97,7 @@ Lastly, if you want to run the tests or use any of the Rake tasks, you'll need:
94
97
 
95
98
  NOTE: If you are running on jruby you need to install jruby-pageant manually (gemspec doesn't allow for platform specific dependencies).
96
99
 
97
- However, in order to be sure the code you're installing hasn't been tampered with, it's recommended that you verify the signiture[http://docs.rubygems.org/read/chapter/21]. To do this, you need to add my public key as a trusted certificate (you only need to do this once):
100
+ However, in order to be sure the code you're installing hasn't been tampered with, it's recommended that you verify the signature[http://docs.rubygems.org/read/chapter/21]. To do this, you need to add my public key as a trusted certificate (you only need to do this once):
98
101
 
99
102
  # Add the public key as a trusted certificate
100
103
  # (You only need to do this once)
@@ -153,7 +156,7 @@ which should produce the following:
153
156
 
154
157
  Run the test suite from the net-ssh directory with the following command:
155
158
 
156
- ruby -Ilib -Itest -rrubygems test/test_all.rb
159
+ bash -c 'unset HOME && ruby -Ilib -Itest -rrubygems test/test_all.rb'
157
160
 
158
161
  Run a single test file like this:
159
162
 
data/Rakefile CHANGED
@@ -34,8 +34,8 @@ begin
34
34
 
35
35
  s.license = "MIT"
36
36
 
37
- s.signing_key = File.join('/mnt/gem/', 'gem-private_key.pem')
38
- s.cert_chain = ['gem-public_cert.pem']
37
+ #s.signing_key = File.join('/mnt/gem/', 'gem-private_key.pem')
38
+ #s.cert_chain = ['gem-public_cert.pem']
39
39
  end
40
40
  Jeweler::GemcutterTasks.new
41
41
  rescue LoadError
data/lib/net/ssh.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # Make sure HOME is set, regardless of OS, so that File.expand_path works
2
2
  # as expected with tilde characters.
3
- ENV['HOME'] ||= ENV['HOMEPATH'] ? "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}" : "."
3
+ ENV['HOME'] ||= ENV['HOMEPATH'] ? "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}" : Dir.pwd
4
4
 
5
5
  require 'logger'
6
6
 
@@ -92,6 +92,7 @@ module Net; module SSH
92
92
  multi_host = value.to_s.split(/\s+/)
93
93
  matched_host = multi_host.select { |h| host =~ pattern2regex(h) }.first
94
94
  seen_host = true
95
+ settings[key] = host
95
96
  elsif !seen_host
96
97
  if key == 'identityfile'
97
98
  (globals[key] ||= []) << value
@@ -145,7 +146,7 @@ module Net; module SSH
145
146
  when 'hostkeyalias' then
146
147
  hash[:host_key_alias] = value
147
148
  when 'hostname' then
148
- hash[:host_name] = value
149
+ hash[:host_name] = value.gsub(/%h/, settings['host'])
149
150
  when 'identityfile' then
150
151
  hash[:keys] = value
151
152
  when 'macs' then
@@ -110,7 +110,7 @@ module Net; module SSH; module Connection
110
110
  def close
111
111
  info { "closing remaining channels (#{channels.length} open)" }
112
112
  channels.each { |id, channel| channel.close }
113
- loop { channels.any? }
113
+ loop(0.1) { channels.any? }
114
114
  transport.close
115
115
  end
116
116
 
@@ -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 = 7
54
+ TINY = 8
55
55
 
56
56
  # The current version of the Net::SSH library as a Version instance
57
57
  CURRENT = new(MAJOR, MINOR, TINY)
data/net-ssh.gemspec CHANGED
@@ -5,12 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "net-ssh"
8
- s.version = "2.6.7"
8
+ s.version = "2.6.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jamis Buck", "Delano Mandelbaum"]
12
- s.cert_chain = ["gem-public_cert.pem"]
13
- s.date = "2013-04-11"
12
+ s.date = "2013-07-06"
14
13
  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."
15
14
  s.email = "net-ssh@solutious.com"
16
15
  s.extra_rdoc_files = [
@@ -127,6 +126,7 @@ Gem::Specification.new do |s|
127
126
  "test/configs/multihost",
128
127
  "test/configs/nohost",
129
128
  "test/configs/numeric_host",
129
+ "test/configs/substitutes",
130
130
  "test/configs/wild_cards",
131
131
  "test/connection/test_channel.rb",
132
132
  "test/connection/test_session.rb",
@@ -170,7 +170,6 @@ Gem::Specification.new do |s|
170
170
  s.require_paths = ["lib"]
171
171
  s.rubyforge_project = "net-ssh"
172
172
  s.rubygems_version = "1.8.25"
173
- s.signing_key = "/mnt/gem/gem-private_key.pem"
174
173
  s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
175
174
 
176
175
  if s.respond_to? :specification_version then
@@ -0,0 +1,8 @@
1
+ Host test
2
+ HostName %h.sufix
3
+
4
+ Host 1234
5
+ HostName prefix.%h.sufix
6
+
7
+ Host *
8
+ HostName %h
data/test/test_buffer.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/buffer'
3
5
 
data/test/test_config.rb CHANGED
@@ -1,7 +1,12 @@
1
1
  require 'common'
2
2
  require 'net/ssh/config'
3
+ require 'pathname'
3
4
 
4
5
  class TestConfig < Test::Unit::TestCase
6
+ def test_home_should_be_absolute_path
7
+ assert Pathname.new(ENV['HOME']).absolute?
8
+ end
9
+
5
10
  def test_load_for_non_existant_file_should_return_empty_hash
6
11
  bogus_file = File.expand_path("/bogus/file")
7
12
  File.expects(:readable?).with(bogus_file).returns(false)
@@ -111,6 +116,24 @@ class TestConfig < Test::Unit::TestCase
111
116
  assert_equal '2G', config['rekeylimit']
112
117
  assert_equal 1980, config['port']
113
118
  end
119
+
120
+ def test_load_wildcar_with_substitutes
121
+ config = Net::SSH::Config.load(config(:substitutes), "toto")
122
+ net_ssh = Net::SSH::Config.translate(config)
123
+ assert_equal 'toto', net_ssh[:host_name]
124
+ end
125
+
126
+ def test_load_sufix_with_substitutes
127
+ config = Net::SSH::Config.load(config(:substitutes), "test")
128
+ net_ssh = Net::SSH::Config.translate(config)
129
+ assert_equal 'test.sufix', net_ssh[:host_name]
130
+ end
131
+
132
+ def test_load_prefix_and_sufix_with_substitutes
133
+ config = Net::SSH::Config.load(config(:substitutes), "1234")
134
+ net_ssh = Net::SSH::Config.translate(config)
135
+ assert_equal 'prefix.1234.sufix', net_ssh[:host_name]
136
+ end
114
137
 
115
138
  private
116
139
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/hmac/md5'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'transport/hmac/test_md5'
3
5
  require 'net/ssh/transport/hmac/md5_96'
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/hmac/ripemd160'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/hmac/sha1'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'transport/hmac/test_sha1'
3
5
  require 'net/ssh/transport/hmac/sha1_96'
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/hmac/sha2_256'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'transport/hmac/test_sha2_256'
3
5
  require 'net/ssh/transport/hmac/sha2_256_96'
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/hmac/sha2_512'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'transport/hmac/test_sha2_512'
3
5
  require 'net/ssh/transport/hmac/sha2_512_96'
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/cipher_factory'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/packet_stream'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: ASCII-8BIT
2
+
1
3
  require 'common'
2
4
  require 'net/ssh/transport/state'
3
5
 
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.7
4
+ version: 2.6.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,36 +9,8 @@ authors:
9
9
  - Delano Mandelbaum
10
10
  autorequire:
11
11
  bindir: bin
12
- cert_chain:
13
- - !binary |-
14
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUROakNDQWg2Z0F3SUJB
15
- Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREJCTVE4d0RRWURWUVFEREFaa1pX
16
- eGgKYm04eEdUQVhCZ29Ka2lhSmsvSXNaQ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- TnJhaUhZZ0YvOS9va3k3WloKUjlxMC90Sm5ldWhBZW5aZGlRa1g3b2k0TzN2
34
- OXdSUzZZSG9XQnhNUEZLVlJMTlR6dlZKc2JtZnBDQWxwNS81ZwpwczR3UUZ5
35
- NW1pYkVsR1ZsT29iZi9naHFaMjVIUzlKNmtkMC9DL3J5MEFVdFRvZ3NMN1R4
36
- R3dUNGtiQ3g2M3ViCjN2eXdFRWhzSlV6ZmQ5N0dDQUJtdFFmUlRsZFgvajdG
37
- MXovNXdkOHAraGZkb3gxaWliZHM5WnRmYVpBM0t6S24Ka2NoV045QjZ6Zzly
38
- MVhNUThCTTJKejBYb1BhblBlMzU0K2xXd2pwa1JLYkZvdy9aYlFIY0NMQ3Ey
39
- NCtONmI2ZwpkZ0tmTkR6d2lEcHFDQT09Ci0tLS0tRU5EIENFUlRJRklDQVRF
40
- LS0tLS0K
41
- date: 2013-04-11 00:00:00.000000000 Z
12
+ cert_chain: []
13
+ date: 2013-07-06 00:00:00.000000000 Z
42
14
  dependencies:
43
15
  - !ruby/object:Gem::Dependency
44
16
  name: test-unit
@@ -191,6 +163,7 @@ files:
191
163
  - test/configs/multihost
192
164
  - test/configs/nohost
193
165
  - test/configs/numeric_host
166
+ - test/configs/substitutes
194
167
  - test/configs/wild_cards
195
168
  - test/connection/test_channel.rb
196
169
  - test/connection/test_session.rb
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1,4 +0,0 @@
1
- ��Iϑrq�}g�)jr8��!�Ǧ3oO��������dϙO��J v�Γ,�ɉ��3���j���eL*�p �L}��� )���K�c�������
2
- �o)5��b��\Y:+j�߄?��Mu'����+�zZCHR-3Bs|��-�{�If6� �����E���Y!ZR��\C�<�Z)S@��+���
3
- V
4
- �:8ɦ�N� �ڴ��^�J�1'H<��i!Nh�p��ޡ5G�tL,�X{QgXGi�9�z���QU�K