grover 1.1.3 → 1.1.4

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
  SHA256:
3
- metadata.gz: f7082a7b6e05f0898404a1df133ed2f2cf3d0bb71ab0098b6707b9a29aa76e65
4
- data.tar.gz: 2e458d1604e99fb8b0529982986cbffd45513fa4bf632e046ada76ae5bc30a51
3
+ metadata.gz: 605a1ddd3d51f652e03c28d8f6ab97b45e9f026884da2ea4772b57fc83287dd2
4
+ data.tar.gz: c4bc0069f551b4e15df0b59b42175b20bc3d8130fb2981b947b832e0f2e48e14
5
5
  SHA512:
6
- metadata.gz: 438cd6b10944fc008017fa4fd48d6e5e7919916a8d61a34cf1d7fbbaf5471215ab40b13c3a446665fa2d6bea1788532a1e0a198c776256ee9ddb444501934948
7
- data.tar.gz: 76c38b2c307f7cdd41a2b8e67b854539e1ef2e34a6fda814cab64cfee911331dab7e8bfe3b468e165a2510ee679e244cf9ac8457a9fdaaef7886c3ab6ddc7256
6
+ metadata.gz: cfdb35168bba8db20bc0ba7cf027d13ebb61670f2a89f059710129cdd3c7460f0b95f80a0cc7fbd2f334ca25348e733eccd1ce00bd380e6d65282e3018161572
7
+ data.tar.gz: '08cdc3c9c5ce2bf8c3d9c7d155db3cb558dd77e718008f7c8d5662188bf78071b611e3ad3aa2b3f32800b6595c492222c6f1a99768a2be983aa4e5e7f37b12f5'
@@ -10,11 +10,18 @@ try {
10
10
  }
11
11
  process.stdout.write("[\"ok\"]\n");
12
12
 
13
+ const fs = require('fs');
14
+ const os = require('os');
15
+ const path = require('path');
16
+
13
17
  const _processPage = (async (convertAction, urlOrHtml, options) => {
14
- let browser, errors = [];
18
+ let browser, errors = [], tmpDir;
15
19
  try {
20
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'grover-'));
21
+
16
22
  const launchParams = {
17
- args: process.env.GROVER_NO_SANDBOX === 'true' ? ['--no-sandbox', '--disable-setuid-sandbox'] : []
23
+ args: process.env.GROVER_NO_SANDBOX === 'true' ? ['--no-sandbox', '--disable-setuid-sandbox'] : [],
24
+ userDataDir: tmpDir
18
25
  };
19
26
 
20
27
  // Configure puppeteer debugging options
@@ -245,6 +252,10 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
245
252
  if (browser) {
246
253
  await browser.close();
247
254
  }
255
+
256
+ try {
257
+ if (tmpDir) fs.rmSync(tmpDir, { recursive: true });
258
+ } catch { }
248
259
  }
249
260
  });
250
261
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Grover
4
- VERSION = '1.1.3'
4
+ VERSION = '1.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-20 00:00:00.000000000 Z
11
+ date: 2023-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: combine_pdf
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.4.1
218
+ rubygems_version: 3.4.4
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: A Ruby gem to transform HTML into PDF, PNG or JPEG by wrapping the NodeJS