in rake-runner-agent/src/jetbrains/buildServer/agent/feature/RubyEnvConfiguratorService.java [149:177]
private void validateConfiguratorParams(@NotNull final RubyEnvConfiguratorConfiguration configuration)
throws RakeTasksBuildService.InvalidConfigurationException {
switch (configuration.getType()) {
case RVM: {
// sdk name
if (StringUtil.isEmpty(configuration.getRVMSdkName())) {
throw new RakeTasksBuildService.InvalidConfigurationException(
"RVM interpreter name cannot be empty. If you want to use system ruby interpreter please enter 'system'.", true);
}
break;
}
case RVMRC: {
String rvmrcFilePath = StringUtil.emptyIfNull(configuration.getRVMRCFilePath());
if (!StringUtil.isEmptyOrSpaces(rvmrcFilePath) &&
!PathUtil.getFileName(rvmrcFilePath).equals(".rvmrc")) {
throw new RakeTasksBuildService.InvalidConfigurationException(
"RVMRC file name must be '.rvmrc'. RVM does not support other names", false);
}
break;
}
case RBENV: {
if (StringUtil.isEmpty(configuration.getRbEnvVersion())) {
throw new RakeTasksBuildService.InvalidConfigurationException(
"rbenv interpreter name cannot be empty. If you want to use system ruby interpreter please enter 'system'.", true);
}
break;
}
}
}