grover 1.0.4 → 1.0.5

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: 49f70f988f01666e9141fc0ad9584468d3efb06e6a82042460b3d403b94966e3
4
- data.tar.gz: 3a87cb41b36398d56f48930da0df266cc87435d85aa41c520de0759175793131
3
+ metadata.gz: c3d4e3648c63a1906a953202433b88805bd2d602d2d96d871debd4d251fc415e
4
+ data.tar.gz: 7756206771af66e2483c97933601bf74aa57bd2ac3cf8c2e2031c9c4cc0cc0fb
5
5
  SHA512:
6
- metadata.gz: a24f664083b90c1e5666c6800a7b8ed8fce43c27c91763c1f2c5ffac797d8c29c77fe37489186ea1567ef0667da88d85d8519fefea31b2bd4ae583af4832d1cb
7
- data.tar.gz: 9a90bd6c19b5f09e1a90b9b998df5a7446e87915abe326e94ae4e75ddefa5bd592460dbad406e25dbc2c6714899ea77122ceea938cc294e46f447fcbc64cafa0
6
+ metadata.gz: 398afda3dd93724ef5699f1b2304eecee81ec5e1c1cbc2ca03ff5562c8506d2bb660848995c153ff652ad29b798a2156334d1963e3aa7e0a61a07df0d2860f48
7
+ data.tar.gz: 9c6d8a6641c6a0c3a193abd34b50f28086b9aecb78c661c186566c684543a0c8c4cce23c96b093739d44598d41db1613b483c8bc19f74a36cffefb140e01420a
@@ -91,7 +91,7 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
91
91
  // Emulate the media features, if specified
92
92
  const mediaFeatures = options.mediaFeatures; delete options.mediaFeatures;
93
93
  if (Array.isArray(mediaFeatures)) {
94
- page.emulateMediaFeatures(mediaFeatures);
94
+ await page.emulateMediaFeatures(mediaFeatures);
95
95
  }
96
96
 
97
97
  // Emulate timezone (if provided)
@@ -100,28 +100,22 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
100
100
  await page.emulateTimezone(timezone);
101
101
  }
102
102
 
103
- // Emulate vision deficiency (if provided)
104
- const visionDeficiency = options.visionDeficiency; delete options.visionDeficiency;
105
- if (visionDeficiency !== undefined) {
106
- page.emulateVisionDeficiency(type);
107
- }
108
-
109
103
  // Bypass CSP (content security policy), if provided
110
104
  const bypassCSP = options.bypassCSP; delete options.bypassCSP;
111
105
  if (bypassCSP !== undefined) {
112
- page.setBypassCSP(bypassCSP);
106
+ await page.setBypassCSP(bypassCSP);
113
107
  }
114
108
 
115
109
  // Add extra HTTP headers (if provided)
116
110
  const extraHTTPHeaders = options.extraHTTPHeaders; delete options.extraHTTPHeaders;
117
111
  if (extraHTTPHeaders !== undefined) {
118
- page.setExtraHTTPHeaders(extraHTTPHeaders);
112
+ await page.setExtraHTTPHeaders(extraHTTPHeaders);
119
113
  }
120
114
 
121
115
  // Set geolocation (if provided)
122
116
  const geolocation = options.geolocation; delete options.geolocation;
123
117
  if (geolocation !== undefined) {
124
- page.setGeolocation(geolocation);
118
+ await page.setGeolocation(geolocation);
125
119
  }
126
120
 
127
121
  const raiseOnRequestFailure = options.raiseOnRequestFailure; delete options.raiseOnRequestFailure;
@@ -201,6 +195,12 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
201
195
  await page.waitForTimeout(waitForTimeout);
202
196
  }
203
197
 
198
+ // Emulate vision deficiency (if provided)
199
+ const visionDeficiency = options.visionDeficiency; delete options.visionDeficiency;
200
+ if (visionDeficiency !== undefined) {
201
+ await page.emulateVisionDeficiency(visionDeficiency);
202
+ }
203
+
204
204
  // If specified, focus on the specified selector
205
205
  const focusSelector = options.focus; delete options.focus;
206
206
  if (focusSelector !== undefined) {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Grover
4
- VERSION = '1.0.4'
4
+ VERSION = '1.0.5'
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.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-27 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: combine_pdf