From d1697a3fde3f1e07a742609daaecaa13b414b139 Mon Sep 17 00:00:00 2001 From: Aleksey Uimanov Date: Fri, 2 Dec 2016 15:55:09 +0500 Subject: [PATCH 1/4] export toWaiAppYre --- yesod-core/Yesod/Core/Dispatch.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/yesod-core/Yesod/Core/Dispatch.hs b/yesod-core/Yesod/Core/Dispatch.hs index c220ecec..3c0afe77 100644 --- a/yesod-core/Yesod/Core/Dispatch.hs +++ b/yesod-core/Yesod/Core/Dispatch.hs @@ -24,6 +24,7 @@ module Yesod.Core.Dispatch -- * Convert to WAI , toWaiApp , toWaiAppPlain + , toWaiAppYre , warp , warpDebug , warpEnv From 2bd3a936c989fe3a440f4208a09589b4bd670d23 Mon Sep 17 00:00:00 2001 From: Aleksey Uimanov Date: Fri, 2 Dec 2016 16:26:19 +0500 Subject: [PATCH 2/4] fix blaze-markup version bounds --- yesod-core/yesod-core.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index 0057f89a..a975d0fe 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -56,7 +56,7 @@ library , resourcet >= 0.4.9 && < 1.2 , lifted-base >= 0.1.2 , blaze-html >= 0.5 - , blaze-markup >= 0.5.1 + , blaze-markup >= 0.7.1 , data-default , safe , warp >= 3.0.2 From 47ef36012df473a071707afd88cc50d378681bca Mon Sep 17 00:00:00 2001 From: Aleksey Uimanov Date: Mon, 5 Dec 2016 19:33:04 +0500 Subject: [PATCH 3/4] export `getGetMaxExpires` --- yesod-core/Yesod/Core/Dispatch.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yesod-core/Yesod/Core/Dispatch.hs b/yesod-core/Yesod/Core/Dispatch.hs index 3c0afe77..5d5c5193 100644 --- a/yesod-core/Yesod/Core/Dispatch.hs +++ b/yesod-core/Yesod/Core/Dispatch.hs @@ -17,6 +17,8 @@ module Yesod.Core.Dispatch , mkYesodSubData , mkYesodDispatch , mkYesodSubDispatch + -- *** Helpers + , getGetMaxExpires -- ** Path pieces , PathPiece (..) , PathMultiPiece (..) From 80f0b3cd707703470d73df1c7319466c1f063de9 Mon Sep 17 00:00:00 2001 From: Aleksey Uimanov Date: Wed, 7 Dec 2016 14:04:51 +0500 Subject: [PATCH 4/4] Add comments and bump minor version to 1.4.29 --- yesod-core/Yesod/Core/Dispatch.hs | 9 +++++++++ yesod-core/yesod-core.cabal | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/yesod-core/Yesod/Core/Dispatch.hs b/yesod-core/Yesod/Core/Dispatch.hs index 5d5c5193..17674268 100644 --- a/yesod-core/Yesod/Core/Dispatch.hs +++ b/yesod-core/Yesod/Core/Dispatch.hs @@ -96,6 +96,11 @@ toWaiAppPlain site = do , yreGetMaxExpires = getMaxExpires } +-- | Pure low level function to construct WAI application. Usefull +-- when you need not standard way to run your app, or want to embed it +-- inside another app. +-- +-- @since 1.4.29 toWaiAppYre :: YesodDispatch site => YesodRunnerEnv site -> W.Application toWaiAppYre yre req = case cleanPath site $ W.pathInfo req of @@ -240,6 +245,10 @@ warpEnv site = do Nothing -> error $ "warpEnv: invalid PORT environment variable: " ++ show portS Just port -> warp port site +-- | Default constructor for 'yreGetMaxExpires' field. Low level +-- function for simple manual construction of 'YesodRunnerEnv'. +-- +-- @since 1.4.29 getGetMaxExpires :: IO (IO Text) getGetMaxExpires = mkAutoUpdate defaultUpdateSettings { updateAction = getCurrentMaxExpiresRFC1123 diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index a975d0fe..f2a34d91 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -1,5 +1,5 @@ name: yesod-core -version: 1.4.28 +version: 1.4.29 license: MIT license-file: LICENSE author: Michael Snoyman