Dhalang 0.6.5 → 0.6.6

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: 35f7dcd3cc7787c9e13429033b9c177d6f5c82f0b94364a2d4efbe3ffe601a16
4
- data.tar.gz: b204fe4df6c7b3e0da1e7d59407a711a9bd1d9f41c7828b05eccc478499e2b0b
3
+ metadata.gz: 580f62daf557818f3de686d07fc10f3fa07705025ea562e9e29130a7d0387660
4
+ data.tar.gz: e237333306eac8cfc4c5a9fd0d1cd6d59a1f99dcee0a632cc71e0e5ae4b44b8a
5
5
  SHA512:
6
- metadata.gz: 25c582e213b4b26851e59859ab24115f136ea02b4b2889eb99502a9b3d3ddc7688f667ffe656d4f79afb81a65dda0b81a2e482a8d310890a1baf5c11fd17dbc0
7
- data.tar.gz: 3cd5d4ece1b4e8f87a59abeb781ae241e8b7a515665f6b5c57cc636ccb767a98ebc7a7be71f7746f379bf71d083aba33eb7003c524e9efa1d652d77a940b2656
6
+ metadata.gz: 8054c0e43bd1ff71d6072ccf2cc4f3c98cf2a0a5f073c5e4b8cd75c2fc00c63cca60ab505d461533fae147e4da4b6786109ab0f00e70eaa4cfca520c19f1874e
7
+ data.tar.gz: 7e5a64263595fec4f5e3c47a13f4a68507b94ee8f3b79e1fa2c4445b13e756deeb374944f1d406f65c2fae6e1ccf76de20a5a8b0f7ce5b8691592265f1523fa2
@@ -0,0 +1,20 @@
1
+ name: Build
2
+ on:
3
+ - push
4
+ - pull_request
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - uses: ruby/setup-ruby@v1
11
+ with:
12
+ ruby-version: 3.1.3
13
+ bundler-cache: true
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: 18
17
+ cache: 'npm'
18
+ cache-dependency-path: '**/package-lock.json'
19
+ - run: npm ci
20
+ - run: bundle exec rake spec
@@ -0,0 +1,23 @@
1
+ name: Publish
2
+ on:
3
+ release:
4
+ types:
5
+ - published
6
+ jobs:
7
+ publish:
8
+ runs-on: ubuntu-latest
9
+ env:
10
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: 3.1.3
16
+ bundler-cache: true
17
+ - uses: actions/setup-node@v4
18
+ with:
19
+ node-version: 18
20
+ - run: npm ci
21
+ - run: bundle exec rake spec
22
+ - run: gem build -o Dhalang.gem Dhalang.gemspec
23
+ - run: gem push Dhalang.gem
data/.gitignore CHANGED
@@ -50,3 +50,4 @@ build-iPhoneSimulator/
50
50
 
51
51
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
52
52
  .rvmrc
53
+ .npmrc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Dhalang (0.6.4)
4
+ Dhalang (0.6.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -35,7 +35,10 @@ GEM
35
35
  ttfunk (1.7.0)
36
36
 
37
37
  PLATFORMS
38
+ arm64-darwin-21
39
+ x86-mingw32
38
40
  x86_64-darwin-20
41
+ x86_64-linux
39
42
 
40
43
  DEPENDENCIES
41
44
  Dhalang!
@@ -46,4 +49,4 @@ DEPENDENCIES
46
49
  rspec (~> 3.0)
47
50
 
48
51
  BUNDLED WITH
49
- 2.3.15
52
+ 2.3.6
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Dhalang [![Build Status](https://travis-ci.com/NielsSteensma/Dhalang.svg?token=XZgKAByw2KZjcrsCh8gW&branch=master)](https://travis-ci.com/NielsSteensma/Dhalang)
1
+ # Dhalang [![Build](https://github.com/NielsSteensma/Dhalang/actions/workflows/build.yml/badge.svg)](https://github.com/NielsSteensma/Dhalang/actions/workflows/build.yml)
2
2
 
3
3
  > Dhalang is a Ruby wrapper for Google's Puppeteer.
4
4
 
@@ -24,7 +24,7 @@ Install puppeteer in your application's root directory:
24
24
 
25
25
  $ npm install puppeteer
26
26
 
27
- <sub>NodeJS v10.18.1 or greater is required</sub>
27
+ <sub>Dhalang and Puppeteer require Node ≥ 18 and Puppeteer 22</sub>
28
28
  ## Usage
29
29
  __Get a PDF of a website url__
30
30
  ```ruby
@@ -1,3 +1,3 @@
1
1
  module Dhalang
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
data/lib/js/dhalang.js CHANGED
@@ -96,7 +96,7 @@ exports.navigate = async function (page, configuration) {
96
96
  } else if (navigationWaitForXPath !== "") {
97
97
  await page.waitForXPath(navigationWaitForXPath, this.getWaitingParameters(configuration));
98
98
  } else {
99
- await page.waitForTimeout(250);
99
+ await new Promise(r => setTimeout(r, 250));
100
100
  }
101
101
  }
102
102