playwright-ruby-client 1.19.0 → 1.19.1

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: bfbbc528927aa551597f30f0abb057a13609726f473cfd6c625a97d135d0b705
4
- data.tar.gz: f3f8dda3439bfaa0d3a8796ee8ed6eb453ae9934e9bf0b1768a8a0c9a62d5e4f
3
+ metadata.gz: 68d737d7d01fd92889e417be20bca72ee6247258d07dc8b18f44a1b07967a2c1
4
+ data.tar.gz: 18522777dc4ef3e19a9be4a17710cfdef404fc441dcf2a5a28b82138175dfebd
5
5
  SHA512:
6
- metadata.gz: 14e62113089e96e77fd11dabdda86582ac5c4004465a4007396b71a954927396e1a77c5abf2c10199e43b41b119a5879bbdf491400ec8de5d9f1bd2b3da19ef8
7
- data.tar.gz: 6ee4b4854cf14ba4cd1cad9dd4c847cea5dea58c892298e15daecce174754b35beccfaff8386f9c97ca103d500aeea476f82c232fa88291741d075685d2fc789
6
+ metadata.gz: bf0887d285eabec5cf17b380d99e566f1b1399e089614adf23d99a38f0975e5f1b9fb6eb8891d67857b21945b5ad00772202caf337aeac53439407f20f5386f9
7
+ data.tar.gz: 95553f620063bbd52ded34d1f260a920fd82ba127868f1c85c43ac0b466ed9e93a1fce5d6319805e8f13ade1f3ad3c0aa03795be4387b3354664e26c2c1f4e00
@@ -46,7 +46,8 @@ module Playwright
46
46
  #
47
47
  # @note This method blocks until playwright-cli exited. Consider using Thread or Future.
48
48
  def async_run
49
- @stdin, @stdout, @stderr, @thread = Open3.popen3("#{@driver_executable_path} run-driver", { pgroup: true })
49
+ popen3_args = {}
50
+ @stdin, @stdout, @stderr, @thread = run_driver_with_open3
50
51
  @stdin.binmode # Ensure Strings are written 1:1 without encoding conversion, necessary for integer values
51
52
 
52
53
  Thread.new { handle_stdout }
@@ -55,6 +56,18 @@ module Playwright
55
56
 
56
57
  private
57
58
 
59
+ def run_driver_with_open3
60
+ Open3.popen3("#{@driver_executable_path} run-driver", { pgroup: true })
61
+ rescue ArgumentError => err
62
+ # Windows doesn't accept pgroup parameter.
63
+ # ArgumentError: wrong exec option symbol: pgroup
64
+ if err.message =~ /pgroup/
65
+ Open3.popen3("#{@driver_executable_path} run-driver")
66
+ else
67
+ raise
68
+ end
69
+ end
70
+
58
71
  def handle_stdout(packet_size: 32_768)
59
72
  while chunk = @stdout.read(4)
60
73
  length = chunk.unpack1('V') # unsigned 32bit, little endian
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.19.0'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.19.0'
4
+ VERSION = '1.19.1'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.19.2'
6
6
  end
@@ -87,13 +87,13 @@ module Playwright
87
87
  end
88
88
 
89
89
  # @nodoc
90
- def electron
91
- wrap_impl(@impl.electron)
90
+ def android
91
+ wrap_impl(@impl.android)
92
92
  end
93
93
 
94
94
  # @nodoc
95
- def android
96
- wrap_impl(@impl.android)
95
+ def electron
96
+ wrap_impl(@impl.electron)
97
97
  end
98
98
 
99
99
  # -- inherited from EventEmitter --
@@ -44,13 +44,13 @@ module Playwright
44
44
  end
45
45
 
46
46
  # @nodoc
47
- def context=(req)
48
- wrap_impl(@impl.context=(unwrap_impl(req)))
47
+ def page=(req)
48
+ wrap_impl(@impl.page=(unwrap_impl(req)))
49
49
  end
50
50
 
51
51
  # @nodoc
52
- def page=(req)
53
- wrap_impl(@impl.page=(unwrap_impl(req)))
52
+ def context=(req)
53
+ wrap_impl(@impl.context=(unwrap_impl(req)))
54
54
  end
55
55
 
56
56
  # -- inherited from EventEmitter --
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playwright-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-23 00:00:00.000000000 Z
11
+ date: 2022-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -396,5 +396,5 @@ requirements: []
396
396
  rubygems_version: 3.3.7
397
397
  signing_key:
398
398
  specification_version: 4
399
- summary: The Ruby binding of playwright driver 1.19.0
399
+ summary: The Ruby binding of playwright driver 1.19.2
400
400
  test_files: []