testbot 0.7.11 → 0.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG +4 -0
- data/README.markdown +1 -1
- data/lib/shared/ssh_tunnel.rb +6 -4
- data/lib/shared/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDliMDM2NjM2YTU3M2FmNjFhYjEwYWY0NWFlMTcwZmYzYjk2MjEyYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTNiNjJiOGI0MGNiMmM3YzcwYzcwYjdjZDZlMzdlM2IxNTY0Njg2MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDNlMzMwZGY5M2UwN2IyYjVjZDQ0Njc2NWNhNWY2MmI5MmRlMGE3NzFkZTlk
|
10
|
+
ZDFkNzQ1ZWNhYmY3NzJhYWYzN2NkYjQyOTI4NzVkM2M3OTc5ZDMyMzYyNjZj
|
11
|
+
MzgzODIyYjI4YzIyMWU3MDJiMzFiOTJlMzkwZTRkMmQ3NjEyZjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTAxOGJiZjg1MTZhMTE2OTU3YjMxMTI0MWMzOWYwYzNiOGIwODU4NTJmNDY2
|
14
|
+
MDQ2OWZjMWEyOGYxNWU4YTg3MDE0ZTAyYzc2YmQzNGE4YzJjZTZjYWIzM2M4
|
15
|
+
ZmYzZDY4OTEzMjhiMjBlYmE3NTdlZmJlMWVjNDljOTBiMDU2YzM=
|
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -67,7 +67,7 @@ Using testbot with Rails 2:
|
|
67
67
|
|
68
68
|
# Add testbot to your Gemfile if you use bundler. You also need the plugin because
|
69
69
|
# Rails 2 does not load raketasks from gems.
|
70
|
-
ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.7.
|
70
|
+
ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.7.12'
|
71
71
|
script/generate testbot --connect 192.168.0.100
|
72
72
|
|
73
73
|
rake testbot:spec (or :rspec, :test, :features)
|
data/lib/shared/ssh_tunnel.rb
CHANGED
@@ -2,8 +2,10 @@ require 'rubygems'
|
|
2
2
|
require 'net/ssh'
|
3
3
|
|
4
4
|
class SSHTunnel
|
5
|
-
#
|
6
|
-
|
5
|
+
# We want a small number so this fails quickly when unreachable. But not too small: a lower value caused false negatives on a poor connection.
|
6
|
+
# We want the inner timeout (the SSH connection) to trigger before the outer (loop), to avoid the situation where we make two connections in parallel.
|
7
|
+
INNER_TIMEOUT_SECONDS = 15
|
8
|
+
OUTER_TIMEOUT_SECONDS = INNER_TIMEOUT_SECONDS + 1
|
7
9
|
|
8
10
|
def initialize(host, user, local_port = 2288)
|
9
11
|
@host, @user, @local_port = host, user, local_port
|
@@ -17,7 +19,7 @@ class SSHTunnel
|
|
17
19
|
break if @up
|
18
20
|
sleep 0.5
|
19
21
|
|
20
|
-
if Time.now - start_time >
|
22
|
+
if Time.now - start_time > OUTER_TIMEOUT_SECONDS
|
21
23
|
puts "SSH connection failed, trying again... (#{@user}@#{@host})"
|
22
24
|
start_time = Time.now
|
23
25
|
connect
|
@@ -28,7 +30,7 @@ class SSHTunnel
|
|
28
30
|
def connect
|
29
31
|
@thread.kill if @thread
|
30
32
|
@thread = Thread.new do
|
31
|
-
Net::SSH.start(@host, @user, { :timeout =>
|
33
|
+
Net::SSH.start(@host, @user, { :timeout => INNER_TIMEOUT_SECONDS }) do |ssh|
|
32
34
|
ssh.forward.local(@local_port, 'localhost', Testbot::SERVER_PORT)
|
33
35
|
ssh.loop { @up = true }
|
34
36
|
end
|
data/lib/shared/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Testbot
|
2
2
|
# Don't forget to update readme and changelog
|
3
3
|
def self.version
|
4
|
-
version = "0.7.
|
4
|
+
version = "0.7.12"
|
5
5
|
dev_version_file = File.join(File.dirname(__FILE__), '..', '..', 'DEV_VERSION')
|
6
6
|
if File.exists?(dev_version_file)
|
7
7
|
version += File.read(dev_version_file)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joakim Kolsjö
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|