packages feed

wai-routes 0.9.6 → 0.9.7

raw patch · 3 files changed

+21/−6 lines, 3 filesdep ~aesonPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson

API changes (from Hackage documentation)

+ Network.Wai.Middleware.Routes: Env :: master -> sub -> (Route sub -> Route master) -> Env sub master
+ Network.Wai.Middleware.Routes: [envMaster] :: Env sub master -> master
+ Network.Wai.Middleware.Routes: [envSub] :: Env sub master -> sub
+ Network.Wai.Middleware.Routes: [envToMaster] :: Env sub master -> Route sub -> Route master
+ Network.Wai.Middleware.Routes: currentRoute :: RequestData master -> Maybe (Route master)
+ Network.Wai.Middleware.Routes: data Env sub master
+ Network.Wai.Middleware.Routes: readRoute :: ParseRoute master => Text -> Maybe (Route master)
+ Network.Wai.Middleware.Routes: showRoute :: RenderRoute master => Route master -> Text
+ Network.Wai.Middleware.Routes: showRouteQuery :: RenderRoute master => Route master -> [(Text, Text)] -> Text

Files

README.md view
@@ -1,4 +1,4 @@-[Wai-Routes](https://ajnsit.github.io/wai-routes) [![Hackage](https://img.shields.io/badge/hackage-v0.9.6-brightgreen.svg)](https://hackage.haskell.org/package/wai-routes) [![Hackage-Deps](https://img.shields.io/hackage-deps/v/wai-routes.svg)](http://packdeps.haskellers.com/feed?needle=wai-routes) [![Build Status](https://img.shields.io/travis/ajnsit/wai-routes.svg)](https://travis-ci.org/ajnsit/wai-routes) [![Join the chat at https://gitter.im/ajnsit/wai-routes](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%A3-blue.svg)](https://gitter.im/ajnsit/wai-routes)+[Wai-Routes](https://ajnsit.github.io/wai-routes) [![Hackage](https://img.shields.io/badge/hackage-v0.9.7-brightgreen.svg)](https://hackage.haskell.org/package/wai-routes) [![Hackage-Deps](https://img.shields.io/hackage-deps/v/wai-routes.svg)](http://packdeps.haskellers.com/feed?needle=wai-routes) [![Build Status](https://img.shields.io/travis/ajnsit/wai-routes.svg)](https://travis-ci.org/ajnsit/wai-routes) [![Join the chat at https://gitter.im/ajnsit/wai-routes](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%A3-blue.svg)](https://gitter.im/ajnsit/wai-routes) ====================================  Wai-routes is a micro web framework for Haskell that focuses on typesafe URLs.@@ -71,7 +71,10 @@  Demonstrates "unrouted" applications. These require no TH, or GHC extensions. Basically allow you to sequence request handlers in a cascade, with each handler having the full functionality of HandlerM monad available to them. Each handler also has access to untyped (but parsed) route information. Unrouted handlers are freely mixable with typesafe routing. +**Example 9. Typesafe "Bare" Wai routing** - [Code](https://github.com/ajnsit/wai-routes/tree/master/examples/bare-wai/src) +Demonstrates writing no-overhead "bare" wai applications with routing. Wai-routes handlers are simple functions that return wai responses. This means that you are free to use typesafe routing, but without using runHandlerM, instead accessing the master datatype and the route args as arguments passed to the handler function.+ Deployment ========== @@ -109,6 +112,7 @@ Changelog ========= +* 0.9.7 : Allow Aeson-0.11. Export Env, RequestData, and show/readRoute to enable "bare" handlers. * 0.9.6 : Subsites now receive parent route arguments, in line with regular nested routes * 0.9.5 : Subsites now play well with hierarchical routes * 0.9.4 : Wai-3.2 compatibility. Added functions to manipulate wai "vault". Minor changes to internal types.
src/Network/Wai/Middleware/Routes.hs view
@@ -23,6 +23,9 @@     , routeDispatch      -- * URL rendering and parsing+    , showRoute+    , showRouteQuery+    , readRoute     , showRouteMaster     , showRouteQueryMaster     , readRouteMaster@@ -103,6 +106,14 @@     , reqVault               -- | Access the vault from the request     , lookupVault            -- | Lookup a key in the request vault     , updateVault            -- | Update the request vault++    -- * Bare Handlers+    , Env(..)+    , RequestData            -- | An abstract representation of the request data. You can get the wai request object by using `waiReq`+    , waiReq                 -- | Extract the wai `Request` object from `RequestData`+    , nextApp                -- | Extract the next Application in the stack+    , currentRoute           -- | Extract the current `Route` from `RequestData`+    , runNext                -- | Run the next application in the stack      , module Network.HTTP.Types.Status     , module Network.Wai.Middleware.RequestLogger
wai-routes.cabal view
@@ -1,5 +1,5 @@ name               : wai-routes-version            : 0.9.6+version            : 0.9.7 cabal-version      : >=1.18 build-type         : Simple license            : MIT@@ -21,8 +21,8 @@  source-repository this     type     : git-    location : http://github.com/ajnsit/wai-routes/tree/v0.9.6-    tag      : v0.9.6+    location : http://github.com/ajnsit/wai-routes/tree/v0.9.7+    tag      : v0.9.7  library     build-depends      : base               >= 4.7  && < 4.9@@ -32,7 +32,7 @@                        , text               >= 1.2  && < 1.3                        , template-haskell   >= 2.9  && < 2.12                        , mtl                >= 2.1  && < 2.3-                       , aeson              >= 0.8  && < 0.11+                       , aeson              >= 0.8  && < 0.12                        , containers         >= 0.5  && < 0.6                        , random             >= 1.1  && < 1.2                        , path-pieces        >= 0.2  && < 0.3@@ -78,7 +78,7 @@    build-depends    : base           >= 4.7 && < 4.9                    , wai            >= 3.0 && < 3.3-                   , aeson          >= 0.8 && < 0.11+                   , aeson          >= 0.8 && < 0.12                    , hspec          >= 2.1 && < 2.3                    , hspec-wai      >= 0.6 && < 0.7                    , hspec-wai-json >= 0.6 && < 0.7