venetian 0.1.0-aarch64-linux
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 +7 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/Rakefile +14 -0
- data/exe/aarch64-linux/LICENSE +2946 -0
- data/exe/aarch64-linux/node +0 -0
- data/exe/aarch64-linux/package/LICENSE +202 -0
- data/exe/aarch64-linux/package/NOTICE +5 -0
- data/exe/aarch64-linux/package/README.md +3 -0
- data/exe/aarch64-linux/package/ThirdPartyNotices.txt +13 -0
- data/exe/aarch64-linux/package/api.json +1 -0
- data/exe/aarch64-linux/package/bin/install_media_pack.ps1 +5 -0
- data/exe/aarch64-linux/package/bin/install_webkit_wsl.ps1 +33 -0
- data/exe/aarch64-linux/package/bin/reinstall_chrome_beta_linux.sh +42 -0
- data/exe/aarch64-linux/package/bin/reinstall_chrome_beta_mac.sh +13 -0
- data/exe/aarch64-linux/package/bin/reinstall_chrome_beta_win.ps1 +24 -0
- data/exe/aarch64-linux/package/bin/reinstall_chrome_stable_linux.sh +42 -0
- data/exe/aarch64-linux/package/bin/reinstall_chrome_stable_mac.sh +12 -0
- data/exe/aarch64-linux/package/bin/reinstall_chrome_stable_win.ps1 +24 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_beta_linux.sh +48 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_beta_mac.sh +11 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_beta_win.ps1 +23 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_dev_linux.sh +48 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_dev_mac.sh +11 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_dev_win.ps1 +23 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_stable_linux.sh +48 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_stable_mac.sh +11 -0
- data/exe/aarch64-linux/package/bin/reinstall_msedge_stable_win.ps1 +24 -0
- data/exe/aarch64-linux/package/browsers.json +81 -0
- data/exe/aarch64-linux/package/cli.js +21 -0
- data/exe/aarch64-linux/package/index.d.ts +17 -0
- data/exe/aarch64-linux/package/index.js +32 -0
- data/exe/aarch64-linux/package/index.mjs +28 -0
- data/exe/aarch64-linux/package/lib/bootstrap.js +77 -0
- data/exe/aarch64-linux/package/lib/coreBundle.js +69799 -0
- data/exe/aarch64-linux/package/lib/entry/cliDaemon.js +5 -0
- data/exe/aarch64-linux/package/lib/entry/dashboardApp.js +3 -0
- data/exe/aarch64-linux/package/lib/entry/mcp.js +10 -0
- data/exe/aarch64-linux/package/lib/entry/oopBrowserDownload.js +3 -0
- data/exe/aarch64-linux/package/lib/package.js +50 -0
- data/exe/aarch64-linux/package/lib/server/chromium/appIcon.png +0 -0
- data/exe/aarch64-linux/package/lib/server/deviceDescriptorsSource.json +1779 -0
- data/exe/aarch64-linux/package/lib/server/electron/loader.js +115 -0
- data/exe/aarch64-linux/package/lib/serverRegistry.js +7343 -0
- data/exe/aarch64-linux/package/lib/serverRegistry.js.LICENSE +354 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/channelSessions.js +141 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/cli.js +6 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/help.json +679 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/minimist.js +128 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/output.js +343 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/program.js +380 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/registry.js +176 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/session.js +265 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/SKILL.md +388 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/running-code.md +241 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/session-management.md +225 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/spec-driven-testing.md +305 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/storage-state.md +275 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/test-generation.md +134 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/tracing.md +139 -0
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/video-recording.md +143 -0
- data/exe/aarch64-linux/package/lib/tools/dashboard/appIcon.png +0 -0
- data/exe/aarch64-linux/package/lib/tools/trace/SKILL.md +171 -0
- data/exe/aarch64-linux/package/lib/tools/utils/extension.js +78 -0
- data/exe/aarch64-linux/package/lib/tools/utils/socketConnection.js +108 -0
- data/exe/aarch64-linux/package/lib/utilsBundle.js +85418 -0
- data/exe/aarch64-linux/package/lib/utilsBundle.js.LICENSE +2002 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-BY2S1tHT.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-DpEq2p62.js +52 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/index.html +29 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/playwright-logo.svg +24 -0
- data/exe/aarch64-linux/package/lib/vite/htmlReport/index.html +16 -0
- data/exe/aarch64-linux/package/lib/vite/htmlReport/report.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/htmlReport/report.js +72 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-BHYmBp6h.js +32 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-4ZiSSCmn.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-DA10QRaq.js +193 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/index.html +29 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/playwright-logo.svg +9 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-Ds_H_9Yq.js +32 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-D31xz8zv.js +262 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/urlMatch-BYQrIQwR.js +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.BDKsFU3c.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.BCnMPevh.js +2 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.CzXZzn5A.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.html +44 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/manifest.webmanifest +16 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/playwright-logo.svg +9 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.html +10 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.v8KI4P3m.js +2 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/sw.bundle.js +5 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.C2Efnu2P.js +6 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.html +18 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- data/exe/aarch64-linux/package/lib/xdg-open +1066 -0
- data/exe/aarch64-linux/package/package.json +34 -0
- data/exe/aarch64-linux/package/protocol.yml +4884 -0
- data/exe/aarch64-linux/package/types/protocol.d.ts +24565 -0
- data/exe/aarch64-linux/package/types/structs.d.ts +45 -0
- data/exe/aarch64-linux/package/types/types.d.ts +24518 -0
- data/exe/playwright +11 -0
- data/lib/tasks/venetian.rake +11 -0
- data/lib/venetian/browser_installer.rb +26 -0
- data/lib/venetian/browser_runner_extensions.rb +17 -0
- data/lib/venetian/executable.rb +154 -0
- data/lib/venetian/gemspec.rb +7 -0
- data/lib/venetian/playwright_create_extensions.rb +11 -0
- data/lib/venetian/railtie.rb +9 -0
- data/lib/venetian/tasks.rb +3 -0
- data/lib/venetian/upstream.rb +45 -0
- data/lib/venetian/version.rb +5 -0
- data/lib/venetian.rb +29 -0
- metadata +185 -0
data/exe/playwright
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#! /usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require "venetian"
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
Venetian.execute(*ARGV, echo: ENV.fetch("VENETIAN_DEBUG", nil))
|
|
8
|
+
rescue Venetian::Executable::UnsupportedPlatformError, Venetian::Executable::ExecutableNotFoundError => e
|
|
9
|
+
warn "ERROR: #{e.message}"
|
|
10
|
+
exit 1
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
namespace :venetian do
|
|
4
|
+
desc <<~USAGE
|
|
5
|
+
Install Playwright browsers. Pass a name to install a specific browser (e.g. venetian:install[chromium]), else installs default browsers.
|
|
6
|
+
USAGE
|
|
7
|
+
task :install, [:browser] do |_task, args|
|
|
8
|
+
require "venetian"
|
|
9
|
+
Venetian::BrowserInstaller.install(args[:browser])
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Venetian
|
|
4
|
+
# # Browser Installer
|
|
5
|
+
#
|
|
6
|
+
# Installs browsers using the Playwright executable.
|
|
7
|
+
class BrowserInstaller
|
|
8
|
+
# # Install Error
|
|
9
|
+
#
|
|
10
|
+
# Raised when the installation fails for some reason.
|
|
11
|
+
class InstallError < StandardError
|
|
12
|
+
INSTALL_FAILED_MESSAGE = "Playwright install failed. Run `rake venetian:install` manually."
|
|
13
|
+
|
|
14
|
+
def initialize(message = nil)
|
|
15
|
+
super([INSTALL_FAILED_MESSAGE, *message].join(": "))
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Installs a browser. Raises InstallError if installation fails.
|
|
20
|
+
def self.install(browser = nil)
|
|
21
|
+
Executable.system "install", *browser&.to_s, exception: true
|
|
22
|
+
rescue StandardError => e
|
|
23
|
+
raise InstallError, e.message
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Venetian
|
|
4
|
+
module BrowserRunnerExtensions # :nodoc:
|
|
5
|
+
def initialize(options = {}, *args)
|
|
6
|
+
@venetian_browser_type = options[:browser_type] || :chromium
|
|
7
|
+
super
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def start
|
|
11
|
+
BrowserInstaller.install(@venetian_browser_type) if Venetian.auto_install_browsers
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
Capybara::Playwright::BrowserRunner.prepend(Venetian::BrowserRunnerExtensions)
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Venetian
|
|
4
|
+
# # \Executable
|
|
5
|
+
#
|
|
6
|
+
# Provides methods for locating the Playwright executable.
|
|
7
|
+
module Executable
|
|
8
|
+
DEFAULT_DIR = File.expand_path(File.join(__dir__, "..", "..", "exe")) # :nodoc:
|
|
9
|
+
INSTALL_DIR_ENV_VAR = "VENETIAN_INSTALL_DIR" # :nodoc:
|
|
10
|
+
|
|
11
|
+
# # Unsupported Platform Error
|
|
12
|
+
#
|
|
13
|
+
# Raised when no platform targeted by this gem is supported by the Rubygems installation.
|
|
14
|
+
class UnsupportedPlatformError < StandardError
|
|
15
|
+
def initialize(platform) # :nodoc:
|
|
16
|
+
super(unsupported_platform_message(platform))
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
def unsupported_platform_message(platform)
|
|
22
|
+
<<~MSG
|
|
23
|
+
Playwright does not support the #{platform} platform.
|
|
24
|
+
Supported platforms:
|
|
25
|
+
#{supported_platforms}
|
|
26
|
+
|
|
27
|
+
Set #{INSTALL_DIR_ENV_VAR} to the directory containing your playwright executable.
|
|
28
|
+
See https://github.com/jmalcic/venetian for more details.
|
|
29
|
+
MSG
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def supported_platforms
|
|
33
|
+
Upstream::NATIVE_PLATFORMS.keys
|
|
34
|
+
.collect { |platform| "- #{platform}" }
|
|
35
|
+
.join("\n ")
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# # Executable Not Found Error
|
|
40
|
+
#
|
|
41
|
+
# Raised when the Playwright executable cannot be found for the current platform.
|
|
42
|
+
class ExecutableNotFoundError < StandardError
|
|
43
|
+
def initialize(reason, **context) # :nodoc:
|
|
44
|
+
super(case reason
|
|
45
|
+
in :directory_missing then directory_missing_message(context[:exe_dir])
|
|
46
|
+
in :executable_missing then executable_missing_message(context[:exe_dir])
|
|
47
|
+
else unsupported_platform_message(context[:platform], context[:exe_dir])
|
|
48
|
+
end)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
|
|
53
|
+
def directory_missing_message(exe_dir)
|
|
54
|
+
"#{INSTALL_DIR_ENV_VAR} is set to #{exe_dir} but that directory does not exist."
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def executable_missing_message(exe_dir)
|
|
58
|
+
"#{INSTALL_DIR_ENV_VAR} is set to #{exe_dir} but playwright was not found there."
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def unsupported_platform_message(platform, exe_dir)
|
|
62
|
+
<<~MSG
|
|
63
|
+
Cannot find the Playwright executable for #{platform} in #{exe_dir}.
|
|
64
|
+
|
|
65
|
+
Make sure your Gemfile.lock includes this platform:
|
|
66
|
+
bundle lock --add-platform #{platform}
|
|
67
|
+
bundle install
|
|
68
|
+
|
|
69
|
+
Or set #{INSTALL_DIR_ENV_VAR} to the directory containing your Playwright executable.
|
|
70
|
+
MSG
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
class << self
|
|
75
|
+
# Returns the path to the Node executable. Raises an error if the executable cannot be found.
|
|
76
|
+
def path
|
|
77
|
+
ensure_exe_dir_exists!
|
|
78
|
+
ensure_gem_platform_supported! unless ENV.key?(INSTALL_DIR_ENV_VAR)
|
|
79
|
+
ensure_executable_exists!
|
|
80
|
+
|
|
81
|
+
exe_path
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Executes the Playwright executable with the given arguments.
|
|
85
|
+
def execute(*args, echo: true)
|
|
86
|
+
[base_command, *args].then do |command|
|
|
87
|
+
puts command.inspect if echo
|
|
88
|
+
# due to mysterious Windows behavior; see equivalent in `tailwindcss-ruby`
|
|
89
|
+
next system(*command, exception: true) if Gem.win_platform?
|
|
90
|
+
|
|
91
|
+
exec(*command)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Runs the Playwright executable with the given arguments.
|
|
96
|
+
def system(*args, echo: true, **)
|
|
97
|
+
[*base_command, *args].then do |command|
|
|
98
|
+
puts command.inspect if echo
|
|
99
|
+
super(*command, exception: true)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Returns the base command to execute Playwright.
|
|
104
|
+
def base_command
|
|
105
|
+
[path, File.join(File.dirname(path), "package", "cli.js")]
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
private
|
|
109
|
+
|
|
110
|
+
def ensure_exe_dir_exists!
|
|
111
|
+
raise ExecutableNotFoundError.new(:directory_missing, exe_dir: exe_dir) unless exe_dir_exists?
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def ensure_gem_platform_supported!
|
|
115
|
+
raise UnsupportedPlatformError, platform if gem_platforms_unsupported?
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def ensure_executable_exists!
|
|
119
|
+
return unless exe_path.nil?
|
|
120
|
+
|
|
121
|
+
raise ExecutableNotFoundError.new ENV.key?(INSTALL_DIR_ENV_VAR) ? :executable_missing : :missing_platform,
|
|
122
|
+
exe_dir: exe_dir, platform: platform
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def exe_dir_exists?
|
|
126
|
+
File.directory?(exe_dir)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def exe_dir
|
|
130
|
+
ENV[INSTALL_DIR_ENV_VAR] || DEFAULT_DIR
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def exe_path
|
|
134
|
+
return custom_exe_path if ENV.key?(INSTALL_DIR_ENV_VAR)
|
|
135
|
+
|
|
136
|
+
Upstream::NATIVE_PLATFORMS.select { |platform, _| Gem::Platform.match_gem?(Gem::Platform.new(platform), GEMSPEC.name) }
|
|
137
|
+
.collect { |platform, _info| File.join(exe_dir, platform, "node") }
|
|
138
|
+
.detect { |candidate| File.exist?(candidate) }
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def custom_exe_path
|
|
142
|
+
File.join(exe_dir, "node").then { |path| path if File.exist?(path) }
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def gem_platforms_unsupported?
|
|
146
|
+
Upstream::NATIVE_PLATFORMS.keys.none? { |platform| Gem::Platform.match_gem?(Gem::Platform.new(platform), GEMSPEC.name) }
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def platform
|
|
150
|
+
Gem::Platform.local.to_s
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Venetian
|
|
4
|
+
module PlaywrightCreateExtensions # :nodoc:
|
|
5
|
+
def initialize(options = {}, *)
|
|
6
|
+
super({ playwright_cli_executable_path: Executable.base_command.shelljoin }.merge(options), *)
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
Capybara::Playwright::BrowserRunner::PlaywrightCreate.prepend(Venetian::PlaywrightCreateExtensions)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "playwright"
|
|
4
|
+
|
|
5
|
+
module Venetian
|
|
6
|
+
# # \Upstream
|
|
7
|
+
#
|
|
8
|
+
# Provides platform mappings and URLs for Playwright.
|
|
9
|
+
module Upstream
|
|
10
|
+
# map of gem platform strings to Playwright CDN platform strings and executable names inside the driver zip
|
|
11
|
+
NATIVE_PLATFORMS = {
|
|
12
|
+
"x86_64-linux" => "linux",
|
|
13
|
+
"aarch64-linux" => "linux-arm64",
|
|
14
|
+
"x86_64-darwin" => "mac",
|
|
15
|
+
"arm64-darwin" => "mac-arm64",
|
|
16
|
+
"x64-mingw-ucrt" => "win32_x64"
|
|
17
|
+
}.freeze
|
|
18
|
+
|
|
19
|
+
# base for driver download URLs
|
|
20
|
+
BASE_URL = "https://playwright.azureedge.net/builds/driver"
|
|
21
|
+
|
|
22
|
+
# Returns the URL to download the driver for the given platform.
|
|
23
|
+
def self.driver_download_url(playwright_platform)
|
|
24
|
+
"#{BASE_URL}/playwright-#{Playwright::COMPATIBLE_PLAYWRIGHT_VERSION}-#{playwright_platform}.zip"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns a hash that maps platforms to download URLs.
|
|
28
|
+
def self.download_urls
|
|
29
|
+
NATIVE_PLATFORMS.transform_values { |value| driver_download_url(value) }
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns the gemspec files for the base gem.
|
|
33
|
+
def self.base_files
|
|
34
|
+
GEMSPEC.files
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Builds a gemspec for the given platform, adding the files currently in the native platform directory.
|
|
38
|
+
def self.build_gemspec_for(platform)
|
|
39
|
+
GEMSPEC.dup.tap do |s|
|
|
40
|
+
s.platform = platform
|
|
41
|
+
s.files += Dir["exe/#{platform}/**/*"]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
data/lib/venetian.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "capybara/playwright"
|
|
4
|
+
|
|
5
|
+
require "venetian/version"
|
|
6
|
+
require "venetian/upstream"
|
|
7
|
+
require "venetian/executable"
|
|
8
|
+
require "venetian/playwright_create_extensions"
|
|
9
|
+
require "venetian/browser_installer"
|
|
10
|
+
require "venetian/browser_runner_extensions"
|
|
11
|
+
require "venetian/gemspec"
|
|
12
|
+
require "venetian/railtie" if defined? Rails
|
|
13
|
+
|
|
14
|
+
# # Venetian
|
|
15
|
+
#
|
|
16
|
+
# Native Playwright driver for Capybara.
|
|
17
|
+
module Venetian
|
|
18
|
+
class << self
|
|
19
|
+
attr_accessor :auto_install_browsers
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class Error < StandardError; end
|
|
23
|
+
|
|
24
|
+
self.auto_install_browsers = true
|
|
25
|
+
|
|
26
|
+
def self.execute(*, echo: true)
|
|
27
|
+
Executable.execute(*, echo: echo)
|
|
28
|
+
end
|
|
29
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: venetian
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: aarch64-linux
|
|
6
|
+
authors:
|
|
7
|
+
- Justin Malčić
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: capybara-playwright-driver
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0.5'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0.5'
|
|
26
|
+
description: Bundles the Playwright driver binary in platform-specific gem variants
|
|
27
|
+
and integrates with `capybara-playwright-driver`.
|
|
28
|
+
email:
|
|
29
|
+
- j.malcic@me.com
|
|
30
|
+
executables:
|
|
31
|
+
- playwright
|
|
32
|
+
extensions: []
|
|
33
|
+
extra_rdoc_files: []
|
|
34
|
+
files:
|
|
35
|
+
- CODE_OF_CONDUCT.md
|
|
36
|
+
- LICENSE.txt
|
|
37
|
+
- README.md
|
|
38
|
+
- Rakefile
|
|
39
|
+
- exe/aarch64-linux/LICENSE
|
|
40
|
+
- exe/aarch64-linux/node
|
|
41
|
+
- exe/aarch64-linux/package/LICENSE
|
|
42
|
+
- exe/aarch64-linux/package/NOTICE
|
|
43
|
+
- exe/aarch64-linux/package/README.md
|
|
44
|
+
- exe/aarch64-linux/package/ThirdPartyNotices.txt
|
|
45
|
+
- exe/aarch64-linux/package/api.json
|
|
46
|
+
- exe/aarch64-linux/package/bin/install_media_pack.ps1
|
|
47
|
+
- exe/aarch64-linux/package/bin/install_webkit_wsl.ps1
|
|
48
|
+
- exe/aarch64-linux/package/bin/reinstall_chrome_beta_linux.sh
|
|
49
|
+
- exe/aarch64-linux/package/bin/reinstall_chrome_beta_mac.sh
|
|
50
|
+
- exe/aarch64-linux/package/bin/reinstall_chrome_beta_win.ps1
|
|
51
|
+
- exe/aarch64-linux/package/bin/reinstall_chrome_stable_linux.sh
|
|
52
|
+
- exe/aarch64-linux/package/bin/reinstall_chrome_stable_mac.sh
|
|
53
|
+
- exe/aarch64-linux/package/bin/reinstall_chrome_stable_win.ps1
|
|
54
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_beta_linux.sh
|
|
55
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_beta_mac.sh
|
|
56
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_beta_win.ps1
|
|
57
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_dev_linux.sh
|
|
58
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_dev_mac.sh
|
|
59
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_dev_win.ps1
|
|
60
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_stable_linux.sh
|
|
61
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_stable_mac.sh
|
|
62
|
+
- exe/aarch64-linux/package/bin/reinstall_msedge_stable_win.ps1
|
|
63
|
+
- exe/aarch64-linux/package/browsers.json
|
|
64
|
+
- exe/aarch64-linux/package/cli.js
|
|
65
|
+
- exe/aarch64-linux/package/index.d.ts
|
|
66
|
+
- exe/aarch64-linux/package/index.js
|
|
67
|
+
- exe/aarch64-linux/package/index.mjs
|
|
68
|
+
- exe/aarch64-linux/package/lib/bootstrap.js
|
|
69
|
+
- exe/aarch64-linux/package/lib/coreBundle.js
|
|
70
|
+
- exe/aarch64-linux/package/lib/entry/cliDaemon.js
|
|
71
|
+
- exe/aarch64-linux/package/lib/entry/dashboardApp.js
|
|
72
|
+
- exe/aarch64-linux/package/lib/entry/mcp.js
|
|
73
|
+
- exe/aarch64-linux/package/lib/entry/oopBrowserDownload.js
|
|
74
|
+
- exe/aarch64-linux/package/lib/package.js
|
|
75
|
+
- exe/aarch64-linux/package/lib/server/chromium/appIcon.png
|
|
76
|
+
- exe/aarch64-linux/package/lib/server/deviceDescriptorsSource.json
|
|
77
|
+
- exe/aarch64-linux/package/lib/server/electron/loader.js
|
|
78
|
+
- exe/aarch64-linux/package/lib/serverRegistry.js
|
|
79
|
+
- exe/aarch64-linux/package/lib/serverRegistry.js.LICENSE
|
|
80
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/channelSessions.js
|
|
81
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/cli.js
|
|
82
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/help.json
|
|
83
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/minimist.js
|
|
84
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/output.js
|
|
85
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/program.js
|
|
86
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/registry.js
|
|
87
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/session.js
|
|
88
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/SKILL.md
|
|
89
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/element-attributes.md
|
|
90
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/playwright-tests.md
|
|
91
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/request-mocking.md
|
|
92
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/running-code.md
|
|
93
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/session-management.md
|
|
94
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/spec-driven-testing.md
|
|
95
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/storage-state.md
|
|
96
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/test-generation.md
|
|
97
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/tracing.md
|
|
98
|
+
- exe/aarch64-linux/package/lib/tools/cli-client/skill/references/video-recording.md
|
|
99
|
+
- exe/aarch64-linux/package/lib/tools/dashboard/appIcon.png
|
|
100
|
+
- exe/aarch64-linux/package/lib/tools/trace/SKILL.md
|
|
101
|
+
- exe/aarch64-linux/package/lib/tools/utils/extension.js
|
|
102
|
+
- exe/aarch64-linux/package/lib/tools/utils/socketConnection.js
|
|
103
|
+
- exe/aarch64-linux/package/lib/utilsBundle.js
|
|
104
|
+
- exe/aarch64-linux/package/lib/utilsBundle.js.LICENSE
|
|
105
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf
|
|
106
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg
|
|
107
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg
|
|
108
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg
|
|
109
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/assets/index-BY2S1tHT.css
|
|
110
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/assets/index-DpEq2p62.js
|
|
111
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/assets/safari-na3_-uQk.svg
|
|
112
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/index.html
|
|
113
|
+
- exe/aarch64-linux/package/lib/vite/dashboard/playwright-logo.svg
|
|
114
|
+
- exe/aarch64-linux/package/lib/vite/htmlReport/index.html
|
|
115
|
+
- exe/aarch64-linux/package/lib/vite/htmlReport/report.css
|
|
116
|
+
- exe/aarch64-linux/package/lib/vite/htmlReport/report.js
|
|
117
|
+
- exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-BHYmBp6h.js
|
|
118
|
+
- exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css
|
|
119
|
+
- exe/aarch64-linux/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf
|
|
120
|
+
- exe/aarch64-linux/package/lib/vite/recorder/assets/index-4ZiSSCmn.css
|
|
121
|
+
- exe/aarch64-linux/package/lib/vite/recorder/assets/index-DA10QRaq.js
|
|
122
|
+
- exe/aarch64-linux/package/lib/vite/recorder/index.html
|
|
123
|
+
- exe/aarch64-linux/package/lib/vite/recorder/playwright-logo.svg
|
|
124
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-Ds_H_9Yq.js
|
|
125
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-D31xz8zv.js
|
|
126
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/assets/urlMatch-BYQrIQwR.js
|
|
127
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js
|
|
128
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css
|
|
129
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf
|
|
130
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.BDKsFU3c.css
|
|
131
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/index.BCnMPevh.js
|
|
132
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/index.CzXZzn5A.css
|
|
133
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/index.html
|
|
134
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/manifest.webmanifest
|
|
135
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/playwright-logo.svg
|
|
136
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.html
|
|
137
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.v8KI4P3m.js
|
|
138
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/sw.bundle.js
|
|
139
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.Btcz36p_.css
|
|
140
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.C2Efnu2P.js
|
|
141
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.html
|
|
142
|
+
- exe/aarch64-linux/package/lib/vite/traceViewer/xtermModule.DYP7pi_n.css
|
|
143
|
+
- exe/aarch64-linux/package/lib/xdg-open
|
|
144
|
+
- exe/aarch64-linux/package/package.json
|
|
145
|
+
- exe/aarch64-linux/package/protocol.yml
|
|
146
|
+
- exe/aarch64-linux/package/types/protocol.d.ts
|
|
147
|
+
- exe/aarch64-linux/package/types/structs.d.ts
|
|
148
|
+
- exe/aarch64-linux/package/types/types.d.ts
|
|
149
|
+
- exe/playwright
|
|
150
|
+
- lib/tasks/venetian.rake
|
|
151
|
+
- lib/venetian.rb
|
|
152
|
+
- lib/venetian/browser_installer.rb
|
|
153
|
+
- lib/venetian/browser_runner_extensions.rb
|
|
154
|
+
- lib/venetian/executable.rb
|
|
155
|
+
- lib/venetian/gemspec.rb
|
|
156
|
+
- lib/venetian/playwright_create_extensions.rb
|
|
157
|
+
- lib/venetian/railtie.rb
|
|
158
|
+
- lib/venetian/tasks.rb
|
|
159
|
+
- lib/venetian/upstream.rb
|
|
160
|
+
- lib/venetian/version.rb
|
|
161
|
+
homepage: https://github.com/jmalcic/venetian
|
|
162
|
+
licenses:
|
|
163
|
+
- MIT
|
|
164
|
+
metadata:
|
|
165
|
+
homepage_uri: https://malcic.codes/software/venetian
|
|
166
|
+
rubygems_mfa_required: 'true'
|
|
167
|
+
source_code_uri: https://github.com/jmalcic/venetian
|
|
168
|
+
rdoc_options: []
|
|
169
|
+
require_paths:
|
|
170
|
+
- lib
|
|
171
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
|
+
requirements:
|
|
173
|
+
- - ">="
|
|
174
|
+
- !ruby/object:Gem::Version
|
|
175
|
+
version: 3.3.0
|
|
176
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - ">="
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: '0'
|
|
181
|
+
requirements: []
|
|
182
|
+
rubygems_version: 4.0.10
|
|
183
|
+
specification_version: 4
|
|
184
|
+
summary: Playwright executables for Ruby
|
|
185
|
+
test_files: []
|