playwright-runner 1.2.0 → 1.3.0
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 +4 -4
- data/.github/workflows/main.yml +2 -3
- data/Gemfile +2 -1
- data/lib/playwrightrunner/version.rb +1 -1
- data/lib/playwrightrunner.rb +6 -5
- data/playwright-runner.gemspec +1 -2
- metadata +5 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a399a87fd16e38291470284d5301ac9f90eeece484c6f5f7cc6800885a343ccf
|
4
|
+
data.tar.gz: 15b75986e430acf686ac37865c81d2d36380bbdde99d6e7adddc27216c09cdfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31d4186bb3dbe50865400a4be597663d4611085d6b0ce395de8dec2ad097ecafd24495fba3b9fe03ebd190ccc3f46c37b6f078a87ac00fd49f71b45e2a4367ea
|
7
|
+
data.tar.gz: 928a70639b0d77cbc36b8c59ec6a68a205eb6e70259e8c337cebb68d739d19ac5d8e5b72df06c7a69645bc7f0aa55bfa2dc33fc5b37525d2e04e273407ffabbf
|
data/.github/workflows/main.yml
CHANGED
@@ -6,13 +6,12 @@ jobs:
|
|
6
6
|
build:
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
steps:
|
9
|
-
- uses: actions/checkout@
|
9
|
+
- uses: actions/checkout@v5
|
10
10
|
- name: Set up Ruby
|
11
11
|
uses: ruby/setup-ruby@v1
|
12
12
|
with:
|
13
|
-
ruby-version:
|
13
|
+
ruby-version: 3.4
|
14
14
|
- name: Run the default task
|
15
15
|
run: |
|
16
|
-
gem install bundler -v 2.2.5
|
17
16
|
bundle install
|
18
17
|
bundle exec rake
|
data/Gemfile
CHANGED
data/lib/playwrightrunner.rb
CHANGED
@@ -20,15 +20,15 @@ module PlaywrightRunner
|
|
20
20
|
config
|
21
21
|
end
|
22
22
|
|
23
|
-
def mermaids_to_images(passed_config, src: '.', dest: '.', type: 'pdf')
|
23
|
+
def mermaids_to_images(passed_config, src: '.', dest: '.', type: 'pdf', timeout: 10_000)
|
24
24
|
config = default_config(passed_config)
|
25
25
|
Playwright.create(playwright_cli_executable_path: config[:playwright_path]) do |playwright|
|
26
|
-
playwright.chromium.launch(headless: true) do |browser|
|
26
|
+
playwright.chromium.launch(headless: true, timeout: timeout) do |browser|
|
27
27
|
page = browser.new_page
|
28
28
|
Dir.glob(File.join(src, '*.html')).each do |entry|
|
29
29
|
id = File.basename(entry).sub('.html', '')
|
30
|
-
page.goto("file:///#{File.absolute_path(entry)}")
|
31
|
-
page.locator('svg').wait_for(state: 'visible')
|
30
|
+
page.goto("file:///#{File.absolute_path(entry)}", timeout: timeout)
|
31
|
+
page.locator('svg').wait_for(state: 'visible', timeout: timeout)
|
32
32
|
sleep(1)
|
33
33
|
1.upto(4) do
|
34
34
|
bounds = page.locator('svg').bounding_box
|
@@ -46,7 +46,8 @@ module PlaywrightRunner
|
|
46
46
|
page.set_viewport_size({ width: x + width, height: y + height })
|
47
47
|
|
48
48
|
if type == 'png'
|
49
|
-
page.screenshot(path: File.join(dest, "#{id}.png"), clip: { x: x, y: y, width: width, height: height }
|
49
|
+
page.screenshot(path: File.join(dest, "#{id}.png"), clip: { x: x, y: y, width: width, height: height },
|
50
|
+
timeout: timeout)
|
50
51
|
break
|
51
52
|
end
|
52
53
|
|
data/playwright-runner.gemspec
CHANGED
@@ -16,7 +16,6 @@ Gem::Specification.new do |spec|
|
|
16
16
|
|
17
17
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
18
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
19
|
-
spec.metadata['source_code_uri'] = 'https://github.com/kmuto/playwright-runner'
|
20
19
|
spec.metadata['changelog_uri'] = 'https://github.com/kmuto/playwright-runner/commits/main'
|
21
20
|
|
22
21
|
# Specify which files should be added to the gem when it is released.
|
@@ -28,5 +27,5 @@ Gem::Specification.new do |spec|
|
|
28
27
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
29
28
|
spec.require_paths = ['lib']
|
30
29
|
|
31
|
-
spec.add_dependency 'playwright-ruby-client', '~> 1.
|
30
|
+
spec.add_dependency 'playwright-ruby-client', '~> 1.28'
|
32
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playwright-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenshi Muto
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: playwright-ruby-client
|
@@ -16,14 +15,14 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
18
|
+
version: '1.28'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
25
|
+
version: '1.28'
|
27
26
|
description: Provide useful methods to run Playwright, intended to be used with Re:VIEW
|
28
27
|
email:
|
29
28
|
- kmuto@kmuto.jp
|
@@ -50,9 +49,7 @@ licenses:
|
|
50
49
|
metadata:
|
51
50
|
rubygems_mfa_required: 'true'
|
52
51
|
homepage_uri: https://github.com/kmuto/playwright-runner
|
53
|
-
source_code_uri: https://github.com/kmuto/playwright-runner
|
54
52
|
changelog_uri: https://github.com/kmuto/playwright-runner/commits/main
|
55
|
-
post_install_message:
|
56
53
|
rdoc_options: []
|
57
54
|
require_paths:
|
58
55
|
- lib
|
@@ -67,8 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
64
|
- !ruby/object:Gem::Version
|
68
65
|
version: '0'
|
69
66
|
requirements: []
|
70
|
-
rubygems_version: 3.
|
71
|
-
signing_key:
|
67
|
+
rubygems_version: 3.6.7
|
72
68
|
specification_version: 4
|
73
69
|
summary: Playwright Runner
|
74
70
|
test_files: []
|