puppeteer-ruby 0.31.1 → 0.31.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/docs/api_coverage.md +1 -1
- data/lib/puppeteer/version.rb +1 -1
- data/lib/puppeteer/wait_task.rb +17 -22
- data/puppeteer-ruby.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c29d76a1dd9f52a59eecdb311ab8c110a3393bc1500aea3df7d5defdc469d4f
|
4
|
+
data.tar.gz: 296188c1573813718e0f3d320ceff5bbd8f036f8326f04499e6d81a77ca92051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25411b18a7d0279ebc736981cc47db542340d49c01429b8419e95e3f3d3c66ce633de11c8b645a0eb1643dc41adedb215522d0f2a06d173cd6140aeedb44156f
|
7
|
+
data.tar.gz: e1cc9c01f114534c4c44df4f036a9c9743b7330c1cfee710799381d9cdafe736d2c04498c673e3d79cd64671d4f270fcd37fc7cd0cbebf07d423736a5705851f
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
### master [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.31.
|
1
|
+
### master [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.31.3...master)]
|
2
2
|
|
3
3
|
* xxx
|
4
4
|
|
5
|
+
### 0.31.3 [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.31.1...0.31.3)]
|
6
|
+
|
7
|
+
Bugfix:
|
8
|
+
|
9
|
+
* Fix `wait_for_selector` to work. *It is strongly recommended to update for 0.29.0-0.31.x users.*
|
10
|
+
|
5
11
|
### 0.31.1 [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.31.0...0.31.1)]
|
6
12
|
|
7
13
|
Bugfix:
|
data/docs/api_coverage.md
CHANGED
data/lib/puppeteer/version.rb
CHANGED
data/lib/puppeteer/wait_task.rb
CHANGED
@@ -135,18 +135,17 @@ class Puppeteer::WaitTask
|
|
135
135
|
/**
|
136
136
|
* @return {!Promise<*>}
|
137
137
|
*/
|
138
|
-
function pollMutation() {
|
139
|
-
const success = predicate(...args);
|
140
|
-
if (success)
|
141
|
-
return Promise.resolve(success);
|
138
|
+
async function pollMutation() {
|
139
|
+
const success = await predicate(...args);
|
140
|
+
if (success) return Promise.resolve(success);
|
142
141
|
let fulfill;
|
143
142
|
const result = new Promise((x) => (fulfill = x));
|
144
|
-
const observer = new MutationObserver(() => {
|
143
|
+
const observer = new MutationObserver(async () => {
|
145
144
|
if (timedOut) {
|
146
145
|
observer.disconnect();
|
147
146
|
fulfill();
|
148
147
|
}
|
149
|
-
const success = predicate(...args);
|
148
|
+
const success = await predicate(...args);
|
150
149
|
if (success) {
|
151
150
|
observer.disconnect();
|
152
151
|
fulfill(success);
|
@@ -159,38 +158,34 @@ class Puppeteer::WaitTask
|
|
159
158
|
});
|
160
159
|
return result;
|
161
160
|
}
|
162
|
-
function pollRaf() {
|
161
|
+
async function pollRaf() {
|
163
162
|
let fulfill;
|
164
163
|
const result = new Promise((x) => (fulfill = x));
|
165
|
-
onRaf();
|
164
|
+
await onRaf();
|
166
165
|
return result;
|
167
|
-
function onRaf() {
|
166
|
+
async function onRaf() {
|
168
167
|
if (timedOut) {
|
169
168
|
fulfill();
|
170
169
|
return;
|
171
170
|
}
|
172
|
-
const success = predicate(...args);
|
173
|
-
if (success)
|
174
|
-
|
175
|
-
else
|
176
|
-
requestAnimationFrame(onRaf);
|
171
|
+
const success = await predicate(...args);
|
172
|
+
if (success) fulfill(success);
|
173
|
+
else requestAnimationFrame(onRaf);
|
177
174
|
}
|
178
175
|
}
|
179
|
-
function pollInterval(pollInterval) {
|
176
|
+
async function pollInterval(pollInterval) {
|
180
177
|
let fulfill;
|
181
178
|
const result = new Promise((x) => (fulfill = x));
|
182
|
-
onTimeout();
|
179
|
+
await onTimeout();
|
183
180
|
return result;
|
184
|
-
function onTimeout() {
|
181
|
+
async function onTimeout() {
|
185
182
|
if (timedOut) {
|
186
183
|
fulfill();
|
187
184
|
return;
|
188
185
|
}
|
189
|
-
const success = predicate(...args);
|
190
|
-
if (success)
|
191
|
-
|
192
|
-
else
|
193
|
-
setTimeout(onTimeout, pollInterval);
|
186
|
+
const success = await predicate(...args);
|
187
|
+
if (success) fulfill(success);
|
188
|
+
else setTimeout(onTimeout, pollInterval);
|
194
189
|
}
|
195
190
|
}
|
196
191
|
}
|
data/puppeteer-ruby.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'rake', '~> 13.0.3'
|
31
31
|
spec.add_development_dependency 'rspec', '~> 3.10.0 '
|
32
32
|
spec.add_development_dependency 'rspec_junit_formatter' # for CircleCI.
|
33
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
33
|
+
spec.add_development_dependency 'rubocop', '~> 1.12.0'
|
34
34
|
spec.add_development_dependency 'rubocop-rspec'
|
35
35
|
spec.add_development_dependency 'sinatra'
|
36
36
|
spec.add_development_dependency 'webrick'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppeteer-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.31.
|
4
|
+
version: 0.31.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.12.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.12.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubocop-rspec
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|