class

MStrap::Configuration

Inherits MStrap::DSL / MStrap::DSL::System / MStrap::DSL::Logging / Reference / Object

Constants

DEFAULT_PROFILE_CONFIG_DEF = Defs::DefaultProfileConfigDef.new

Constructors

new(config : Defs::ConfigDef, config_path : String = Paths::CONFIG_HCL)
Source

Instance methods

config_path

Returns path to configuration file

Source
default_runtime_manager

Returns the default runtime manager specified by the configuration

Source
known_profile_configs

Returns known profile configurations

Source
load_profiles!(force = false)

Loads all profiles and resolves them into the resolved_profile

Raises ConfigurationNotFoundError if a profile cannot be found.

Source
loaded_profile_configs

Returns loaded profile configurations

Source
loaded_profiles

Returns loaded profiles

Source
loaded_profiles?

Returns whether profiles have been loaded

Source
profile_configs

Returns profile configurations for active profiles

Source
profiles

Returns active profiles

Source
reload!(force = false)

Resets and reloads configuration and any managed profiles.

Raises ConfigurationNotFoundError if the mstrap configuration cannot be found or accessed, or any managed profiles cannot be found or accessed.

Source
resolved_profile

Returns resolved profile. This is the result of merging loaded managed profiles with the default profiles.

Source
runtime_managers

Returns the runtime managers specified by the configuration

Source
runtimes

Returns the language runtimes with their resolved runtime manager

Raises UnsupportedLanguageRuntimeManagerError if the configuration of a language runtime to a runtime manager is invalid Raises InvalidRuntimeManagerError if an invalid runtime manager is provided

Source
save!

Saves configuration back to disk

Source
user

Returns the mstrap user

Source