packages feed

Spock 0.6.1.1 → 0.6.1.2

raw patch · 2 files changed

+8/−9 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Spock.cabal view
@@ -1,5 +1,5 @@ name:                Spock-version:             0.6.1.1+version:             0.6.1.2 synopsis:            Another Haskell web framework for rapid development description:         This toolbox provides everything you need to get a quick start into web hacking with haskell: routing, middleware, json, blaze, sessions, cookies, database helper, csrf-protection, global state Homepage:            https://github.com/agrafix/Spock
src/Web/Spock/Wire.hs view
@@ -150,10 +150,9 @@                     Just routeTree ->                         case matchRoute' (Wai.pathInfo req) routeTree of                           Just (captures, action) ->-                              do (bodyParams, bodyFiles) <--                                     runResourceT $-                                     withInternalState $ \st ->-                                         P.parseRequestBody (P.tempFileBackEnd st) req+                              runResourceT $+                              withInternalState $ \st ->+                              do (bodyParams, bodyFiles) <- P.parseRequestBody (P.tempFileBackEnd st) req                                  let uploadedFiles =                                          HM.fromList $                                          map (\(k, fileInfo) ->@@ -168,15 +167,15 @@                                      queryParams = postParams ++ getParams                                      env = RequestInfo req captures queryParams uploadedFiles                                      resp = errorResponse status200 ""-                                 (respState, _) <-+                                 (respState, _) <- liftIO $                                      (spockLift $ execRWST (runActionT action) env resp)                                      `catch` \(e :: SomeException) ->                                          do putStrLn $ "Spock Error: " ++ show e                                             return (serverError, ())                                  forM_ (HM.elems uploadedFiles) $ \uploadedFile ->                                      do stillThere <- doesFileExist (uf_tempLocation uploadedFile)-                                        when stillThere $ removeFile (uf_tempLocation uploadedFile)-                                 respond $ respStateToResponse respState+                                        when stillThere $ liftIO $ removeFile (uf_tempLocation uploadedFile)+                                 liftIO $ respond $ respStateToResponse respState                           Nothing ->                               respond notFound                     Nothing ->@@ -235,7 +234,7 @@            execRWST (runSpockT defs) (parentRoute `combineRoute` baseRoute) initState        modify $ \st ->            st-           { ss_treeMap = HM.union (ss_treeMap st) (ss_treeMap finalState)+           { ss_treeMap = HM.unionWith HM.union (ss_treeMap st) (ss_treeMap finalState)            , ss_middleware = (ss_middleware finalState) . (ss_middleware st)            }