Class: Venetian::Upstream::PlatformInfo
- Inherits:
-
Data
- Object
- Data
- Venetian::Upstream::PlatformInfo
- Defined in:
- lib/venetian/upstream.rb
Overview
Describes how to assemble the Playwright driver for a single gem platform.
node_dirthe platform infix used in Node.js release archive names (e.g. "linux-x64")
windowswhether this platform's Node.js archive is a Windows build (.zip, node.exe)
Instance Attribute Summary collapse
-
#node_dir ⇒ Object
readonly
Returns the value of attribute node_dir.
-
#windows ⇒ Object
readonly
Returns the value of attribute windows.
Instance Method Summary collapse
-
#executable_name ⇒ Object
Returns the filename of the Node executable inside the assembled driver.
-
#node_archive_extension ⇒ Object
Returns the file extension of the Node.js release archive for this platform.
-
#node_url_for(version) ⇒ Object
Returns the URL to download the Node.js release archive for the given version.
Instance Attribute Details
#node_dir ⇒ Object (readonly)
Returns the value of attribute node_dir
14 15 16 |
# File 'lib/venetian/upstream.rb', line 14 def node_dir @node_dir end |
#windows ⇒ Object (readonly)
Returns the value of attribute windows
14 15 16 |
# File 'lib/venetian/upstream.rb', line 14 def windows @windows end |
Instance Method Details
#executable_name ⇒ Object
Returns the filename of the Node executable inside the assembled driver.
16 17 18 |
# File 'lib/venetian/upstream.rb', line 16 def executable_name windows ? "node.exe" : "node" end |
#node_archive_extension ⇒ Object
Returns the file extension of the Node.js release archive for this platform.
21 22 23 |
# File 'lib/venetian/upstream.rb', line 21 def node_archive_extension windows ? "zip" : "tar.gz" end |
#node_url_for(version) ⇒ Object
Returns the URL to download the Node.js release archive for the given version.
26 27 28 |
# File 'lib/venetian/upstream.rb', line 26 def node_url_for(version) "#{NODE_DIST_URL}/v#{version}/node-v#{version}-#{node_dir}.#{node_archive_extension}" end |