rest_connection 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -75,15 +75,7 @@ module SshHax
75
75
  retry_count = 0
76
76
  while (!success && retry_count < SSH_RETRY_COUNT) do
77
77
  begin
78
- # Test for ability to connect; Net::SSH.start sometimes hangs under certain server-side sshd configs
79
- test_ssh = ""
80
- [5, 15, 60].each { |timeout_max|
81
- test_ssh = `ssh -o \"BatchMode=yes\" -o \"StrictHostKeyChecking=no\" -o \"ConnectTimeout #{timeout_max}\" rightscale@#{host_dns} -C \"exit\" 2>&1`.chomp
82
- break if test_ssh =~ /permission denied/i or test_ssh.empty?
83
- }
84
- raise test_ssh unless test_ssh =~ /permission denied/i or test_ssh.empty?
85
-
86
- Net::SSH.start(host_dns, 'rightscale', :keys => ssh_key_config(ssh_key), :user_known_hosts_file => "/dev/null") do |ssh|
78
+ Net::SSH.start(host_dns, 'rightscale', :keys => ssh_key_config(ssh_key), :timeout => 60, :user_known_hosts_file => "/dev/null") do |ssh|
87
79
  cmd_channel = ssh.open_channel do |ch1|
88
80
  ch1.on_request('exit-status') do |ch, data|
89
81
  status = data.read_long
@@ -1,4 +1,4 @@
1
1
  # This gem is versioned with the usual X.Y.Z notation
2
2
  module RestConnection
3
- VERSION = '1.0.7'
3
+ VERSION = '1.0.8'
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_connection
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 7
10
- version: 1.0.7
9
+ - 8
10
+ version: 1.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - RightScale, Inc.
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-05-21 00:00:00 Z
18
+ date: 2013-05-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement