Merge branch 'master' into yesod-1.4
This commit is contained in:
commit
343335f00e
@ -96,7 +96,14 @@ makeFoundation conf = do
|
|||||||
(getter, _) <- clockDateCacher
|
(getter, _) <- clockDateCacher
|
||||||
|
|
||||||
let logger = Yesod.Core.Types.Logger loggerSet' getter
|
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
|
return foundation
|
||||||
|
|
||||||
@ -453,7 +460,7 @@ executable PROJECTNAME
|
|||||||
test-suite test
|
test-suite test
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
hs-source-dirs: tests
|
hs-source-dirs: test
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
build-depends: base
|
build-depends: base
|
||||||
@ -8021,7 +8028,7 @@ h2##{aDomId} {
|
|||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
|
||||||
{-# START_FILE tests/HomeTest.hs #-}
|
{-# START_FILE test/HomeTest.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module HomeTest
|
module HomeTest
|
||||||
( homeSpecs
|
( homeSpecs
|
||||||
@ -8043,7 +8050,7 @@ homeSpecs =
|
|||||||
setMethod "POST"
|
setMethod "POST"
|
||||||
setUrl HomeR
|
setUrl HomeR
|
||||||
addNonce
|
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"
|
byLabel "What's on the file?" "Some Content"
|
||||||
|
|
||||||
statusIs 200
|
statusIs 200
|
||||||
@ -8061,7 +8068,7 @@ homeSpecs =
|
|||||||
users <- runDB $ selectList ([] :: [Filter User]) []
|
users <- runDB $ selectList ([] :: [Filter User]) []
|
||||||
assertEqual "user table empty" 0 $ L.length users
|
assertEqual "user table empty" 0 $ L.length users
|
||||||
|
|
||||||
{-# START_FILE tests/TestImport.hs #-}
|
{-# START_FILE test/TestImport.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module TestImport
|
module TestImport
|
||||||
( module Yesod.Test
|
( module Yesod.Test
|
||||||
@ -8091,7 +8098,7 @@ runDB query = do
|
|||||||
pool <- fmap connPool getTestYesod
|
pool <- fmap connPool getTestYesod
|
||||||
liftIO $ runResourceT $ runNoLoggingT $ runMongoDBPoolDef query pool
|
liftIO $ runResourceT $ runNoLoggingT $ runMongoDBPoolDef query pool
|
||||||
|
|
||||||
{-# START_FILE tests/main.hs #-}
|
{-# START_FILE test/main.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|||||||
@ -98,7 +98,14 @@ makeFoundation conf = do
|
|||||||
(getter, _) <- clockDateCacher
|
(getter, _) <- clockDateCacher
|
||||||
|
|
||||||
let logger = Yesod.Core.Types.Logger loggerSet' getter
|
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.
|
-- Perform database migration using our application's logging settings.
|
||||||
runLoggingT
|
runLoggingT
|
||||||
@ -459,7 +466,7 @@ executable PROJECTNAME
|
|||||||
test-suite test
|
test-suite test
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
hs-source-dirs: tests
|
hs-source-dirs: test
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
build-depends: base
|
build-depends: base
|
||||||
@ -8036,7 +8043,7 @@ h2##{aDomId} {
|
|||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
|
||||||
{-# START_FILE tests/HomeTest.hs #-}
|
{-# START_FILE test/HomeTest.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module HomeTest
|
module HomeTest
|
||||||
( homeSpecs
|
( homeSpecs
|
||||||
@ -8058,7 +8065,7 @@ homeSpecs =
|
|||||||
setMethod "POST"
|
setMethod "POST"
|
||||||
setUrl HomeR
|
setUrl HomeR
|
||||||
addNonce
|
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"
|
byLabel "What's on the file?" "Some Content"
|
||||||
|
|
||||||
statusIs 200
|
statusIs 200
|
||||||
@ -8076,7 +8083,7 @@ homeSpecs =
|
|||||||
users <- runDB $ selectList ([] :: [Filter User]) []
|
users <- runDB $ selectList ([] :: [Filter User]) []
|
||||||
assertEqual "user table empty" 0 $ L.length users
|
assertEqual "user table empty" 0 $ L.length users
|
||||||
|
|
||||||
{-# START_FILE tests/TestImport.hs #-}
|
{-# START_FILE test/TestImport.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module TestImport
|
module TestImport
|
||||||
( module Yesod.Test
|
( module Yesod.Test
|
||||||
@ -8104,7 +8111,7 @@ runDB query = do
|
|||||||
pool <- fmap connPool getTestYesod
|
pool <- fmap connPool getTestYesod
|
||||||
liftIO $ runSqlPersistMPool query pool
|
liftIO $ runSqlPersistMPool query pool
|
||||||
|
|
||||||
{-# START_FILE tests/main.hs #-}
|
{-# START_FILE test/main.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|||||||
@ -101,7 +101,15 @@ makeFoundation conf = do
|
|||||||
(getter, _) <- clockDateCacher
|
(getter, _) <- clockDateCacher
|
||||||
|
|
||||||
let logger = Yesod.Core.Types.Logger loggerSet' getter
|
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.
|
-- Perform database migration using our application's logging settings.
|
||||||
runLoggingT
|
runLoggingT
|
||||||
@ -496,7 +504,7 @@ executable PROJECTNAME
|
|||||||
test-suite test
|
test-suite test
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
hs-source-dirs: tests
|
hs-source-dirs: test
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
build-depends: base
|
build-depends: base
|
||||||
@ -8148,7 +8156,7 @@ h2##{aDomId} {
|
|||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
|
||||||
{-# START_FILE tests/HomeTest.hs #-}
|
{-# START_FILE test/HomeTest.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module HomeTest
|
module HomeTest
|
||||||
( homeSpecs
|
( homeSpecs
|
||||||
@ -8170,7 +8178,7 @@ homeSpecs =
|
|||||||
setMethod "POST"
|
setMethod "POST"
|
||||||
setUrl HomeR
|
setUrl HomeR
|
||||||
addNonce
|
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"
|
byLabel "What's on the file?" "Some Content"
|
||||||
|
|
||||||
statusIs 200
|
statusIs 200
|
||||||
@ -8188,7 +8196,7 @@ homeSpecs =
|
|||||||
users <- runDB $ selectList ([] :: [Filter User]) []
|
users <- runDB $ selectList ([] :: [Filter User]) []
|
||||||
assertEqual "user table empty" 0 $ L.length users
|
assertEqual "user table empty" 0 $ L.length users
|
||||||
|
|
||||||
{-# START_FILE tests/TestImport.hs #-}
|
{-# START_FILE test/TestImport.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module TestImport
|
module TestImport
|
||||||
( module Yesod.Test
|
( module Yesod.Test
|
||||||
@ -8216,7 +8224,7 @@ runDB query = do
|
|||||||
pool <- fmap connPool getTestYesod
|
pool <- fmap connPool getTestYesod
|
||||||
liftIO $ runSqlPersistMPool query pool
|
liftIO $ runSqlPersistMPool query pool
|
||||||
|
|
||||||
{-# START_FILE tests/main.hs #-}
|
{-# START_FILE test/main.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|||||||
@ -98,7 +98,14 @@ makeFoundation conf = do
|
|||||||
(getter, _) <- clockDateCacher
|
(getter, _) <- clockDateCacher
|
||||||
|
|
||||||
let logger = Yesod.Core.Types.Logger loggerSet' getter
|
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.
|
-- Perform database migration using our application's logging settings.
|
||||||
runLoggingT
|
runLoggingT
|
||||||
@ -459,7 +466,7 @@ executable PROJECTNAME
|
|||||||
test-suite test
|
test-suite test
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
hs-source-dirs: tests
|
hs-source-dirs: test
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
build-depends: base
|
build-depends: base
|
||||||
@ -8036,7 +8043,7 @@ h2##{aDomId} {
|
|||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
|
||||||
{-# START_FILE tests/HomeTest.hs #-}
|
{-# START_FILE test/HomeTest.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module HomeTest
|
module HomeTest
|
||||||
( homeSpecs
|
( homeSpecs
|
||||||
@ -8058,7 +8065,7 @@ homeSpecs =
|
|||||||
setMethod "POST"
|
setMethod "POST"
|
||||||
setUrl HomeR
|
setUrl HomeR
|
||||||
addNonce
|
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"
|
byLabel "What's on the file?" "Some Content"
|
||||||
|
|
||||||
statusIs 200
|
statusIs 200
|
||||||
@ -8076,7 +8083,7 @@ homeSpecs =
|
|||||||
users <- runDB $ selectList ([] :: [Filter User]) []
|
users <- runDB $ selectList ([] :: [Filter User]) []
|
||||||
assertEqual "user table empty" 0 $ L.length users
|
assertEqual "user table empty" 0 $ L.length users
|
||||||
|
|
||||||
{-# START_FILE tests/TestImport.hs #-}
|
{-# START_FILE test/TestImport.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module TestImport
|
module TestImport
|
||||||
( module Yesod.Test
|
( module Yesod.Test
|
||||||
@ -8104,7 +8111,7 @@ runDB query = do
|
|||||||
pool <- fmap connPool getTestYesod
|
pool <- fmap connPool getTestYesod
|
||||||
liftIO $ runSqlPersistMPool query pool
|
liftIO $ runSqlPersistMPool query pool
|
||||||
|
|
||||||
{-# START_FILE tests/main.hs #-}
|
{-# START_FILE test/main.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|||||||
@ -89,7 +89,12 @@ makeFoundation conf = do
|
|||||||
(getter, _) <- clockDateCacher
|
(getter, _) <- clockDateCacher
|
||||||
|
|
||||||
let logger = Yesod.Core.Types.Logger loggerSet' getter
|
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
|
return foundation
|
||||||
|
|
||||||
@ -383,7 +388,7 @@ executable PROJECTNAME
|
|||||||
test-suite test
|
test-suite test
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
hs-source-dirs: tests
|
hs-source-dirs: test
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
build-depends: base
|
build-depends: base
|
||||||
@ -7901,7 +7906,7 @@ h2##{aDomId} {
|
|||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
|
||||||
{-# START_FILE tests/HomeTest.hs #-}
|
{-# START_FILE test/HomeTest.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module HomeTest
|
module HomeTest
|
||||||
( homeSpecs
|
( homeSpecs
|
||||||
@ -7922,7 +7927,7 @@ homeSpecs =
|
|||||||
setMethod "POST"
|
setMethod "POST"
|
||||||
setUrl HomeR
|
setUrl HomeR
|
||||||
addNonce
|
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"
|
byLabel "What's on the file?" "Some Content"
|
||||||
|
|
||||||
statusIs 200
|
statusIs 200
|
||||||
@ -7931,7 +7936,7 @@ homeSpecs =
|
|||||||
htmlAllContain ".message" "Some Content"
|
htmlAllContain ".message" "Some Content"
|
||||||
htmlAllContain ".message" "text/plain"
|
htmlAllContain ".message" "text/plain"
|
||||||
|
|
||||||
{-# START_FILE tests/TestImport.hs #-}
|
{-# START_FILE test/TestImport.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module TestImport
|
module TestImport
|
||||||
( module Yesod.Test
|
( module Yesod.Test
|
||||||
@ -7946,7 +7951,7 @@ import Foundation
|
|||||||
type Spec = YesodSpec App
|
type Spec = YesodSpec App
|
||||||
type Example = YesodExample App
|
type Example = YesodExample App
|
||||||
|
|
||||||
{-# START_FILE tests/main.hs #-}
|
{-# START_FILE test/main.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|||||||
@ -98,7 +98,14 @@ makeFoundation conf = do
|
|||||||
(getter, _) <- clockDateCacher
|
(getter, _) <- clockDateCacher
|
||||||
|
|
||||||
let logger = Yesod.Core.Types.Logger loggerSet' getter
|
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.
|
-- Perform database migration using our application's logging settings.
|
||||||
runLoggingT
|
runLoggingT
|
||||||
@ -459,7 +466,7 @@ executable PROJECTNAME
|
|||||||
test-suite test
|
test-suite test
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
hs-source-dirs: tests
|
hs-source-dirs: test
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
build-depends: base
|
build-depends: base
|
||||||
@ -8023,7 +8030,7 @@ h2##{aDomId} {
|
|||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
|
||||||
{-# START_FILE tests/HomeTest.hs #-}
|
{-# START_FILE test/HomeTest.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module HomeTest
|
module HomeTest
|
||||||
( homeSpecs
|
( homeSpecs
|
||||||
@ -8045,7 +8052,7 @@ homeSpecs =
|
|||||||
setMethod "POST"
|
setMethod "POST"
|
||||||
setUrl HomeR
|
setUrl HomeR
|
||||||
addNonce
|
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"
|
byLabel "What's on the file?" "Some Content"
|
||||||
|
|
||||||
statusIs 200
|
statusIs 200
|
||||||
@ -8063,7 +8070,7 @@ homeSpecs =
|
|||||||
users <- runDB $ selectList ([] :: [Filter User]) []
|
users <- runDB $ selectList ([] :: [Filter User]) []
|
||||||
assertEqual "user table empty" 0 $ L.length users
|
assertEqual "user table empty" 0 $ L.length users
|
||||||
|
|
||||||
{-# START_FILE tests/TestImport.hs #-}
|
{-# START_FILE test/TestImport.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module TestImport
|
module TestImport
|
||||||
( module Yesod.Test
|
( module Yesod.Test
|
||||||
@ -8091,7 +8098,7 @@ runDB query = do
|
|||||||
pool <- fmap connPool getTestYesod
|
pool <- fmap connPool getTestYesod
|
||||||
liftIO $ runSqlPersistMPool query pool
|
liftIO $ runSqlPersistMPool query pool
|
||||||
|
|
||||||
{-# START_FILE tests/main.hs #-}
|
{-# START_FILE test/main.hs #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user