grover 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grover/version.rb +1 -1
- data/lib/grover.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31b9ab92a300720d35d5637e2a2462ec6e7dd733
|
4
|
+
data.tar.gz: b1cbe61e0db5eb406ed7991881c0702c14a059e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ade3e9c3f35ea52efc2292a842645e7e3c7f46030bf1142c7cfddafa69588bf3ea13bcfcf469130c281c5c4050d01c3348e1c002a28cbb740f87586e61b9b51
|
7
|
+
data.tar.gz: 4ec082e7a6cd7bce6e8d3dcf429ca86dc1b82a16d56f9fcb21f7b63b5f850e8e3033509da317c0833625d05ad9aa1da8524d730fd21ffc06e06895abf254f8f5
|
data/lib/grover/version.rb
CHANGED
data/lib/grover.rb
CHANGED
@@ -21,14 +21,19 @@ class Grover
|
|
21
21
|
dependencies puppeteer: 'puppeteer'
|
22
22
|
|
23
23
|
def self.launch_params
|
24
|
-
ENV['CI'] == 'true' ? "{args: ['--no-sandbox', '--disable-setuid-sandbox']}" : ''
|
24
|
+
ENV['CI'] == 'true' ? "{args: ['--no-sandbox', '--disable-setuid-sandbox']}" : '{}'
|
25
25
|
end
|
26
26
|
|
27
27
|
method :convert_pdf, Utils.squish(<<-FUNCTION)
|
28
28
|
async (url, options) => {
|
29
29
|
let browser;
|
30
30
|
try {
|
31
|
-
|
31
|
+
let launch_params = #{launch_params};
|
32
|
+
const timeout = options.timeout; delete options.timeout;
|
33
|
+
if (timeout) {
|
34
|
+
launch_params.timeout = timeout;
|
35
|
+
}
|
36
|
+
browser = await puppeteer.launch(launch_params);
|
32
37
|
const page = await browser.newPage();
|
33
38
|
|
34
39
|
const cache = options.cache; delete options.cache;
|