From b4eaaebf18ddd9dc913eac2fe83f6cdd6faaeb2e Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 14 Feb 2011 20:24:03 -0800 Subject: [PATCH] Various improvements to sbt-setup. Finally discovered the impressively well hidden "latest.integration" setting for ivy. --- bin/sbt-setup | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/bin/sbt-setup b/bin/sbt-setup index 3a86b2e40..120e13da8 100755 --- a/bin/sbt-setup +++ b/bin/sbt-setup @@ -6,8 +6,7 @@ PROJECT="$1" DEFAULT_PACKAGE="template" PACKAGE=${ORGANIZATION:-$DEFAULT_PACKAGE} SCALA_VERSION="2.8.1" -SCALACHECK_VERSION="1.8" -SPECS_VERSION="1.6.7" +SCALA_LOCAL_VERSION="2.9.0-local" SBT_VERSION="0.7.5.RC0" if [ -z "$PROJECT" ]; then @@ -16,8 +15,9 @@ if [ -z "$PROJECT" ]; then fi DIR=$(echo ${PROJECT} | tr '[A-Z]' '[a-z]') -PROJECT_UC=$(echo ${PROJECT:0:1} | tr '[a-z]' '[A-Z]')${PROJECT:1} -PROJECT_CLASS=$(echo $PROJECT_UC | sed -e 's/[^a-zA-Z_]//g;')Project +PROJECT_UC=$(echo ${PROJECT:0:1} | tr '[a-z]' '[A-Z]')$(echo ${PROJECT:1} | sed -e 's/[^a-zA-Z_]//g;') +PROJECT_CLASS=${PROJECT_UC}Project +SPEC_CLASS=${PROJECT_UC}Spec mkdir $DIR cd $DIR @@ -37,20 +37,20 @@ cat > project/build/${PROJECT_CLASS}.scala < super.localScala case path => log.info("Found scala.local: " + path) - List(defineScala("2.9.0-local", new java.io.File(path))) + List(defineScala("$SCALA_LOCAL_VERSION", new java.io.File(path))) } - val scalacheck = "org.scala-tools.testing" %% "scalacheck" % "$SCALACHECK_VERSION" % "test" withSources() - val specs = "org.scala-tools.testing" %% "specs" % "$SPECS_VERSION" % "test" withSources() + val scalacheck = "org.scala-tools.testing" %% "scalacheck" % "latest.integration" % "test" withSources() + val specs = "org.scala-tools.testing" %% "specs" % "latest.integration" % "test" withSources() } EOF @@ -79,14 +79,14 @@ EOF mkdir -p src/test/scala -cat > src/test/scala/TemplateSpec.scala < src/test/scala/${SPEC_CLASS}.scala <> { +class ${SPEC_CLASS} extends Specification { + "A skeletal specification" should { + "do little beyond creating a skeleton" >> { 1 mustEqual 1 } } @@ -99,4 +99,4 @@ git commit -m "Initial Import for ${PROJECT} (autogenerated by sbt-setup)." sbt update echo "" -echo "Ready to roll in $PWD" \ No newline at end of file +echo "Ready to roll in $PWD"