packages feed

hack2-handler-mongrel2-http-2011.6.25: Nemesis

nemesis = do
  
  clean
    [ "**/*.hi"
    , "**/*.o"
    , "main"
    , "nemesis-tmp.*"
    ]
  

  desc "prepare cabal dist"
  task "dist" - do
    sh "cabal clean"
    sh "cabal configure"
    sh "cabal sdist"

  desc "start console"
  task "i" (sh "ghci -isrc test/hello.hs")
  
  desc "run main"
  task "run" (sh "runghc -isrc test/hello.hs")

  desc "test hello"
  task "hello" - do
    sh "runghc test/hello.hs"

  desc "test ab"
  task "ab" - do
    sh "runghc -isrc test/ab.hs"

  
  desc "load mongrel config from config/test.conf"
  task "load" - do
    sh "m2sh load -config config/test.conf"
  
  desc "list mongrel2 servers"
  task "list" - do
    sh "m2sh servers"
  
  desc "start mongrel2 server"
  task "start" - do
    sh "mkdir -p run"
    sh "mkdir -p logs"
    sh "mkdir -p tmp"
    sh "m2sh start -name test"