grover 1.2.9 → 1.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f53cae1260aa636889607929ff735fc876e1d439ad656f18a71dab32ef911a2
4
- data.tar.gz: e51808378914be56bf9c9d320633ec0db33db7646d83a7edb229c7517d36540a
3
+ metadata.gz: 6975e57956621f04557b7b9634611de621cfbca81f067dec8f0f302adb861cdc
4
+ data.tar.gz: 922fb8f8df08bbbe4870fa013e543ca332703bcf888308d894047689824a9ee5
5
5
  SHA512:
6
- metadata.gz: dde098900baf3045083d5e60fdf431438c9fe599d373a44d21102c3bc9c2a5370fd6a7dadb580d74fd559f5cafcf2239c5249bd9849c4f2057f410b9fc88ce7f
7
- data.tar.gz: b3a33f90d6658bde15d1bf9179f86fbb769d72c5c5ee3212f509aeda195def9233eb4a91ee4c17824d0646acd7e5d07907efa96374793ec23458ce4a60a1dffa
6
+ metadata.gz: fc2c71aa2cd450e562425f9f14df68c3e1fa4dfd3281a71a6d830a1acecf574c629d52c3d0b033414a6d1d9e675533f38d0300e2a97413845db2b354e559efb5
7
+ data.tar.gz: cc6ff7f47a9e34b7dc01d8a2a15c09482e90e7af414720eb05b64b1616829fddb10f738de696cac215cf8db5c079960cf55817ed5ff6ce8350b4762e141cb1de
@@ -34,7 +34,7 @@ function GroverError(name, errors) {
34
34
  GroverError.prototype = Error.prototype;
35
35
 
36
36
  const _processPage = (async (convertAction, uriOrHtml, options) => {
37
- let browser, page, tmpDir, wsConnection = false;
37
+ let browser, context, page, tmpDir, wsConnection = false;
38
38
  const requestErrors = [], pageErrors = [];
39
39
 
40
40
  const captureRequestError = (request) => {
@@ -114,7 +114,12 @@ const _processPage = (async (convertAction, uriOrHtml, options) => {
114
114
  browser = await puppeteer.launch(launchParams);
115
115
  }
116
116
 
117
- page = await browser.newPage();
117
+ if (wsConnection) {
118
+ context = await browser.createBrowserContext();
119
+ page = await context.newPage();
120
+ } else {
121
+ page = await browser.newPage();
122
+ }
118
123
 
119
124
  // Basic auth
120
125
  const username = options.username; delete options.username
@@ -349,7 +354,7 @@ const _processPage = (async (convertAction, uriOrHtml, options) => {
349
354
  } finally {
350
355
  if (browser) {
351
356
  if (wsConnection) {
352
- if (page) await page.close();
357
+ if (context) await context.close();
353
358
  await browser.disconnect();
354
359
  } else {
355
360
  await browser.close();
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Grover
4
- VERSION = '1.2.9'
4
+ VERSION = '1.2.10'
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-04-02 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: nokogiri
@@ -51,6 +52,7 @@ licenses:
51
52
  metadata:
52
53
  allowed_push_host: https://rubygems.org
53
54
  rubygems_mfa_required: 'true'
55
+ post_install_message:
54
56
  rdoc_options: []
55
57
  require_paths:
56
58
  - lib
@@ -68,7 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
70
  - !ruby/object:Gem::Version
69
71
  version: '0'
70
72
  requirements: []
71
- rubygems_version: 3.6.9
73
+ rubygems_version: 3.3.7
74
+ signing_key:
72
75
  specification_version: 4
73
76
  summary: A Ruby gem to transform HTML into PDF, PNG or JPEG by wrapping the NodeJS
74
77
  Google Puppeteer driver for Chromium