Skip to content

Commit

Permalink
allow travis ci tests to run
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffrocket committed Aug 2, 2013
1 parent 38eb91c commit da0c647
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
language: scala

scala:
- 2.9.2
- 2.10.2

services:
- mongodb

env:
- MONGO_PORT=27017
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object TrivialORM {
}

val mongo = {
val MongoPort = 37648
val MongoPort = Option(System.getenv("MONGO_PORT")).map(_.toInt).getOrElse(37648)
new Mongo(new ServerAddress("localhost", MongoPort))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ import org.bson.types.ObjectId
/////////////////////////////////////////////////

object RogueTestMongo extends MongoIdentifier {

override def jndiName = "rogue_mongo"

private var mongo: Option[Mongo] = None

def connectToMongo = {
val MongoPort = 37648
val MongoPort = Option(System.getenv("MONGO_PORT")).map(_.toInt).getOrElse(37648)
mongo = Some(new Mongo(new ServerAddress("localhost", MongoPort)))
MongoDB.defineDb(RogueTestMongo, mongo.get, "rogue-test")
}
Expand Down

0 comments on commit da0c647

Please sign in to comment.