packages feed

hack2-handler-mongrel2-http-2011.6.24: Nemesis

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

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


  desc "put all .hs files in manifest"
  task "manifest" - do
    sh "find . | grep 'hs-' > manifest"


  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 "show sloc"
  task "stat" - do
    sh "cloc -match-f=hs- --quiet src"
  
  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 "m2sh start -name test"