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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23be6a01f9d60e6aaa3e1c224a855b7424f40db5
4
- data.tar.gz: 0f7e8fdeb229de987444e8e4756c8a3e09349202
3
+ metadata.gz: 31b9ab92a300720d35d5637e2a2462ec6e7dd733
4
+ data.tar.gz: b1cbe61e0db5eb406ed7991881c0702c14a059e4
5
5
  SHA512:
6
- metadata.gz: 59a8240257511c3fb8afc32b6cf2842f99fd7454b48ad700c4fbc355bb81bc85db40ddb45765653d38df018a94997f1e7b7b35e213b4ca4ccf21d31ca960640e
7
- data.tar.gz: 88a776f44751fc3ff49503acb98f08582d0519a472fbe36ea255aff97fce81b590302a47834a4811dc92bdc798c023c060b5e86e0eb8358db376d1198d8704ee
6
+ metadata.gz: 9ade3e9c3f35ea52efc2292a842645e7e3c7f46030bf1142c7cfddafa69588bf3ea13bcfcf469130c281c5c4050d01c3348e1c002a28cbb740f87586e61b9b51
7
+ data.tar.gz: 4ec082e7a6cd7bce6e8d3dcf429ca86dc1b82a16d56f9fcb21f7b63b5f850e8e3033509da317c0833625d05ad9aa1da8524d730fd21ffc06e06895abf254f8f5
@@ -1,3 +1,3 @@
1
1
  class Grover
2
- VERSION = '0.5.2'.freeze
2
+ VERSION = '0.5.3'.freeze
3
3
  end
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
- browser = await puppeteer.launch(#{launch_params});
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;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich