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 backchat | |
package web | |
package auth | |
import model.User | |
import org.scalatra.auth.{ ScentryConfig, ScentrySupport } | |
import org.scalatra.ScalatraKernel | |
import org.scalatra.auth.strategy.BasicAuthSupport | |
/** |
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
{ | |
"id":"source:twitter/5f08d6b0-e2ce-11e0-bbc2-005056c00008", | |
"occurredAt":"2011-09-05T11:56:43.000Z", | |
"actor":{ | |
"objectType":"person", | |
"id":"ro2cket", | |
"displayName":"Skunk Works", | |
"published":"2010-12-21T19:13:52.000Z", | |
"image":{ | |
"url":"http://a0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" |
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
#!/bin/sh | |
curr=`dirname $0`/dist | |
cp=`echo $(pwd)/$curr/*.jar|sed 's/ /:/g'` | |
echo "the classpath:" | |
echo $cp | |
exec scala -classpath $cp $0 $@ | |
!# |
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
target |
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 javax.servlet.annotation._ | |
import grizzled.generator._ | |
import scala.annotation._ | |
import scala.util.Random | |
trait Request | |
case object Request extends Request | |
trait Handler extends (Request => Response) |
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
trait HandlerArgs { | |
def isInitial: Boolean | |
} | |
case object InitialArgs { val isInitial = true } | |
case object ContinuationArgs { val isInitial = false } | |
class Handler extends ((Request, HandlerArgs) => Response) | |
class Middleware extends (Handler => Handler) |
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
<dependencies> | |
<exclude module="lift-common_2.9.0-1" /> | |
<exclude module="lift-actor_2.9.0-1" /> | |
<exclude module="lift-framework_2.9.0-1" /> | |
<exclude module="lift-record_2.9.0-1" /> | |
<exclude module="lift-util_2.9.0-1" /> | |
<exclude module="lift-webkit_2.9.0-1" /> | |
<exclude module="lift-json_2.9.0-1" /> | |
<exclude module="lift-json-ext_2.9.0-1" /> | |
<exclude module="lift-mongodb-record_2.9.0-1" /> |
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 PfExample { | |
val Path = """/users/(.*)""".re // pretty non-sensical in real life | |
def handleRequest: PartialFunction[Response] = { | |
case Path(theUserId) => { | |
// do heaps of stuff | |
// create response | |
} | |
} |
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
#!/bin/sh | |
mkdir -p $WORKSPACE/project/boot/scala-2.8.1/org.scala-tools.sbt/sbt/0.10.1/extra | |
mkdir -p $WORKSPACE/../sbt/plugins/project | |
cp $HOME/share/java/*.jar $WORKSPACE/project/boot/scala-2.8.1/org.scala-tools.sbt/sbt/0.10.1/extra | |
cp $HOME/.sbt/plugins/Jenkins.scala $WORKSPACE/../sbt/plugins | |
cp $HOME/.sbt/plugins/project/build.scala $WORKSPACE/../sbt/plugins/project | |
java -Xms512m -Xmx2048m -XX:ReservedCodeCacheSize=256m -XX:MaxPermSize=512m -Xss8m -XX:+CMSClassUnloadingEnabled -Dsbt.global.base=$WORKSPACE/../sbt -Dfile.encoding='UTF-8' -Dsbt.ivy.home=$WORKSPACE/project/ivy2 -Dsbt.log.noformat=true -jar `dirname $0`/sbt-launch.jar "$@" |
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 mojolly | |
package mongo | |
package tests | |
import org.specs2.Specification | |
import org.specs2.specification.{ Step, Fragments } | |
import net.liftweb.mongodb._ | |
import mongo.MongoConfig.MongoConfiguration | |
trait LiftMongoDbSpecification extends Specification { |