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 model._ | |
import model._ | |
scala> val afghanistan = JSONCountry("9c5bae60-4d6f-e111-afed-00155d6f0a00", "Afghanistan") | |
afghanistan: model.JSONCountry = JSONCountry(9c5bae60-4d6f-e111-afed-00155d6f0a00,Afghanistan) | |
scala> val j = JSONData(afghanistan :: Nil) | |
j: model.JSONData = JSONData(List(JSONCountry(9c5bae60-4d6f-e111-afed-00155d6f0a00,Afghanistan))) | |
scala> j.toJSON |
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 model._ | |
import model._ | |
scala> val afghanistan = JSONCountry("9c5bae60-4d6f-e111-afed-00155d6f0a00", "Afghanistan") | |
afghanistan: model.JSONCountry = JSONCountry(9c5bae60-4d6f-e111-afed-00155d6f0a00,Afghanistan) | |
scala> val j = JSONData(afghanistan :: Nil) | |
j: model.JSONData = JSONData(List(JSONCountry(9c5bae60-4d6f-e111-afed-00155d6f0a00,Afghanistan))) | |
scala> j.toJSON |
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 org.joda.time.DateTime | |
import org.bson.types.ObjectId | |
import com.novus.salat.annotations._ | |
import com.novus.salat.dao.SalatDAO | |
import com.mongodb.casbah.Imports._ | |
object Section { | |
def subSections(s: Section) = SectionDAO.subSections(s.id) |
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, |
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
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
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
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
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
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._ |