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 +4 -4
- data/lib/grover/js/processor.cjs +13 -2
- data/lib/grover/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 605a1ddd3d51f652e03c28d8f6ab97b45e9f026884da2ea4772b57fc83287dd2
|
4
|
+
data.tar.gz: c4bc0069f551b4e15df0b59b42175b20bc3d8130fb2981b947b832e0f2e48e14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfdb35168bba8db20bc0ba7cf027d13ebb61670f2a89f059710129cdd3c7460f0b95f80a0cc7fbd2f334ca25348e733eccd1ce00bd380e6d65282e3018161572
|
7
|
+
data.tar.gz: '08cdc3c9c5ce2bf8c3d9c7d155db3cb558dd77e718008f7c8d5662188bf78071b611e3ad3aa2b3f32800b6595c492222c6f1a99768a2be983aa4e5e7f37b12f5'
|
data/lib/grover/js/processor.cjs
CHANGED
@@ -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
|
|
data/lib/grover/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|