Browse files

turn into object

  • Loading branch information...
1 parent 8c29dd2 commit 46166873898a62df2f5167604de32ca7173987e2 @upeter upeter committed Apr 19, 2012
View
2 xke-ng-web/src/main/scala/bootstrap/liftweb/Boot.scala
@@ -26,7 +26,7 @@ class Boot {
val enableSecurity = Props.get("enable.secruity").map(_.trim.toBoolean).getOrElse(true)
purgeAndPushTestdata(purge)
- LiftRules.exceptionHandler.prepend(new ExceptionHandlerAssembly)
+ LiftRules.exceptionHandler.prepend(ExceptionHandlerAssembly)
if (enableSecurity) {
LiftRules.dispatch.append(new XKENGPublicAPIAssembly)
} else {
View
15 xke-ng-web/src/main/scala/com/xebia/xkeng/rest/Assembly.scala
@@ -35,16 +35,9 @@ object Assembly extends Logger {
}
trait RestHandlerComponentImpl extends RestHandlerComponent with RepositoryComponentImpl
-
- object XKENGSecuredAPIAssembly extends XKENGSecuredAPI with RestHandlerComponentImpl {
-
- }
-
- class XKENGPublicAPIAssembly extends XKENGPublicAPI with RestHandlerComponentImpl {
-
- }
-
- class ExceptionHandlerAssembly extends ExceptionHandler {}
+ object XKENGSecuredAPIAssembly extends XKENGSecuredAPI with RestHandlerComponentImpl
+ class XKENGPublicAPIAssembly extends XKENGPublicAPI with RestHandlerComponentImpl
+ object ExceptionHandlerAssembly extends ExceptionHandler
def init() = {
initMongoDB()
@@ -58,7 +51,7 @@ object Assembly extends Logger {
info("MongoDB properties= " + mo)
MongoDB.defineDb(DefaultMongoIdentifier, new Mongo(srvr, mo), Props.get("mongo.db.name").getOrElse("xkeng"))
ensureIndexes()
-
+
//Unittests with maven fail when indexes are ensured in ConferenceMetaData class. Here it works...
def ensureIndexes() {
Conference.ensureIndex(("begin" -> 1))

0 comments on commit 4616687

Please sign in to comment.