Skip to content

Commit

Permalink
Upgraded to Akka 2.1.2 and Scala 2.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikengstrom committed Mar 15, 2013
1 parent 5334a7f commit 4f1b82e
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -7,7 +7,7 @@ This repository contains an Akka kata that can be used whenever you feel like do
* A computer
* An installed OS
* Java
* [SBT 0.12.0](http://www.scala-sbt.org/download.html)
* [SBT 0.12.2](http://www.scala-sbt.org/download.html)
* [Git](http://git-scm.com/downloads) _(not mandatory)_

## Getting Started (Git installed)
Expand Down
@@ -1,11 +1,11 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
* Copyright (C) 2011-2013 Typesafe <http://typesafe.com/>
*/
package com.typesafe.akkademo.client

import akka.actor.ActorSystem
import akka.dispatch.Await
import akka.util.duration._
import scala.concurrent.duration._
import scala.concurrent.Await
import akka.util.Timeout
import akka.pattern.ask
import com.typesafe.config.ConfigFactory
Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
* Copyright (C) 2011-2013 Typesafe <http://typesafe.com/>
*/
package com.typesafe.akkademo.common

Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
* Copyright (C) 2011-2013 Typesafe <http://typesafe.com/>
*/
package com.typesafe.akkademo.processor

Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
* Copyright (C) 2011-2013 Typesafe <http://typesafe.com/>
*/
package com.typesafe.akkademo.processor.repository

Expand All @@ -22,7 +22,7 @@ class ReallyUnstableResource extends UnstableResource {
case (id, player, game, amount) if (!bets.contains(id)) bets.put(id, Bet(player, game, amount))
})
} catch {
case _
case _: Exception
}

def save(id: Int, player: String, game: Int, amount: Int) = {
Expand Down Expand Up @@ -51,7 +51,7 @@ class ReallyUnstableResource extends UnstableResource {
try {
Option((id.toInt, player, game.toInt, amount.toInt))
} catch {
case _ None
case _: Exception None
}
case _ None
}
Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
* Copyright (C) 2011-2013 Typesafe <http://typesafe.com/>
*/
package com.typesafe.akkademo.processor.service

Expand Down
28 changes: 17 additions & 11 deletions project/Build.scala
@@ -1,13 +1,13 @@
import sbt._
import sbt.Keys._
import com.typesafe.startscript.StartScriptPlugin
import com.typesafe.sbtscalariform.ScalariformPlugin
import com.typesafe.sbtscalariform.ScalariformPlugin.ScalariformKeys
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys

object AkkaDemoBuild extends Build {
val Organization = "akkademo"
val Version = "1.0-SNAPSHOT"
val ScalaVersion = "2.9.2"
val ScalaVersion = "2.10.1"

lazy val akkademo = Project(
id = "akkademo",
Expand Down Expand Up @@ -51,7 +51,13 @@ object AkkaDemoBuild extends Build {
Seq(libraryDependencies ++= Dependencies.akkademo)
)

lazy val defaultSettings = Defaults.defaultSettings ++ formatSettings ++ Seq(
lazy val buildSettings = Seq(
organization := Organization,
version := Version,
scalaVersion := ScalaVersion
)

lazy val defaultSettings = Defaults.defaultSettings ++ formatSettings ++ buildSettings ++ Seq(
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/",

// compile options
Expand All @@ -62,17 +68,17 @@ object AkkaDemoBuild extends Build {
parallelExecution in Test := false
)

lazy val formatSettings = ScalariformPlugin.scalariformSettings ++ Seq(
lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq(
ScalariformKeys.preferences in Compile := formattingPreferences,
ScalariformKeys.preferences in Test := formattingPreferences
)

def formattingPreferences = {
import scalariform.formatter.preferences._
FormattingPreferences()
.setPreference(RewriteArrowSymbols, true)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(RewriteArrowSymbols, true)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
}
}

Expand All @@ -83,15 +89,15 @@ object Dependencies {

object Dependency {
object Version {
val Akka = "2.0.3"
val Akka = "2.1.2"
val Scalatest = "1.6.1"
val JUnit = "4.5"
}

// ---- Application dependencies ----

val akkaActor = "com.typesafe.akka" % "akka-actor" % Version.Akka
val akkaRemote = "com.typesafe.akka" % "akka-remote" % Version.Akka
val akkaActor = "com.typesafe.akka" %% "akka-actor" % Version.Akka
val akkaRemote = "com.typesafe.akka" %% "akka-remote" % Version.Akka

// ---- Test dependencies ----

Expand Down
6 changes: 3 additions & 3 deletions project/plugins.sbt
@@ -1,9 +1,9 @@
resolvers += Classpaths.typesafeResolver

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.2")

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.1.0")
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")

addSbtPlugin("com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.3")

addSbtPlugin("com.typesafe.sbtscalariform" % "sbtscalariform" % "0.4.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.0.0")
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
* Copyright (C) 2011-2013 Typesafe <http://typesafe.com/>
*/
package com.typesafe.akkademo.service

Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
* Copyright (C) 2011-2013 Typesafe <http://typesafe.com/>
*/
package com.typesafe.akkademo.service

Expand Down

0 comments on commit 4f1b82e

Please sign in to comment.