okomok さんの ken の 以下のtree 0.1.0-SNAPSHOT を使用 https://github.com/okomok/ken/tree/805ac5ed607b0b9a8377fdf552d09d29d7952dc4
https://twitter.com/#!/tanakh/status/156665941156036608 http://nagoyascala.yoshihiro503.cloudbees.net/bbs/thread/114001
import scala.language.postfixOps | |
import java.io._ | |
import scalaj.http._ | |
import scalaz._, Scalaz._ | |
import scalaz.effect._, Effect._, IO._ | |
import scalaz.concurrent.Promise |
#!/usr/bin/env ruby | |
require 'octokit' | |
require 'csv' | |
user_login = 'username' | |
user_password = 'password' | |
organization = 'git-dojo' | |
csv_file = ARGV.first || abort("Usage: #{$0} <csv-file>") |
def index(id:String) = Action { | |
getFirstData(id) | |
} | |
private def getFirstData(id:String) = { | |
Cache.get(id) match { | |
case Some(id2) => getSecondData(id2) | |
case None => NotFound | |
} | |
} | |
private def getSecondData(id2:String) = { |
import scala.util.DynamicVariable | |
import scala.collection.immutable | |
import grizzled.slf4j.Logging | |
trait LoggingEx extends Logging { | |
private val msgs = new DynamicVariable[Seq[String]](immutable.Queue.empty) | |
private def withScope[T](msg: String, logger: (=> Any, => Throwable) => Unit, f: => T): T = { | |
val newMsgs = msgs.value :+ msg |