Merge branch 'master' into yesod-1.4

This commit is contained in:
Michael Snoyman 2014-08-28 05:19:21 +03:00
commit 9471399589
8 changed files with 20 additions and 7 deletions

View File

@ -1,5 +1,5 @@
name: yesod-auth name: yesod-auth
version: 1.3.4.2 version: 1.3.4.3
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman, Patrick Brisbin author: Michael Snoyman, Patrick Brisbin

View File

@ -1,5 +1,5 @@
name: yesod-bin name: yesod-bin
version: 1.2.12.4 version: 1.2.12.5
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com> author: Michael Snoyman <michael@snoyman.com>
@ -78,7 +78,7 @@ executable yesod
, fsnotify >= 0.0 && < 0.2 , fsnotify >= 0.0 && < 0.2
, split >= 0.2 && < 0.3 , split >= 0.2 && < 0.3
, file-embed , file-embed
, conduit >= 0.5 && < 1.2 , conduit >= 0.5 && < 1.3
, conduit-extra , conduit-extra
, resourcet >= 0.3 && < 1.2 , resourcet >= 0.3 && < 1.2
, base64-bytestring , base64-bytestring

View File

@ -63,6 +63,9 @@ import Text.Blaze.Html.Renderer.Utf8 (renderHtmlBuilder)
import Data.Conduit (Source, Flush (Chunk), ResumableSource, mapOutput) import Data.Conduit (Source, Flush (Chunk), ResumableSource, mapOutput)
import Control.Monad.Trans.Resource (ResourceT) import Control.Monad.Trans.Resource (ResourceT)
import Data.Conduit.Internal (ResumableSource (ResumableSource)) import Data.Conduit.Internal (ResumableSource (ResumableSource))
#if MIN_VERSION_conduit(1, 2, 0)
import qualified Data.Conduit.Internal as CI
#endif
import qualified Data.Aeson as J import qualified Data.Aeson as J
import Data.Aeson.Encode (fromValue) import Data.Aeson.Encode (fromValue)
@ -115,6 +118,11 @@ instance ToContent Css where
instance ToContent Javascript where instance ToContent Javascript where
toContent = toContent . toLazyText . unJavascript toContent = toContent . toLazyText . unJavascript
#if MIN_VERSION_conduit(1, 2, 0)
instance ToFlushBuilder builder => ToContent (CI.Pipe () () builder () (ResourceT IO) ()) where
toContent src = ContentSource $ CI.ConduitM (CI.mapOutput toFlushBuilder src >>=)
#endif
instance ToFlushBuilder builder => ToContent (Source (ResourceT IO) builder) where instance ToFlushBuilder builder => ToContent (Source (ResourceT IO) builder) where
toContent src = ContentSource $ mapOutput toFlushBuilder src toContent src = ContentSource $ mapOutput toFlushBuilder src
instance ToFlushBuilder builder => ToContent (ResumableSource (ResourceT IO) builder) where instance ToFlushBuilder builder => ToContent (ResumableSource (ResourceT IO) builder) where

View File

@ -1,5 +1,5 @@
name: yesod-core name: yesod-core
version: 1.2.19.1 version: 1.2.19.2
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com> author: Michael Snoyman <michael@snoyman.com>

View File

@ -1,5 +1,5 @@
name: yesod-eventsource name: yesod-eventsource
version: 1.1.1 version: 1.1.1.1
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Felipe Lessa <felipe.lessa@gmail.com> author: Felipe Lessa <felipe.lessa@gmail.com>

View File

@ -1,5 +1,5 @@
name: yesod-form name: yesod-form
version: 1.3.15.2 version: 1.3.15.3
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com> author: Michael Snoyman <michael@snoyman.com>

View File

@ -1,6 +1,7 @@
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies #-} {-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies #-}
{-# LANGUAGE EmptyDataDecls, FlexibleContexts, GADTs #-} {-# LANGUAGE EmptyDataDecls, FlexibleContexts, GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE CPP #-}
module Yesod.PersistSpec where module Yesod.PersistSpec where
import Test.Hspec import Test.Hspec
@ -28,7 +29,11 @@ mkYesod "App" [parseRoutes|
instance Yesod App instance Yesod App
instance YesodPersist App where instance YesodPersist App where
#if MIN_VERSION_persistent(2, 0, 0)
type YesodPersistBackend App = SqlBackend type YesodPersistBackend App = SqlBackend
#else
type YesodPersistBackend App = SqlPersistT
#endif
runDB = defaultRunDB appConfig appPool runDB = defaultRunDB appConfig appPool
instance YesodPersistRunner App where instance YesodPersistRunner App where
getDBRunner = defaultGetDBRunner appPool getDBRunner = defaultGetDBRunner appPool

View File

@ -1,5 +1,5 @@
name: yesod-persistent name: yesod-persistent
version: 1.2.3 version: 1.2.3.1
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com> author: Michael Snoyman <michael@snoyman.com>