in rake-runner-common/src/jetbrains/buildServer/feature/RubyEnvConfiguratorConfiguration.java [45:73]
public RubyEnvConfiguratorConfiguration(final Map<String, String> configParameters) {
final String type = configParameters.get(RubyEnvConfiguratorConstants.UI_USE_RVM_KEY);
if ("unspecified".equals(type)) {
throw new IllegalStateException(RubyEnvConfiguratorConstants.UI_USE_RVM_KEY + " must be specified");
}
if ("manual".equals(type)) {
this.type = Type.RVM;
} else if ("rvmrc".equals(type)) {
this.type = Type.RVMRC;
} else if ("rvm_ruby_version".equals(type)) {
this.type = Type.RVM_RUBY_VERSION;
} else if ("rbenv".equals(type)) {
this.type = Type.RBENV;
} else if ("rbenv_file".equals(type)) {
this.type = Type.RBENV_FILE;
} else {
this.type = Type.INTERPRETER_PATH;
}
this.shouldFailBuildIfNoSdkFound =
Boolean.parseBoolean(configParameters.get(RubyEnvConfiguratorConstants.UI_FAIL_BUILD_IF_NO_RUBY_FOUND_KEY));
this.myRubySdkPath = StringUtil.nullIfEmpty(configParameters.get(RubyEnvConfiguratorConstants.UI_RUBY_SDK_PATH_KEY));
this.myRVMSdkName = StringUtil.nullIfEmpty(configParameters.get(RubyEnvConfiguratorConstants.UI_RVM_SDK_NAME_KEY));
this.myRVMGemsetName = StringUtil.nullIfEmpty(configParameters.get(RubyEnvConfiguratorConstants.UI_RVM_GEMSET_NAME_KEY));
this.myRVMRCFilePath = StringUtil.nullIfEmpty(configParameters.get(RubyEnvConfiguratorConstants.UI_RVM_RVMRC_PATH_KEY));
this.myRVMGemsetCreate = Boolean.parseBoolean(configParameters.get(RubyEnvConfiguratorConstants.UI_RVM_GEMSET_CREATE_IF_NON_EXISTS));
this.myRbEnvVersion = StringUtil.nullIfEmpty(configParameters.get(RubyEnvConfiguratorConstants.UI_RBENV_VERSION_NAME_KEY));
this.myRbEnvVersionFile = StringUtil.nullIfEmpty(configParameters.get(RubyEnvConfiguratorConstants.UI_RBENV_FILE_PATH_KEY));
this.myRVMRubyVersionPath = StringUtil.nullIfEmpty(configParameters.get(RubyEnvConfiguratorConstants.UI_RVM_RUBY_VERSION_PATH_KEY));
}