class MStrap::Configuration
- MStrap::Configuration
- Reference
- Object
Included Modules
Defined in:
mstrap/configuration.crConstant Summary
-
DEFAULT_PROFILE_CONFIG_DEF =
Defs::DefaultProfileConfigDef.new
Constructors
Instance Method Summary
-
#config_path : String
Returns path to configuration file
-
#default_runtime_manager : MStrap::RuntimeManager
Returns the default runtime manager specified by the configuration
-
#known_profile_configs : Array(MStrap::Defs::ProfileConfigDef)
Returns known profile configurations
-
#load_profiles!(force = false)
Loads all profiles and resolves them into the resolved_profile
-
#loaded_profile_configs : Array(MStrap::Defs::ProfileConfigDef)
Returns loaded profile configurations
-
#loaded_profiles : Array(MStrap::Defs::ProfileDef)
Returns loaded profiles
-
#loaded_profiles?
Returns whether profiles have been loaded
-
#profile_configs
Returns profile configurations for active profiles
-
#profiles
Returns active profiles
-
#reload!(force = false)
Resets and reloads configuration and any managed profiles.
-
#resolved_profile : MStrap::Defs::ProfileDef
Returns resolved profile.
-
#runtime_managers : Array(MStrap::RuntimeManager)
Returns the runtime managers specified by the configuration
-
#runtimes : Hash(String, MStrap::Runtime)
Returns the language runtimes with their resolved runtime manager
-
#save!
Saves configuration back to disk
-
#user : MStrap::User
Returns the mstrap user
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 default runtime manager specified by the configuration
Returns known profile configurations
Loads all profiles and resolves them into the resolved_profile
Raises ConfigurationNotFoundError if a profile cannot be found.
Returns loaded profile configurations
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.
Returns resolved profile. This is the result of merging loaded managed profiles with the default profiles.
Returns the runtime managers specified by the configuration
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