This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| salat-core:master:0.0.8-SNAPSHOT> test:console | |
| [info] Formatting 2 Scala sources {file:/home/rose/workspace/salat/}salat-core(test)... | |
| [info] Compiling 2 Scala sources to /home/rose/workspace/salat/salat-core/target/scala-2.8.1.final/test-classes... | |
| [info] Starting scala interpreter... | |
| [info] | |
| Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import com.novus.salat._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Format { | |
| import com.typesafe.sbtscalariform.ScalariformPlugin | |
| import ScalariformPlugin._ | |
| lazy val settings = seq(scalariformSettings: _*) ++ Seq( | |
| preferences = formattingPreferences | |
| ) | |
| lazy val formattingPreferences = { | |
| import scalariform.formatter.preferences._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.novus.salat.test.model | |
| import com.novus.salat._ | |
| import com.novus.salat.annotations._ | |
| import com.mongodb.casbah.Imports._ | |
| case class Bar(email: String) | |
| case class Foo[X](jobId: String, bar: Bar, x: Set[X] = Set.empty) { | |
| @Persist @Key("_id") val guid = jobId + bar.email | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| salat-core:master:0.0.8-SNAPSHOT> test:console | |
| [info] Starting scala interpreter... | |
| [info] | |
| Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import com.novus.salat._ | |
| import com.novus.salat._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package foo | |
| case class Bar(x: Int, y: Int, z: Int) | |
| object ListHarness { | |
| def time[T](f: => T)(l: Long => Unit): T = { | |
| val t = System.currentTimeMillis | |
| val r = f | |
| l.apply(System.currentTimeMillis - t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scala> import com.novus.salat.test.dao._ | |
| import com.novus.salat.test.dao._ | |
| scala> import com.novus.salat._ | |
| import com.novus.salat._ | |
| scala> import com.novus.salat.test._ | |
| import com.novus.salat.test._ | |
| scala> import com.novus.salat.global._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| salat:master:0.0.8-SNAPSHOT> project salat-core | |
| [info] Set current project to salat-core (in build file:/home/rose/workspace/salat/) | |
| salat-core:master:0.0.8-SNAPSHOT> test:console | |
| [info] Starting scala interpreter... | |
| [info] | |
| Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import com.novus.salat._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.scalatest.FunSuite | |
| import com.novus.salat.annotations.Key | |
| import org.bson.types.ObjectId | |
| import org.specs2.specification.BeforeAfter | |
| import org.scalatest.BeforeAndAfter | |
| import com.novus.salat.dao.SalatDAO | |
| import com.mongodb.casbah.MongoConnection | |
| import org.junit.runner.RunWith | |
| import org.scalatest.junit.JUnitRunner | |
| //import com.novus.salat.global._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rose@marzipan:~/workspace/salat (master)$ sbt | |
| salat:master:0.0.8-SNAPSHOT> project salat-core | |
| [info] Set current project to salat-core (in build file:/home/rose/workspace/salat/) | |
| salat-core:master:0.0.8-SNAPSHOT> test:console | |
| scala> import com.mongodb.casbah._ | |
| import com.mongodb.casbah._ | |
| scala> import com.novus.salat.grater | |
| import com.novus.salat.grater |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package model | |
| import com.novus.salat.global._ | |
| import com.novus.salat.annotations._ | |
| import com.novus.salat.dao.SalatDAO | |
| case class Gossip(@Key("_id") id: org.bson.types.ObjectId, | |
| title: String, | |
| link: String = "", | |
| description: String, |