Skip to content

Commit

Permalink
Merge branch 'unstable' as v0.6.0
Browse files Browse the repository at this point in the history
Pull in latest changes from unstable branch:
- Pull request #19
  • Loading branch information
dwhjames committed Jul 23, 2014
2 parents 4a7da95 + 5def8c4 commit d4fa0dc
Show file tree
Hide file tree
Showing 11 changed files with 584 additions and 401 deletions.
49 changes: 49 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

organization in ThisBuild := "com.pellucid"

licenses in ThisBuild += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))

version in ThisBuild := "0.6.0"

scalaVersion in ThisBuild := "2.11.1"

crossScalaVersions in ThisBuild := Seq("2.10.4", "2.11.1")

scalacOptions in ThisBuild ++= Seq("-feature", "-deprecation", "-unchecked")

shellPrompt in ThisBuild := CustomShellPrompt.customPrompt

resolvers in ThisBuild ++= Seq(
"typesafe" at "http://repo.typesafe.com/typesafe/releases",
"sonatype" at "http://oss.sonatype.org/content/repositories/releases"
)



lazy val awsWrap = project in file(".")

name := "aws-wrap"

libraryDependencies ++= Seq(
Dependencies.Compile.awsJavaSDK % "provided",
Dependencies.Compile.slf4j
)


bintray.Plugin.bintrayPublishSettings

bintray.Keys.bintrayOrganization in bintray.Keys.bintray := Some("pellucid")

bintray.Keys.packageLabels in bintray.Keys.bintray := Seq("aws", "dynamodb", "s3", "ses", "simpledb", "sns", "sqs", "async", "future")



lazy val awsWrapTest = project.
in(file("integration")).
configs(IntegrationTest).
dependsOn(awsWrap)


lazy val scratch = project.
in(file("scratch")).
dependsOn(awsWrap)
38 changes: 38 additions & 0 deletions integration/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import LocalMode.localMode

name := "aws-wrap-test"


libraryDependencies ++= Seq(
Dependencies.Compile.awsJavaSDK,
Dependencies.Compile.jodaTime,
Dependencies.Compile.jodaConvert,
Dependencies.Compile.logback,
Dependencies.IntegrationTest.scalaTest
)


Defaults.itSettings

parallelExecution in IntegrationTest := false


localMode := true

// testOptions in IntegrationTest += Tests.Argument(s"-D=${localMode.value}")

testOptions in IntegrationTest += Tests.Setup { () =>
if (localMode.value) {
println("Start DynamoDB Local")
System.setProperty("DynamoDB.localMode", "true")
Process("bash start-dynamodb-local.sh") !
}
}

testOptions in IntegrationTest += Tests.Cleanup { () =>
if (localMode.value) {
println("Stop DynamoDB Local")
System.clearProperty("DynamoDB.localMode")
Process("bash stop-dynamodb-local.sh") !
}
}
160 changes: 0 additions & 160 deletions project/Build.scala

This file was deleted.

28 changes: 28 additions & 0 deletions project/CustomShellPrompt.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import sbt._
import Keys._

object CustomShellPrompt {

val Branch = """refs/heads/(.*)\s""".r

def gitBranchOrSha =
Process("git symbolic-ref HEAD") #|| Process("git rev-parse --short HEAD") !! match {
case Branch(name) => name
case sha => sha.stripLineEnd
}

val customPrompt = { state: State =>

val extracted = Project.extract(state)
import extracted._

(name in currentRef get structure.data) map { name =>
"[" + scala.Console.CYAN + name + scala.Console.RESET + "] " +
scala.Console.BLUE + "git:(" +
scala.Console.RED + gitBranchOrSha +
scala.Console.BLUE + ")" +
scala.Console.RESET + " $ "
} getOrElse ("> ")

}
}
32 changes: 32 additions & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import sbt._

object Dependencies {

object V {
val awsJavaSDK = "1.8.5"

val jodaTime = "2.3"
val jodaConvert = "1.6"

val slf4j = "1.7.7"

val logback = "1.1.2"
}

object Compile {

val awsJavaSDK = "com.amazonaws" % "aws-java-sdk" % V.awsJavaSDK exclude("joda-time", "joda-time")

val jodaTime = "joda-time" % "joda-time" % V.jodaTime
val jodaConvert = "org.joda" % "joda-convert" % V.jodaConvert

val slf4j = "org.slf4j" % "slf4j-api" % V.slf4j

val logback = "ch.qos.logback" % "logback-classic" % V.logback
}

object IntegrationTest {

val scalaTest = "org.scalatest" % "scalatest_2.10" % "1.9.2" % "it"
}
}
5 changes: 5 additions & 0 deletions project/LocalMode.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import sbt._

object LocalMode {
val localMode = settingKey[Boolean]("Run integration tests locally")
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.1
sbt.version=0.13.5
11 changes: 11 additions & 0 deletions scratch/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

libraryDependencies ++= Seq(
Dependencies.Compile.awsJavaSDK,
Dependencies.Compile.jodaTime,
Dependencies.Compile.jodaConvert,
Dependencies.Compile.logback
)

publish := ()

publishLocal := ()
Loading

0 comments on commit d4fa0dc

Please sign in to comment.