Skip to content

Commit

Permalink
Merge pull request heroku#5 from rbrainard/master
Browse files Browse the repository at this point in the history
Fix version detection regex to find numbers 0-9 and update tests.
  • Loading branch information
naaman committed Jan 24, 2012
2 parents 0dde325 + 132135a commit 728ab35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ install_play()
echo "-----> done"
}

PLAY_VERSION=`grep 'play[ \t]*[0-9\.]' conf/dependencies.yml | sed -E -e 's/[ \t]*-[ \t]*play[ \t]*([1-9\.]*).*/\1/'`
PLAY_VERSION=`grep 'play[ \t]*[0-9\.]' conf/dependencies.yml | sed -E -e 's/[ \t]*-[ \t]*play[ \t]*([0-9\.]*).*/\1/'`
DEFAULT_PLAY_VERSION="1.2.4"
VERSION_DECLARED=true

Expand Down
10 changes: 7 additions & 3 deletions test/compile_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ getPlayApp() {
local playVersion=${1:-${DEFAULT_PLAY_VERSION}}
local appBaseDir="${PLAY_TEST_CACHE}/app-${playVersion}"
if [ ! -f ${appBaseDir}/conf/application.conf ]; then
$(_full_play) new ${appBaseDir} --name app
$(_full_play) new ${appBaseDir} --name app >/dev/null
fi
cp -r ${appBaseDir}/. ${BUILD_DIR}
assertTrue "${BUILD_DIR}/conf/application.conf should be present after creating a new app." "[ -f ${BUILD_DIR}/conf/application.conf ]"
Expand Down Expand Up @@ -136,6 +136,7 @@ testPlayVersionIsPickedUpFromDependenciesFile() {

compile

assertCaptured "Installing Play! 1.2.4"
assertNotCaptured "WARNING: Play! version not specified in dependencies.yml."
}

Expand All @@ -151,9 +152,12 @@ testPlayCopiedToCacheDirForSuccessfulBuild() {
}

testValidVersionOfPlayThatIsNotInS3Bucket() {
getPlayApp "1.1.1"
definePlayAppVersion "1.1.1"
getPlayApp "1.0.1"
definePlayAppVersion "1.0.1"

compile

assertCaptured "Installing Play! 1.0.1"
assertCaptured "Error installing Play! framework or unsupported Play! framework version specified."
}

Expand Down

0 comments on commit 728ab35

Please sign in to comment.