Spock 0.7.5.0 → 0.7.5.1
raw patch · 3 files changed
+6/−4 lines, 3 filesdep ~reroutePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: reroute
API changes (from Hackage documentation)
Files
- Spock.cabal +2/−2
- src/Web/Spock/Internal/CoreAction.hs +2/−2
- test/Web/Spock/FrameworkSpecHelper.hs +2/−0
Spock.cabal view
@@ -1,5 +1,5 @@ name: Spock-version: 0.7.5.0+version: 0.7.5.1 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: fast routing, middleware, json, blaze, sessions, cookies, database helper, csrf-protection Homepage: https://github.com/agrafix/Spock@@ -45,7 +45,7 @@ old-locale >=1.0, path-pieces >=0.1.4, random >=1.0,- reroute >=0.2.1,+ reroute >=0.2.2.1, resource-pool >=0.2, resourcet >= 0.4, stm >=2.4,
src/Web/Spock/Internal/CoreAction.hs view
@@ -231,13 +231,13 @@ -- | Send json as response. Content-Type will be "application/json" json :: (A.ToJSON a, MonadIO m) => a -> ActionT m b json val =- do setHeader "Content-Type" "application/json"+ do setHeader "Content-Type" "application/json; charset=utf-8" lazyBytes $ A.encode val -- | Send blaze html as response. Content-Type will be "text/html" blaze :: MonadIO m => Html -> ActionT m a blaze val =- do setHeader "Content-Type" "text/html"+ do setHeader "Content-Type" "text/html; charset=utf-8" lazyBytes $ renderHtml val -- | Basic authentification
test/Web/Spock/FrameworkSpecHelper.hs view
@@ -27,6 +27,8 @@ get "/param-test/42" `shouldRespondWith` "int42" { matchStatus = 200 } it "can handle multiple matching routes" $ get "/param-test/static" `shouldRespondWith` "static" { matchStatus = 200 }+ it "ignores trailing slashes" $+ get "/param-test/static/" `shouldRespondWith` "static" { matchStatus = 200 } it "works with subcomponents" $ do get "/subcomponent/foo" `shouldRespondWith` "foo" { matchStatus = 200 } get "/subcomponent/subcomponent2/bar" `shouldRespondWith` "bar" { matchStatus = 200 }