postdoc 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/postdoc/chrome_process.rb +2 -1
- data/lib/postdoc/client.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6a52e2638a2925d5834959e3a716295aaf5a66e8be797452c507b72f4fa7e0a
|
4
|
+
data.tar.gz: cca67e571e577b9ac1b770a4b9049b66953beab03ab13d6046d90684af0daf91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ccb76057f1cf0112dc9150fba8de4b9aef0261ed0f229a15af3030a4e4b10bb80fb8929dddf40aa16af10bf0133778da3cb7d5ed99f81a93b73267cb4e3b21
|
7
|
+
data.tar.gz: 7e5b5c6eca2c4020b4e8c27078aed985bcfb4e1b4f0e4bd0c3a7f8585e094069a8eb723619045f1fe2971c9cc9d3c4bff92205b6225dacdfc9e1849f10dee3be
|
data/lib/postdoc/client.rb
CHANGED
@@ -9,6 +9,7 @@ module Postdoc
|
|
9
9
|
def initialize(port)
|
10
10
|
@port = port
|
11
11
|
100.times { setup_connection_or_wait && break }
|
12
|
+
raise 'ChromeClient couldn\'t launch' if @client.blank?
|
12
13
|
end
|
13
14
|
|
14
15
|
def print_pdf_from_html(file_path,
|
@@ -25,6 +26,8 @@ module Postdoc
|
|
25
26
|
printBackground: true,
|
26
27
|
marginTop: options[:margin_top] || 1,
|
27
28
|
marginBottom: options[:margin_bottom] || 1,
|
29
|
+
marginLeft: options[:margin_left] || 1,
|
30
|
+
marginRight: options[:margin_right] || 1,
|
28
31
|
displayHeaderFooter: !!(header_template || footer_template),
|
29
32
|
headerTemplate: header_template || '',
|
30
33
|
footerTemplate: footer_template || ''
|
@@ -38,7 +41,7 @@ module Postdoc
|
|
38
41
|
def setup_connection_or_wait
|
39
42
|
@client = ChromeRemote.client(port: @port)
|
40
43
|
true
|
41
|
-
rescue
|
44
|
+
rescue Errno::ECONNREFUSED
|
42
45
|
sleep(0.1)
|
43
46
|
false
|
44
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Groeneveld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chrome_remote
|