Merge branch 'master' into yesod-1.4

This commit is contained in:
Michael Snoyman 2014-09-21 21:55:02 +03:00
commit 343335f00e
6 changed files with 77 additions and 36 deletions

View File

@ -96,7 +96,14 @@ makeFoundation conf = do
(getter, _) <- clockDateCacher
let logger = Yesod.Core.Types.Logger loggerSet' getter
foundation = App conf s p manager dbconf logger
foundation = App
{ settings = conf
, getStatic = s
, connPool = p
, httpManager = manager
, persistConfig = dbconf
, appLogger = logger
}
return foundation
@ -453,7 +460,7 @@ executable PROJECTNAME
test-suite test
type: exitcode-stdio-1.0
main-is: main.hs
hs-source-dirs: tests
hs-source-dirs: test
ghc-options: -Wall
build-depends: base
@ -8021,7 +8028,7 @@ h2##{aDomId} {
color: #990
}
{-# START_FILE tests/HomeTest.hs #-}
{-# START_FILE test/HomeTest.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module HomeTest
( homeSpecs
@ -8043,7 +8050,7 @@ homeSpecs =
setMethod "POST"
setUrl HomeR
addNonce
fileByLabel "Choose a file" "tests/main.hs" "text/plain" -- talk about self-reference
fileByLabel "Choose a file" "test/main.hs" "text/plain" -- talk about self-reference
byLabel "What's on the file?" "Some Content"
statusIs 200
@ -8061,7 +8068,7 @@ homeSpecs =
users <- runDB $ selectList ([] :: [Filter User]) []
assertEqual "user table empty" 0 $ L.length users
{-# START_FILE tests/TestImport.hs #-}
{-# START_FILE test/TestImport.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
@ -8091,7 +8098,7 @@ runDB query = do
pool <- fmap connPool getTestYesod
liftIO $ runResourceT $ runNoLoggingT $ runMongoDBPoolDef query pool
{-# START_FILE tests/main.hs #-}
{-# START_FILE test/main.hs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

View File

@ -98,7 +98,14 @@ makeFoundation conf = do
(getter, _) <- clockDateCacher
let logger = Yesod.Core.Types.Logger loggerSet' getter
foundation = App conf s p manager dbconf logger
foundation = App
{ settings = conf
, getStatic = s
, connPool = p
, httpManager = manager
, persistConfig = dbconf
, appLogger = logger
}
-- Perform database migration using our application's logging settings.
runLoggingT
@ -459,7 +466,7 @@ executable PROJECTNAME
test-suite test
type: exitcode-stdio-1.0
main-is: main.hs
hs-source-dirs: tests
hs-source-dirs: test
ghc-options: -Wall
build-depends: base
@ -8036,7 +8043,7 @@ h2##{aDomId} {
color: #990
}
{-# START_FILE tests/HomeTest.hs #-}
{-# START_FILE test/HomeTest.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module HomeTest
( homeSpecs
@ -8058,7 +8065,7 @@ homeSpecs =
setMethod "POST"
setUrl HomeR
addNonce
fileByLabel "Choose a file" "tests/main.hs" "text/plain" -- talk about self-reference
fileByLabel "Choose a file" "test/main.hs" "text/plain" -- talk about self-reference
byLabel "What's on the file?" "Some Content"
statusIs 200
@ -8076,7 +8083,7 @@ homeSpecs =
users <- runDB $ selectList ([] :: [Filter User]) []
assertEqual "user table empty" 0 $ L.length users
{-# START_FILE tests/TestImport.hs #-}
{-# START_FILE test/TestImport.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
@ -8104,7 +8111,7 @@ runDB query = do
pool <- fmap connPool getTestYesod
liftIO $ runSqlPersistMPool query pool
{-# START_FILE tests/main.hs #-}
{-# START_FILE test/main.hs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

View File

@ -101,7 +101,15 @@ makeFoundation conf = do
(getter, _) <- clockDateCacher
let logger = Yesod.Core.Types.Logger loggerSet' getter
foundation = App conf s p manager dbconf onCommand logger
foundation = App
{ settings = conf
, getStatic = s
, connPool = p
, httpManager = manager
, persistConfig = dbconf
, fayCommandHandler = onCommand
, appLogger = logger
}
-- Perform database migration using our application's logging settings.
runLoggingT
@ -496,7 +504,7 @@ executable PROJECTNAME
test-suite test
type: exitcode-stdio-1.0
main-is: main.hs
hs-source-dirs: tests
hs-source-dirs: test
ghc-options: -Wall
build-depends: base
@ -8148,7 +8156,7 @@ h2##{aDomId} {
color: #990
}
{-# START_FILE tests/HomeTest.hs #-}
{-# START_FILE test/HomeTest.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module HomeTest
( homeSpecs
@ -8170,7 +8178,7 @@ homeSpecs =
setMethod "POST"
setUrl HomeR
addNonce
fileByLabel "Choose a file" "tests/main.hs" "text/plain" -- talk about self-reference
fileByLabel "Choose a file" "test/main.hs" "text/plain" -- talk about self-reference
byLabel "What's on the file?" "Some Content"
statusIs 200
@ -8188,7 +8196,7 @@ homeSpecs =
users <- runDB $ selectList ([] :: [Filter User]) []
assertEqual "user table empty" 0 $ L.length users
{-# START_FILE tests/TestImport.hs #-}
{-# START_FILE test/TestImport.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
@ -8216,7 +8224,7 @@ runDB query = do
pool <- fmap connPool getTestYesod
liftIO $ runSqlPersistMPool query pool
{-# START_FILE tests/main.hs #-}
{-# START_FILE test/main.hs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

View File

@ -98,7 +98,14 @@ makeFoundation conf = do
(getter, _) <- clockDateCacher
let logger = Yesod.Core.Types.Logger loggerSet' getter
foundation = App conf s p manager dbconf logger
foundation = App
{ settings = conf
, getStatic = s
, connPool = p
, httpManager = manager
, persistConfig = dbconf
, appLogger = logger
}
-- Perform database migration using our application's logging settings.
runLoggingT
@ -459,7 +466,7 @@ executable PROJECTNAME
test-suite test
type: exitcode-stdio-1.0
main-is: main.hs
hs-source-dirs: tests
hs-source-dirs: test
ghc-options: -Wall
build-depends: base
@ -8036,7 +8043,7 @@ h2##{aDomId} {
color: #990
}
{-# START_FILE tests/HomeTest.hs #-}
{-# START_FILE test/HomeTest.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module HomeTest
( homeSpecs
@ -8058,7 +8065,7 @@ homeSpecs =
setMethod "POST"
setUrl HomeR
addNonce
fileByLabel "Choose a file" "tests/main.hs" "text/plain" -- talk about self-reference
fileByLabel "Choose a file" "test/main.hs" "text/plain" -- talk about self-reference
byLabel "What's on the file?" "Some Content"
statusIs 200
@ -8076,7 +8083,7 @@ homeSpecs =
users <- runDB $ selectList ([] :: [Filter User]) []
assertEqual "user table empty" 0 $ L.length users
{-# START_FILE tests/TestImport.hs #-}
{-# START_FILE test/TestImport.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
@ -8104,7 +8111,7 @@ runDB query = do
pool <- fmap connPool getTestYesod
liftIO $ runSqlPersistMPool query pool
{-# START_FILE tests/main.hs #-}
{-# START_FILE test/main.hs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

View File

@ -89,7 +89,12 @@ makeFoundation conf = do
(getter, _) <- clockDateCacher
let logger = Yesod.Core.Types.Logger loggerSet' getter
foundation = App conf s manager logger
foundation = App
{ settings = conf
, getStatic = s
, httpManager = manager
, appLogger = logger
}
return foundation
@ -383,7 +388,7 @@ executable PROJECTNAME
test-suite test
type: exitcode-stdio-1.0
main-is: main.hs
hs-source-dirs: tests
hs-source-dirs: test
ghc-options: -Wall
build-depends: base
@ -7901,7 +7906,7 @@ h2##{aDomId} {
color: #990
}
{-# START_FILE tests/HomeTest.hs #-}
{-# START_FILE test/HomeTest.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module HomeTest
( homeSpecs
@ -7922,7 +7927,7 @@ homeSpecs =
setMethod "POST"
setUrl HomeR
addNonce
fileByLabel "Choose a file" "tests/main.hs" "text/plain" -- talk about self-reference
fileByLabel "Choose a file" "test/main.hs" "text/plain" -- talk about self-reference
byLabel "What's on the file?" "Some Content"
statusIs 200
@ -7931,7 +7936,7 @@ homeSpecs =
htmlAllContain ".message" "Some Content"
htmlAllContain ".message" "text/plain"
{-# START_FILE tests/TestImport.hs #-}
{-# START_FILE test/TestImport.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
@ -7946,7 +7951,7 @@ import Foundation
type Spec = YesodSpec App
type Example = YesodExample App
{-# START_FILE tests/main.hs #-}
{-# START_FILE test/main.hs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

View File

@ -98,7 +98,14 @@ makeFoundation conf = do
(getter, _) <- clockDateCacher
let logger = Yesod.Core.Types.Logger loggerSet' getter
foundation = App conf s p manager dbconf logger
foundation = App
{ settings = conf
, getStatic = s
, connPool = p
, httpManager = manager
, persistConfig = dbconf
, appLogger = logger
}
-- Perform database migration using our application's logging settings.
runLoggingT
@ -459,7 +466,7 @@ executable PROJECTNAME
test-suite test
type: exitcode-stdio-1.0
main-is: main.hs
hs-source-dirs: tests
hs-source-dirs: test
ghc-options: -Wall
build-depends: base
@ -8023,7 +8030,7 @@ h2##{aDomId} {
color: #990
}
{-# START_FILE tests/HomeTest.hs #-}
{-# START_FILE test/HomeTest.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module HomeTest
( homeSpecs
@ -8045,7 +8052,7 @@ homeSpecs =
setMethod "POST"
setUrl HomeR
addNonce
fileByLabel "Choose a file" "tests/main.hs" "text/plain" -- talk about self-reference
fileByLabel "Choose a file" "test/main.hs" "text/plain" -- talk about self-reference
byLabel "What's on the file?" "Some Content"
statusIs 200
@ -8063,7 +8070,7 @@ homeSpecs =
users <- runDB $ selectList ([] :: [Filter User]) []
assertEqual "user table empty" 0 $ L.length users
{-# START_FILE tests/TestImport.hs #-}
{-# START_FILE test/TestImport.hs #-}
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
@ -8091,7 +8098,7 @@ runDB query = do
pool <- fmap connPool getTestYesod
liftIO $ runSqlPersistMPool query pool
{-# START_FILE tests/main.hs #-}
{-# START_FILE test/main.hs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}