Skip to content

Instantly share code, notes, and snippets.

View gsmaverick's full-sized avatar

Gavin Schulz gsmaverick

  • San Francisco, CA
View GitHub Profile
// Simple unit testing in wren.
class Spec {
new(description, body) {
_description = description
if (_body.type == Fiber){
_body = body
} else {
_body = new Fiber(body)
case class S3File(id: String, path: String)
object S3File {
implicit def s3FileFormat: Format[S3File] = Json.format[S3File]
def generateSignedLink(path: String): String = ???
}
import S3File
object HelloWorldController extends Controller {
def index = {
val file = S3File("id", "path/to/file")
val json = Json.toJson(file)(S3File.linkSigningS3FileWrites)
Ok(json)
}
}