Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2017-07-06 00:03:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-wai-extra"

Thu Jul  6 00:03:44 2017 rev:18 rq:508042 version:3.0.20.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes      
2017-02-11 01:42:23.638759056 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2017-07-06 00:03:45.679240829 +0200
@@ -1,0 +2,5 @@
+Sun Jun 25 18:41:33 UTC 2017 - [email protected]
+
+- Update to version 3.0.20.0.
+
+-------------------------------------------------------------------

Old:
----
  wai-extra-3.0.19.1.tar.gz

New:
----
  wai-extra-3.0.20.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-wai-extra.spec ++++++
--- /var/tmp/diff_new_pack.7ADjWu/_old  2017-07-06 00:03:46.435134341 +0200
+++ /var/tmp/diff_new_pack.7ADjWu/_new  2017-07-06 00:03:46.439133777 +0200
@@ -19,7 +19,7 @@
 %global pkg_name wai-extra
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        3.0.19.1
+Version:        3.0.20.0
 Release:        0
 Summary:        Provides some basic WAI handlers and middleware
 License:        MIT

++++++ wai-extra-3.0.19.1.tar.gz -> wai-extra-3.0.20.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19.1/ChangeLog.md 
new/wai-extra-3.0.20.0/ChangeLog.md
--- old/wai-extra-3.0.19.1/ChangeLog.md 2017-01-17 12:29:22.000000000 +0100
+++ new/wai-extra-3.0.20.0/ChangeLog.md 2017-06-22 18:16:39.000000000 +0200
@@ -1,3 +1,7 @@
+## 3.0.20.0
+
+* runSessionWith (runSession variant that gives access to ClientState) 
[#629](https://github.com/yesodweb/wai/pull/629)
+
 ## 3.0.19.1
 
 * All loggers follow the autoFlush setting 
[#604](https://github.com/yesodweb/wai/pull/604)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.19.1/Network/Wai/Middleware/MethodOverride.hs 
new/wai-extra-3.0.20.0/Network/Wai/Middleware/MethodOverride.hs
--- old/wai-extra-3.0.19.1/Network/Wai/Middleware/MethodOverride.hs     
2017-01-17 12:29:22.000000000 +0100
+++ new/wai-extra-3.0.20.0/Network/Wai/Middleware/MethodOverride.hs     
2017-06-01 14:48:32.000000000 +0200
@@ -5,12 +5,11 @@
 import Network.Wai
 import Control.Monad (join)
 
--- | Allows overriding of the HTTP request method via the _method query string
--- parameter.
+-- | Overriding of HTTP request method via `_method` query string parameter.
 --
--- This middleware only applies when the initial request method is POST. This
--- allow submitting of normal HTML forms, without worries of semantics
--- mismatches in the HTTP spec.
+-- This middleware only applies when the initial request method is POST.
+-- Allows submitting of normal HTML forms, without worries of semantic
+-- mismatches with the HTTP spec.
 methodOverride :: Middleware
 methodOverride app req =
     app req'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19.1/Network/Wai/Test/Internal.hs 
new/wai-extra-3.0.20.0/Network/Wai/Test/Internal.hs
--- old/wai-extra-3.0.19.1/Network/Wai/Test/Internal.hs 1970-01-01 
01:00:00.000000000 +0100
+++ new/wai-extra-3.0.20.0/Network/Wai/Test/Internal.hs 2017-06-22 
18:16:39.000000000 +0200
@@ -0,0 +1,35 @@
+module Network.Wai.Test.Internal where
+
+import Network.Wai
+import qualified Control.Monad.Trans.State as ST
+import Control.Monad.Trans.Reader (ReaderT, runReaderT)
+import Data.Map (Map)
+import qualified Data.Map as Map
+import qualified Web.Cookie as Cookie
+import Data.ByteString (ByteString)
+
+type Session = ReaderT Application (ST.StateT ClientState IO)
+
+-- |
+--
+-- Since 3.0.6
+type ClientCookies = Map ByteString Cookie.SetCookie
+
+data ClientState = ClientState
+    { clientCookies :: ClientCookies
+    }
+
+-- |
+--
+-- Since 3.0.20.0
+initState :: ClientState
+initState = ClientState Map.empty
+
+-- | Like 'runSession', but if allows you to hand in cookies and get
+-- the updated cookies back.  One use case for this is writing tests
+-- that address the application under test alternatingly through rest
+-- api and through db handle.
+--
+-- Since 3.0.20.0
+runSessionWith :: ClientState -> Session a -> Application -> IO (a, 
ClientState)
+runSessionWith st session app = ST.runStateT (runReaderT session app) st
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19.1/Network/Wai/Test.hs 
new/wai-extra-3.0.20.0/Network/Wai/Test.hs
--- old/wai-extra-3.0.19.1/Network/Wai/Test.hs  2017-01-17 12:29:22.000000000 
+0100
+++ new/wai-extra-3.0.20.0/Network/Wai/Test.hs  2017-06-22 18:16:39.000000000 
+0200
@@ -39,15 +39,15 @@
 
 import Network.Wai
 import Network.Wai.Internal (ResponseReceived (ResponseReceived))
+import Network.Wai.Test.Internal
 import Control.Monad.IO.Class (liftIO)
 import Control.Monad.Trans.Class (lift)
 import qualified Control.Monad.Trans.State as ST
-import Control.Monad.Trans.Reader (ReaderT, runReaderT, ask)
+import Control.Monad.Trans.Reader (runReaderT, ask)
 import Control.Monad (unless)
 import Control.DeepSeq (deepseq)
 import Control.Exception (throwIO, Exception)
 import Data.Typeable (Typeable)
-import Data.Map (Map)
 import qualified Data.Map as Map
 import qualified Web.Cookie as Cookie
 import Data.ByteString (ByteString)
@@ -64,17 +64,6 @@
 import Data.IORef
 import Data.Time.Clock (getCurrentTime)
 
-type Session = ReaderT Application (ST.StateT ClientState IO)
-
--- |
---
--- Since 3.0.6
-type ClientCookies = Map ByteString Cookie.SetCookie
-
-data ClientState = ClientState
-    { clientCookies :: ClientCookies
-    }
-
 -- |
 --
 -- Since 3.0.6
@@ -104,9 +93,7 @@
   modifyClientCookies
     (Map.delete cookieName)
 
-initState :: ClientState
-initState = ClientState Map.empty
-
+-- | See also: 'runSessionWith'.
 runSession :: Session a -> Application -> IO a
 runSession session app = ST.evalStateT (runReaderT session app) initState
 
@@ -337,4 +324,3 @@
           ]
         )
         (Cookie.setCookieValue c == cookieValue)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19.1/wai-extra.cabal 
new/wai-extra-3.0.20.0/wai-extra.cabal
--- old/wai-extra-3.0.19.1/wai-extra.cabal      2017-01-17 12:29:22.000000000 
+0100
+++ new/wai-extra-3.0.20.0/wai-extra.cabal      2017-06-22 18:16:39.000000000 
+0200
@@ -1,5 +1,5 @@
 Name:                wai-extra
-Version:             3.0.19.1
+Version:             3.0.20.0
 Synopsis:            Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:
@@ -148,6 +148,7 @@
                      Network.Wai.Request
                      Network.Wai.UrlMap
                      Network.Wai.Test
+                     Network.Wai.Test.Internal
                      Network.Wai.EventSource
                      Network.Wai.EventSource.EventStream
   other-modules:     Network.Wai.Middleware.RequestLogger.Internal


Reply via email to