Module: Javy
- Defined in:
- ext/javy/javy.rb
Defined Under Namespace
Modules: Installer
Classes: Asset, Error, ExecutionError, InstallationError, Platform
Constant Summary
collapse
- ROOT =
__dir__
- BIN_FOLDER =
File.join(ShopifyCLI.cache_dir, "javy", "bin")
- HASH_FOLDER =
File.join(ROOT, "hashes")
- VERSION =
File.read(File.join(ROOT, "version")).strip
- TARGET =
File.join(BIN_FOLDER, "javy-#{VERSION}")
Class Method Summary
collapse
Class Method Details
.build(source:, dest: nil) ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'ext/javy/javy.rb', line 20
def build(source:, dest: nil)
optional_args = []
optional_args += ["-o", dest] unless dest.nil?
ShopifyCLI::Result
.wrap { ensure_installed }
.call
.then { exec(source, *optional_args) }
end
|