postdoc 0.2.4 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/postdoc.rb +13 -3
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 529772412289f1fe24ffeedd9644f2f8799ee955c3dea07f256a33e23ca1bc51
|
4
|
+
data.tar.gz: 2b27cdf8389e6c096c1dc64f3005396542c7808e04449f79d81f1f62990b1f0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 948c6386bc64c6ee7d5d9423a905dfec09dbbc2a5ed80e8032817929f13e5b682ded267a4751aa3fe66cd5d38f83b66abf4ee0989f1b2a4bf2e3fb0bdc4ea9b4
|
7
|
+
data.tar.gz: ce0193c8374d7c6fb44f8196829531156b79b4684ace11d172224bc1bdcf87f089a82757344e00edad9d377d76e037d83215d482247ce30e0b115af496d9d75b
|
data/lib/postdoc.rb
CHANGED
@@ -18,9 +18,19 @@ module Postdoc
|
|
18
18
|
random_port = 1024 + Random.rand(65_535 - 1024)
|
19
19
|
pid = Process.spawn "chrome --remote-debugging-port=#{random_port} --headless"
|
20
20
|
end
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
|
22
|
+
success = false
|
23
|
+
10.times do
|
24
|
+
begin
|
25
|
+
TCPSocket.new('localhost', random_port)
|
26
|
+
success = true
|
27
|
+
break
|
28
|
+
rescue
|
29
|
+
end
|
30
|
+
sleep 1
|
31
|
+
end
|
32
|
+
|
33
|
+
return unless success
|
24
34
|
|
25
35
|
begin
|
26
36
|
chrome = options[:client].nil? ? ChromeRemote.client(port: random_port) : options[:client]
|
metadata
CHANGED
@@ -1,49 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Groeneveld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: chrome_remote
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6.1'
|
19
|
+
version: 0.2.0
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6.1'
|
26
|
+
version: 0.2.0
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
28
|
+
name: rails
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - ">="
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
33
|
+
version: 4.0.0
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '6.1'
|
40
37
|
type: :runtime
|
41
38
|
prerelease: false
|
42
39
|
version_requirements: !ruby/object:Gem::Requirement
|
43
40
|
requirements:
|
44
41
|
- - ">="
|
45
42
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
43
|
+
version: 4.0.0
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '6.1'
|
47
47
|
description: Description of Postdoc.
|
48
48
|
email:
|
49
49
|
- frank@ivaldi.nl
|