Browse files

Minor tweaks to auto install configuration and cukes.

  • Loading branch information...
1 parent 3d9ad36 commit 22cec732312567c632afd8aeb187e23f757ed6fa @marc0der marc0der committed Jan 26, 2013
View
2 src/main/resources/scripts/gvm-install.sh
@@ -31,7 +31,7 @@ function __gvmtool_install {
if [[ ${VERSION_VALID} == 'valid' ]]; then
__gvmtool_install_candidate_version "${CANDIDATE}" "${VERSION}" || return 1
- if [[ -z "${gvm_auto_answer}" ]]; then
+ if [[ "${gvm_auto_answer}" != 'true' ]]; then
echo -n "Do you want ${CANDIDATE} ${VERSION} to be set as default? (Y/n): "
read USE
fi
View
2 src/main/resources/scripts/gvm-use.sh
@@ -24,7 +24,7 @@ function __gvmtool_use {
if [[ "${GVM_ONLINE}" == "true" && ! -d "${GVM_DIR}/${CANDIDATE}/${VERSION}" ]]; then
echo ""
echo "Stop! ${CANDIDATE} ${VERSION} is not installed."
- if [[ -z "${gvm_auto_answer}" ]]; then
+ if [[ "${gvm_auto_answer}" != 'true' ]]; then
echo -n "Do you want to install it now? (Y/n): "
read INSTALL
fi
View
2 src/test/cucumber/gvm/install_candidate.feature
@@ -32,7 +32,7 @@ Feature: Install Candidate
Then the candidate "grails" version "2.1.0" should be the default
Scenario: Install a candidate and select to use it automatically
- And I have configured autoinstall="Y"
+ And I have configured "gvm_auto_answer" to "true"
When I enter "gvm install grails 2.1.0"
Then the candidate "grails" version "2.1.0" is installed
And I see "Done installing!"
View
2 src/test/cucumber/gvm/use_and_default_candidate.feature
@@ -21,7 +21,7 @@ Feature: Use and Default Candidate
And the candidate "groovy" version "1.8.8" should be in use
Scenario: Use a candidate version that is automatically installed
- And I have configured autoinstall="Y"
+ And I have configured "gvm_auto_answer" to "true"
When I enter "gvm use groovy 1.8.8"
Then I see "Stop! groovy 1.8.8 is not installed."
Then I see "Using groovy version 1.8.8 in this shell."
View
4 src/test/resources/gvm/installation_steps.groovy
@@ -80,9 +80,9 @@ And(~'^the candidate "([^"]*)" version "([^"]*)" is already linked to "([^"]*)"$
Files.createSymbolicLink(link, target)
}
-And(~'^I have configured autoinstall="([^"]*)"$') { String flag ->
+And(~'^I have configured "([^"]*)" to "([^"]*)"$') { String configName, String flag ->
def configFile = new File("$gvmDir/etc/config")
- configFile.write "gvm_auto_answer=${flag}"
+ configFile.write "${configName}=${flag}"
}
private prepareCandidateFolder(String baseDir, String candidate, String version) {

0 comments on commit 22cec73

Please sign in to comment.