packages feed

wai-session-postgresql 0.1.1.0 → 0.1.1.1

raw patch · 3 files changed

+22/−5 lines, 3 filesdep +data-defaultdep +wai-session-postgresqldep −postgresql-sessiondep ~cerealdep ~postgresql-simplePVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependencies added: data-default, wai-session-postgresql

Dependencies removed: postgresql-session

Dependency ranges changed: cereal, postgresql-simple

API changes (from Hackage documentation)

+ Network.Wai.Session.PostgreSQL: instance Data.Default.Class.Default Network.Wai.Session.PostgreSQL.StoreSettings

Files

+ changelog.md view
@@ -0,0 +1,11 @@+0.1.1.1 / 2016-01-01+--------------------++- Make compatible with postgresql-simple-0.5+- Add instance for Data.Default+- Improve example++0.1.1.0 / 2015-11-25+--------------------++- Add clearSession function force assigning a new session/session ID
src/Network/Wai/Session/PostgreSQL.hs view
@@ -14,6 +14,7 @@ import Control.Exception import Control.Monad import Control.Monad.IO.Class+import Data.Default import Data.Int (Int64) import Data.Serialize (encode, decode, Serialize) import Data.String (fromString)@@ -51,6 +52,9 @@     , storeSettingsPurgeInterval :: Int     } +instance Default StoreSettings where+    def = defaultSettings+ -- |By default, you pass a postgresql connection to the session store -- when creating it. The passed connection will have to stay open -- for the (possibly very long) existence of the session and it should@@ -141,7 +145,7 @@         _           -> dbStore' pool stos Nothing  -- |This function can be called to invalidate a session and enforce creating--- a new one with a new session ID. It should be called *before* and calls+-- a new one with a new session ID. It should be called *before* any calls -- to sessionStore are made. It needs to be passed a request and the cookie -- name explicitly due to the limited nature of the Network.Wai.Session -- interface.
wai-session-postgresql.cabal view
@@ -1,5 +1,5 @@ name:                wai-session-postgresql-version:             0.1.1.0+version:             0.1.1.1 synopsis:            PostgreSQL backed Wai session store description:         Provides a PostgreSQL backed session store for the Network.Wai.Session interface. homepage:            https://github.com/hce/postgresql-session#readme@@ -14,16 +14,18 @@ category:            Web build-type:          Simple cabal-version:       >=1.10+extra-source-files:  changelog.md  library   hs-source-dirs:      src   exposed-modules:     Network.Wai.Session.PostgreSQL   build-depends:       base >= 4.7 && < 5                      , bytestring >= 0.10.6 && < 0.11-                     , cereal >= 0.4.1 && < 0.5+                     , cereal >= 0.4.1 && < 0.6                      , cookie >= 0.4.1 && < 0.5+                     , data-default >= 0.5.3 && < 0.6                      , entropy >= 0.3.7 && < 0.4-                     , postgresql-simple >= 0.4.10 && < 0.5+                     , postgresql-simple >= 0.4.10 && < 0.6                      , text >= 1.2.1 && < 1.3                      , time >= 1.5.0 && < 1.6                      , transformers >= 0.4.2 && < 0.5@@ -37,7 +39,7 @@   hs-source-dirs:      test   main-is:             Spec.hs   build-depends:       base-                     , postgresql-session+                     , wai-session-postgresql   ghc-options:         -threaded -rtsopts -with-rtsopts=-N   default-language:    Haskell2010