abstract class MStrap::Runtime
- MStrap::Runtime
- Reference
- Object
Overview
Base class for working with language runtimes
Included Modules
Direct Known Subclasses
- MStrap::Runtimes::Crystal
- MStrap::Runtimes::Go
- MStrap::Runtimes::Node
- MStrap::Runtimes::Php
- MStrap::Runtimes::Python
- MStrap::Runtimes::Ruby
- MStrap::Runtimes::Rust
Defined in:
mstrap/runtime.crConstructors
Instance Method Summary
-
#bootstrap
Bootstrap the current directory for the runtime
-
#current_version
Returns the version of the language runtime used by the current directory or specified by the environment.
-
#has_runtime_plugin?
Returns whether the ASDF plugin has been installed for a language runtime or not
- #has_version?(version)
-
#has_versions?
Returns whether any versions of the language runtime have been installed by ASDF.
-
#install_packages(packages : Array(Defs::PkgDef), runtime_version : String | Nil = nil) : Bool
Installs global packages for the runtime with an optional version specification, and optional runtime version.
-
#installed_versions
Returns a list of the versions of the language runtime installed by ASDF.
-
#language_name : String
Name of the language as a string.
-
#latest_version
Returns the latest version available for the language runtime, according to the runtime manager
-
#matches? : Bool
Returns whether the project uses the runtime
-
#runtime_exec(command : String, args : Array(String) | Nil = nil, runtime_version : String | Nil = nil)
Execute a command using a specific language runtime version
- #runtime_manager : MStrap::RuntimeManager
-
#setup
Installs runtime manager plugin for the language runtime and installs any of the language runtime dependencies for the project.
-
#with_dir_version(dir, &)
Executes the block's context using the given directory's language runtime version or the version specified by the environment.
Instance methods inherited from module MStrap::DSL::System
cmd(env : Hash | Nil, command : String, args : Array(String) | Nil, **kwargs)
cmd,
has_command?(command_name : String, **kwargs) : Bool
has_command?
Instance methods inherited from module MStrap::DSL::Logging
log(msg)
log,
logc(msg)
logc,
logd(msg)
logd,
logn(msg)
logn,
logw(msg)
logw,
success(msg)
success
Constructor Detail
Instance Method Detail
Returns the version of the language runtime used by the current directory or specified by the environment.
NOTE This will not traverse parent directories to find versions files.
Returns whether the ASDF plugin has been installed for a language runtime or not
Returns whether any versions of the language runtime have been installed by ASDF.
Installs global packages for the runtime with an optional version specification, and optional runtime version.
NOTE The version specification is dependent upon the underlying package manager and is passed verbatim.
Returns the latest version available for the language runtime, according to the runtime manager
Execute a command using a specific language runtime version
Installs runtime manager plugin for the language runtime and installs any of the language runtime dependencies for the project.
Executes the block's context using the given directory's language runtime version or the version specified by the environment.
NOTE This will not traverse parent directories to find versions files.