venetian 0.4.1 → 0.4.2
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/AGENTS.md +1 -1
- data/Rakefile +14 -5
- data/exe/playwright +1 -1
- data/lib/venetian/browser_installer.rb +2 -6
- data/lib/venetian/core.rb +4 -0
- data/lib/venetian/trust_store.rb +2 -2
- data/lib/venetian/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab76ef936554aa0b7ccd2431a40aa5d4307b770cbb3869f6ce566b8304860b15
|
|
4
|
+
data.tar.gz: 9286ad987f5c5f2bd7ae2d36dcfa24eb828e10cdfab15ec479bae84880e38dd3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c306a0c85fad7356af711b9ff9d99da091e6a5c0f190c711155517c73a13232dd991efea4697cc0e4a37474e7051a1cb748f5c25e7116ddbf667c8ad154da6a7
|
|
7
|
+
data.tar.gz: 42a1250de73eaaf27e7b0824c1bc49f0b1e5d3af8efe90641f6b383c6b670625a7db845f56657feff7118c2f6924f75baf1b8fa3adf3f5fe32ee46e3ea2f838a
|
data/AGENTS.md
CHANGED
|
@@ -104,7 +104,7 @@ layout, so keep it if you change the assembly. There's no wrapper script: `Execu
|
|
|
104
104
|
it instead.
|
|
105
105
|
- Extensions to other gems are `*Extensions` modules prepended at the bottom of their own file, not monkey patches.
|
|
106
106
|
The entry points (`lib/venetian.rb`, `lib/venetian/playwright.rb`) decide which ones load.
|
|
107
|
-
- Debug output only appears
|
|
107
|
+
- Debug output only appears with `VENETIAN_DEBUG=1`. Keep the gem quiet by default.
|
|
108
108
|
|
|
109
109
|
## Tests
|
|
110
110
|
|
data/Rakefile
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "bundler/setup"
|
|
3
4
|
require "bundler/gem_tasks"
|
|
4
|
-
require "minitest/test_task"
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# With BUNDLE_ONLY=sync, neither the test and lint gems nor this gem are installed and set up
|
|
7
|
+
if Bundler.settings[:only].then { |groups| groups.empty? || groups.include?(:default) }
|
|
8
|
+
require "minitest/test_task"
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
Minitest::TestTask.create
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
require "rubocop/rake_task"
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
RuboCop::RakeTask.new
|
|
15
|
+
|
|
16
|
+
task default: %i[test rubocop]
|
|
17
|
+
else
|
|
18
|
+
require "pathname"
|
|
19
|
+
|
|
20
|
+
$LOAD_PATH.unshift Pathname(__dir__).join("lib").to_path
|
|
21
|
+
end
|
|
13
22
|
|
|
14
23
|
import "rakelib/release.rake"
|
|
15
24
|
import "rakelib/upstream.rake"
|
data/exe/playwright
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
require "venetian/core"
|
|
5
5
|
|
|
6
6
|
begin
|
|
7
|
-
Venetian.execute(*ARGV, echo:
|
|
7
|
+
Venetian.execute(*ARGV, echo: Venetian.debug?)
|
|
8
8
|
rescue Venetian::Executable::UnsupportedPlatformError, Venetian::Executable::ExecutableNotFoundError => e
|
|
9
9
|
warn "ERROR: #{e.message}"
|
|
10
10
|
exit 1
|
|
@@ -18,7 +18,7 @@ module Venetian
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def install_dry_run(browser = nil)
|
|
21
|
-
Executable.capture("install-deps", *browser&.to_s, "--dry-run", echo: debug?)
|
|
21
|
+
Executable.capture("install-deps", *browser&.to_s, "--dry-run", echo: Venetian.debug?)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def install_into_browsers_path(browser, deps: nil)
|
|
@@ -71,16 +71,12 @@ module Venetian
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def run_installer(*args)
|
|
74
|
-
return Venetian.system(*args, exception: true, echo: true) if debug?
|
|
74
|
+
return Venetian.system(*args, exception: true, echo: true) if Venetian.debug?
|
|
75
75
|
|
|
76
76
|
Executable.capture(*args, echo: false, merge_stderr: false).then do |output, status|
|
|
77
77
|
raise InstallError, "exit status #{status.exitstatus}\n#{output}".strip unless status.success?
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
|
-
|
|
81
|
-
def debug?
|
|
82
|
-
ENV.fetch("VENETIAN_DEBUG", nil)
|
|
83
|
-
end
|
|
84
80
|
end
|
|
85
81
|
|
|
86
82
|
# # Install Error
|
data/lib/venetian/core.rb
CHANGED
data/lib/venetian/trust_store.rb
CHANGED
|
@@ -17,10 +17,10 @@ module Venetian
|
|
|
17
17
|
|
|
18
18
|
class << self
|
|
19
19
|
# Returns whether to run Node with the certificate authorities Ruby's OpenSSL trusts, which it does unless
|
|
20
|
-
# +VENETIAN_BUNDLED_CA+
|
|
20
|
+
# +VENETIAN_BUNDLED_CA=1+ or Node is told to use other certificate authorities, with +--use-bundled-ca+ or
|
|
21
21
|
# +--use-system-ca+ in +NODE_OPTIONS+ or with +NODE_USE_SYSTEM_CA=1+.
|
|
22
22
|
def enabled?
|
|
23
|
-
|
|
23
|
+
ENV[BUNDLED_CA_ENV_VAR] != "1" && !other_certificate_authorities?
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
# Returns the environment variables pointing Node at the certificates Ruby's OpenSSL trusts, if #enabled?.
|
data/lib/venetian/version.rb
CHANGED