Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass at AWS lambda assembly package configuration (WIP) #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/gateway/main.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package gateway;

class Main {
import java.io.{InputStream, OutputStream, PrintStream}

def router(input: InputStream, output: OutputStream): Unit = {
val result = s"Greetings."
output.write(result.getBytes("UTF-8"))
}
}
11 changes: 9 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resolvers ++= Seq(
"scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
"Akka Snapshot Repository" at "http://repo.akka.io/snapshots/"
)

libraryDependencies ++= Seq(
ehcache,
ws,
Expand All @@ -22,4 +22,11 @@ libraryDependencies ++= Seq(
specs2 % Test,
"com.typesafe.akka" %% "akka-testkit" % "2.5.4" % "test",
"org.scalatest" %% "scalatest" % "3.0.4" % "test"
)
)

assemblyMergeStrategy in assembly <<= (assemblyMergeStrategy in assembly) {
(old) => {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
}
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ logLevel := Level.Warn

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.6")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.6")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.12.0")
2 changes: 1 addition & 1 deletion test/models/SubscriberTransitionsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class SubscriberTransitionsSpec extends FunSpec with Matchers {
it ("should return the alert action if a report is sent") {
val action = subscriberTransitions.action("report 1111 My Address Lane")
action shouldBe 'isDefined
action.get shouldEqual AlertAction("1111 My Address Lane")
action.get shouldEqual SubscriberTransitions.AlertAction("1111 My Address Lane")
}
}
}
Expand Down