Permalink
Browse files

Demo for testing the next Play 2.5 module

  • Loading branch information...
1 parent 81cce5c commit 8baa5381f4efc9b293b59cf005b5db0c93d20426 @cchantep cchantep committed Mar 12, 2016
View
@@ -0,0 +1,7 @@
+language: scala
+scala:
+- 2.11.7
+jdk:
+- oraclejdk8
+sudo: false
+script: ./.travis_scripts/validate.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+SCRIPT_DIR=`dirname $0 | sed -e "s|^\./|$PWD/|"`
+
+# Sonatype staging (avoid Central sync delay)
+perl -pe 's|:= buildVersion|:= buildVersion\r\n\r\nresolvers += "Sonatype Staging" at "https://oss.sonatype.org/content/repositories/staging/"|' < "$SCRIPT_DIR/../build.sbt" > /tmp/build.sbt && mv /tmp/build.sbt "$SCRIPT_DIR/../build.sbt"
+
+if [ `sbt 'show version' 2>&1 | tail -n 1 | cut -d ' ' -f 2 | grep -- '-SNAPSHOT' | wc -l` -eq 1 ]; then
+ perl -pe 's|:= buildVersion|:= buildVersion\r\n\r\nresolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"|' < "$SCRIPT_DIR/../build.sbt" > /tmp/build.sbt && mv /tmp/build.sbt "$SCRIPT_DIR/../build.sbt"
+fi
+
+sbt +testOnly
@@ -26,7 +26,8 @@ import models.Article, Article._
class Articles @Inject() (
val messagesApi: MessagesApi,
- val reactiveMongoApi: ReactiveMongoApi)
+ val reactiveMongoApi: ReactiveMongoApi,
+ implicit val materializer: akka.stream.Materializer)
extends Controller with MongoController with ReactiveMongoComponents {
import java.util.UUID
@@ -1,6 +1,6 @@
@(articles: List[models.Article], activeSort: String)
-@main("Welcome to Play 2.0") {
+@main("Welcome to ReactiveMongo Demo") {
<div class="row">
<div class="span12">
<h2>Available articles</h2>
@@ -1,6 +1,6 @@
@(id: Option[String], form: Form[models.Article], files: Option[List[(play.api.libs.json.JsString, reactivemongo.api.gridfs.ReadFile[reactivemongo.play.json.JSONSerializationPack.type, play.api.libs.json.JsString])]])(implicit lang: play.api.i18n.Messages)
-@main("Welcome to ReactiveMongo on Play 2.4") {
+@main("Welcome to ReactiveMongo Demo") {
<div class="row">
<div class="span8">
<h2>
View
@@ -1,12 +1,14 @@
-import play.PlayImport.PlayKeys._
-
name := "reactivemongo-demo-app"
-version := "0.11.10"
+val buildVersion = "0.11.11"
+
+version := buildVersion
+
+resolvers += "Sonatype Staging" at "https://oss.sonatype.org/content/repositories/staging/"
scalaVersion := "2.11.7"
-libraryDependencies += "org.reactivemongo" %% "play2-reactivemongo" % "0.11.10"
+libraryDependencies += "org.reactivemongo" %% "play2-reactivemongo" % buildVersion
routesGenerator := InjectedRoutesGenerator
@@ -26,6 +26,7 @@ play.modules.enabled += "play.modules.reactivemongo.ReactiveMongoModule"
# Simple configuration (by URI)
mongodb.uri = "mongodb://localhost:27017/reactivemongo-demo-app"
+mongodb.uri = ${?MONGO_URI}
# URI + Authentication
# mongodb.uri = "mongodb://jack:jack@localhost:27017/toto"
@@ -36,4 +37,4 @@ mongodb.uri = "mongodb://localhost:27017/reactivemongo-demo-app"
# If you want to turn on logging for ReactiveMongo, uncomment and customize this line
# logger.reactivemongo=DEBUG
-logger.reactivemongo=INFO
+logger.reactivemongo=INFO
@@ -1 +1 @@
-sbt.version=0.13.7
+sbt.version=0.13.11
View
@@ -2,4 +2,4 @@ resolvers ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
)
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.0")

0 comments on commit 8baa538

Please sign in to comment.