webdriver-firefox 0.0.10 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/webdriver-firefox/port_pool.rb +11 -2
- data/lib/webdriver-firefox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTQwZWI4NGE4ZjA5YzM4ODMwNzU1N2YxYjZkOWI2OTg5NTM5ZWEyMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjhjODZhMzEzZTBmMTY3Y2VlY2EwNDhlNjFhOGMwMzFkODg2NzY0Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzNkMDkzNWRiYzdmNDRjZWU5NTJkMWZhMDZmMmIyN2U0YTY0NmNhNGYyMjJi
|
10
|
+
Zjc2M2IyYWUxYWJiYWY0OTIzN2RiMTE2NTc1YTJlOTZjYTg2NjYyMmJmYWQ3
|
11
|
+
Y2U2NWZmNzkzNjgzODAzNDAyMDhkZjJlOTVlYzUzOGJmNmYzYzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWQ1NzM0MGQxOGI1N2MwY2FkYTE5M2ZhNmFmMGUyZjFiOTQ0MjhlZGFhN2E1
|
14
|
+
ODdiY2UwNWQxMmRhZTY2Mjg4YTEyZDAzOGQ0MjZlZTVhMjQ1NzQ1OTI0ZWE2
|
15
|
+
MGYxNTI1MWI2NjMzNWZlNDI0Yzk1MjUyM2Y3YmVkYWVlMWE0NmQ=
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# Copyright (c) 2013 Solano Labs All Rights Reserved
|
2
2
|
|
3
|
+
require 'rand'
|
3
4
|
require 'socket'
|
4
5
|
|
5
6
|
module NoLockFirefox
|
@@ -8,7 +9,11 @@ module NoLockFirefox
|
|
8
9
|
START_PORT = 24576
|
9
10
|
|
10
11
|
def initialize
|
11
|
-
|
12
|
+
begin
|
13
|
+
@random = ::Random.new
|
14
|
+
rescue
|
15
|
+
@random = nil
|
16
|
+
end
|
12
17
|
end
|
13
18
|
|
14
19
|
def find_free_port
|
@@ -17,7 +22,11 @@ module NoLockFirefox
|
|
17
22
|
tid = ENV.fetch('TDDIUM_TID', 0).to_i
|
18
23
|
|
19
24
|
range = 256*tid
|
20
|
-
|
25
|
+
if @random then
|
26
|
+
index = @random.rand(256)
|
27
|
+
else
|
28
|
+
index = rand(256)
|
29
|
+
end
|
21
30
|
limit = START_PORT+256*(tid+1)
|
22
31
|
|
23
32
|
timeout = Time.now+90
|