Scaffold updates
This commit is contained in:
parent
3171e2f243
commit
c7d41f2395
@ -7,7 +7,22 @@
|
|||||||
{-# START_FILE .ghci #-}
|
{-# START_FILE .ghci #-}
|
||||||
:set -i.:config:dist/build/autogen
|
:set -i.:config:dist/build/autogen
|
||||||
:set -DDEVELOPMENT
|
:set -DDEVELOPMENT
|
||||||
:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable
|
:set -XCPP
|
||||||
|
:set -XDeriveDataTypeable
|
||||||
|
:set -XEmptyDataDecls
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XGeneralizedNewtypeDeriving
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XNoImplicitPrelude
|
||||||
|
:set -XNoMonomorphismRestriction
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XQuasiQuotes
|
||||||
|
:set -XRecordWildCards
|
||||||
|
:set -XTemplateHaskell
|
||||||
|
:set -XTupleSections
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XViewPatterns
|
||||||
|
|
||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
|
|||||||
@ -7,7 +7,22 @@
|
|||||||
{-# START_FILE .ghci #-}
|
{-# START_FILE .ghci #-}
|
||||||
:set -i.:config:dist/build/autogen
|
:set -i.:config:dist/build/autogen
|
||||||
:set -DDEVELOPMENT
|
:set -DDEVELOPMENT
|
||||||
:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable
|
:set -XCPP
|
||||||
|
:set -XDeriveDataTypeable
|
||||||
|
:set -XEmptyDataDecls
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XGeneralizedNewtypeDeriving
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XNoImplicitPrelude
|
||||||
|
:set -XNoMonomorphismRestriction
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XQuasiQuotes
|
||||||
|
:set -XRecordWildCards
|
||||||
|
:set -XTemplateHaskell
|
||||||
|
:set -XTupleSections
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XViewPatterns
|
||||||
|
|
||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
@ -231,7 +246,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
-- Store session data on the client in encrypted cookies,
|
-- Store session data on the client in encrypted cookies,
|
||||||
-- default session idle timeout is 120 minutes
|
-- default session idle timeout is 120 minutes
|
||||||
makeSessionBackend _ = fmap Just $ defaultClientSessionBackend
|
makeSessionBackend _ = Just <$> defaultClientSessionBackend
|
||||||
120 -- timeout in minutes
|
120 -- timeout in minutes
|
||||||
"config/client_session_key.aes"
|
"config/client_session_key.aes"
|
||||||
|
|
||||||
@ -312,11 +327,10 @@ instance YesodAuth App where
|
|||||||
x <- getBy $ UniqueUser $ credsIdent creds
|
x <- getBy $ UniqueUser $ credsIdent creds
|
||||||
case x of
|
case x of
|
||||||
Just (Entity uid _) -> return $ Just uid
|
Just (Entity uid _) -> return $ Just uid
|
||||||
Nothing -> do
|
Nothing -> Just <$> insert User
|
||||||
fmap Just $ insert User
|
{ userIdent = credsIdent creds
|
||||||
{ userIdent = credsIdent creds
|
, userPassword = Nothing
|
||||||
, userPassword = Nothing
|
}
|
||||||
}
|
|
||||||
|
|
||||||
-- You can add other plugins like BrowserID, email or OAuth here
|
-- You can add other plugins like BrowserID, email or OAuth here
|
||||||
authPlugins _ = [authBrowserId def]
|
authPlugins _ = [authBrowserId def]
|
||||||
@ -504,7 +518,7 @@ library
|
|||||||
, template-haskell
|
, template-haskell
|
||||||
, shakespeare >= 2.0 && < 2.1
|
, shakespeare >= 2.0 && < 2.1
|
||||||
, hjsmin >= 0.1 && < 0.2
|
, hjsmin >= 0.1 && < 0.2
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 1.1
|
||||||
, wai-extra >= 3.0 && < 3.1
|
, wai-extra >= 3.0 && < 3.1
|
||||||
, yaml >= 0.8 && < 0.9
|
, yaml >= 0.8 && < 0.9
|
||||||
, http-conduit >= 2.1 && < 2.2
|
, http-conduit >= 2.1 && < 2.2
|
||||||
@ -514,7 +528,7 @@ library
|
|||||||
, aeson >= 0.6 && < 0.9
|
, aeson >= 0.6 && < 0.9
|
||||||
, conduit >= 1.0 && < 2.0
|
, conduit >= 1.0 && < 2.0
|
||||||
, monad-logger >= 0.3 && < 0.4
|
, monad-logger >= 0.3 && < 0.4
|
||||||
, fast-logger >= 2.2 && < 2.3
|
, fast-logger >= 2.2 && < 2.4
|
||||||
, wai-logger >= 2.2 && < 2.3
|
, wai-logger >= 2.2 && < 2.3
|
||||||
, file-embed
|
, file-embed
|
||||||
, safe
|
, safe
|
||||||
@ -564,6 +578,7 @@ test-suite test
|
|||||||
, persistent-mongoDB
|
, persistent-mongoDB
|
||||||
, resourcet
|
, resourcet
|
||||||
, monad-logger
|
, monad-logger
|
||||||
|
, shakespeare
|
||||||
, transformers
|
, transformers
|
||||||
, hspec >= 2.0.0
|
, hspec >= 2.0.0
|
||||||
, classy-prelude
|
, classy-prelude
|
||||||
@ -8997,6 +9012,7 @@ $maybe msg <- mmsg
|
|||||||
|
|
||||||
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
||||||
|
|
||||||
|
<hr />
|
||||||
<li #form>
|
<li #form>
|
||||||
This is an example trivial Form. Read the #
|
This is an example trivial Form. Read the #
|
||||||
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
||||||
@ -9008,6 +9024,7 @@ $maybe msg <- mmsg
|
|||||||
^{formWidget}
|
^{formWidget}
|
||||||
<button .btn .btn-primary type="submit">
|
<button .btn .btn-primary type="submit">
|
||||||
Send it! <span class="glyphicon glyphicon-upload"></span>
|
Send it! <span class="glyphicon glyphicon-upload"></span>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
||||||
test suite that performs tests on this page. #
|
test suite that performs tests on this page. #
|
||||||
@ -9018,11 +9035,25 @@ document.getElementById(#{toJSON aDomId}).innerHTML = "This text was added by th
|
|||||||
|
|
||||||
{-# START_FILE templates/homepage.lucius #-}
|
{-# START_FILE templates/homepage.lucius #-}
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center
|
text-align: center;
|
||||||
|
margin-bottom: 30px
|
||||||
}
|
}
|
||||||
h2##{aDomId} {
|
h2##{aDomId} {
|
||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
li {
|
||||||
|
line-height: 2em;
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
ol {
|
||||||
|
margin-bottom: 30px
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.input-sm {
|
||||||
|
margin-left: 20px
|
||||||
|
}
|
||||||
|
|
||||||
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
||||||
module Handler.CommonSpec (spec) where
|
module Handler.CommonSpec (spec) where
|
||||||
|
|||||||
@ -7,7 +7,22 @@
|
|||||||
{-# START_FILE .ghci #-}
|
{-# START_FILE .ghci #-}
|
||||||
:set -i.:config:dist/build/autogen
|
:set -i.:config:dist/build/autogen
|
||||||
:set -DDEVELOPMENT
|
:set -DDEVELOPMENT
|
||||||
:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable
|
:set -XCPP
|
||||||
|
:set -XDeriveDataTypeable
|
||||||
|
:set -XEmptyDataDecls
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XGeneralizedNewtypeDeriving
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XNoImplicitPrelude
|
||||||
|
:set -XNoMonomorphismRestriction
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XQuasiQuotes
|
||||||
|
:set -XRecordWildCards
|
||||||
|
:set -XTemplateHaskell
|
||||||
|
:set -XTupleSections
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XViewPatterns
|
||||||
|
|
||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
@ -246,7 +261,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
-- Store session data on the client in encrypted cookies,
|
-- Store session data on the client in encrypted cookies,
|
||||||
-- default session idle timeout is 120 minutes
|
-- default session idle timeout is 120 minutes
|
||||||
makeSessionBackend _ = fmap Just $ defaultClientSessionBackend
|
makeSessionBackend _ = Just <$> defaultClientSessionBackend
|
||||||
120 -- timeout in minutes
|
120 -- timeout in minutes
|
||||||
"config/client_session_key.aes"
|
"config/client_session_key.aes"
|
||||||
|
|
||||||
@ -326,11 +341,10 @@ instance YesodAuth App where
|
|||||||
x <- getBy $ UniqueUser $ credsIdent creds
|
x <- getBy $ UniqueUser $ credsIdent creds
|
||||||
case x of
|
case x of
|
||||||
Just (Entity uid _) -> return $ Just uid
|
Just (Entity uid _) -> return $ Just uid
|
||||||
Nothing -> do
|
Nothing -> Just <$> insert User
|
||||||
fmap Just $ insert User
|
{ userIdent = credsIdent creds
|
||||||
{ userIdent = credsIdent creds
|
, userPassword = Nothing
|
||||||
, userPassword = Nothing
|
}
|
||||||
}
|
|
||||||
|
|
||||||
-- You can add other plugins like BrowserID, email or OAuth here
|
-- You can add other plugins like BrowserID, email or OAuth here
|
||||||
authPlugins _ = [authBrowserId def]
|
authPlugins _ = [authBrowserId def]
|
||||||
@ -515,7 +529,7 @@ library
|
|||||||
, template-haskell
|
, template-haskell
|
||||||
, shakespeare >= 2.0 && < 2.1
|
, shakespeare >= 2.0 && < 2.1
|
||||||
, hjsmin >= 0.1 && < 0.2
|
, hjsmin >= 0.1 && < 0.2
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 1.1
|
||||||
, wai-extra >= 3.0 && < 3.1
|
, wai-extra >= 3.0 && < 3.1
|
||||||
, yaml >= 0.8 && < 0.9
|
, yaml >= 0.8 && < 0.9
|
||||||
, http-conduit >= 2.1 && < 2.2
|
, http-conduit >= 2.1 && < 2.2
|
||||||
@ -525,7 +539,7 @@ library
|
|||||||
, aeson >= 0.6 && < 0.9
|
, aeson >= 0.6 && < 0.9
|
||||||
, conduit >= 1.0 && < 2.0
|
, conduit >= 1.0 && < 2.0
|
||||||
, monad-logger >= 0.3 && < 0.4
|
, monad-logger >= 0.3 && < 0.4
|
||||||
, fast-logger >= 2.2 && < 2.3
|
, fast-logger >= 2.2 && < 2.4
|
||||||
, wai-logger >= 2.2 && < 2.3
|
, wai-logger >= 2.2 && < 2.3
|
||||||
, file-embed
|
, file-embed
|
||||||
, safe
|
, safe
|
||||||
@ -575,6 +589,7 @@ test-suite test
|
|||||||
, persistent-mysql
|
, persistent-mysql
|
||||||
, resourcet
|
, resourcet
|
||||||
, monad-logger
|
, monad-logger
|
||||||
|
, shakespeare
|
||||||
, transformers
|
, transformers
|
||||||
, hspec >= 2.0.0
|
, hspec >= 2.0.0
|
||||||
, classy-prelude
|
, classy-prelude
|
||||||
@ -9007,6 +9022,7 @@ $maybe msg <- mmsg
|
|||||||
|
|
||||||
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
||||||
|
|
||||||
|
<hr />
|
||||||
<li #form>
|
<li #form>
|
||||||
This is an example trivial Form. Read the #
|
This is an example trivial Form. Read the #
|
||||||
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
||||||
@ -9018,6 +9034,7 @@ $maybe msg <- mmsg
|
|||||||
^{formWidget}
|
^{formWidget}
|
||||||
<button .btn .btn-primary type="submit">
|
<button .btn .btn-primary type="submit">
|
||||||
Send it! <span class="glyphicon glyphicon-upload"></span>
|
Send it! <span class="glyphicon glyphicon-upload"></span>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
||||||
test suite that performs tests on this page. #
|
test suite that performs tests on this page. #
|
||||||
@ -9028,11 +9045,25 @@ document.getElementById(#{toJSON aDomId}).innerHTML = "This text was added by th
|
|||||||
|
|
||||||
{-# START_FILE templates/homepage.lucius #-}
|
{-# START_FILE templates/homepage.lucius #-}
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center
|
text-align: center;
|
||||||
|
margin-bottom: 30px
|
||||||
}
|
}
|
||||||
h2##{aDomId} {
|
h2##{aDomId} {
|
||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
li {
|
||||||
|
line-height: 2em;
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
ol {
|
||||||
|
margin-bottom: 30px
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.input-sm {
|
||||||
|
margin-left: 20px
|
||||||
|
}
|
||||||
|
|
||||||
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
||||||
module Handler.CommonSpec (spec) where
|
module Handler.CommonSpec (spec) where
|
||||||
|
|||||||
@ -7,7 +7,22 @@
|
|||||||
{-# START_FILE .ghci #-}
|
{-# START_FILE .ghci #-}
|
||||||
:set -i.:config:dist/build/autogen
|
:set -i.:config:dist/build/autogen
|
||||||
:set -DDEVELOPMENT
|
:set -DDEVELOPMENT
|
||||||
:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable
|
:set -XCPP
|
||||||
|
:set -XDeriveDataTypeable
|
||||||
|
:set -XEmptyDataDecls
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XGeneralizedNewtypeDeriving
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XNoImplicitPrelude
|
||||||
|
:set -XNoMonomorphismRestriction
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XQuasiQuotes
|
||||||
|
:set -XRecordWildCards
|
||||||
|
:set -XTemplateHaskell
|
||||||
|
:set -XTupleSections
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XViewPatterns
|
||||||
|
|
||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
@ -253,7 +268,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
-- Store session data on the client in encrypted cookies,
|
-- Store session data on the client in encrypted cookies,
|
||||||
-- default session idle timeout is 120 minutes
|
-- default session idle timeout is 120 minutes
|
||||||
makeSessionBackend _ = fmap Just $ defaultClientSessionBackend
|
makeSessionBackend _ = Just <$> defaultClientSessionBackend
|
||||||
120 -- timeout in minutes
|
120 -- timeout in minutes
|
||||||
"config/client_session_key.aes"
|
"config/client_session_key.aes"
|
||||||
|
|
||||||
@ -342,11 +357,10 @@ instance YesodAuth App where
|
|||||||
x <- getBy $ UniqueUser $ credsIdent creds
|
x <- getBy $ UniqueUser $ credsIdent creds
|
||||||
case x of
|
case x of
|
||||||
Just (Entity uid _) -> return $ Just uid
|
Just (Entity uid _) -> return $ Just uid
|
||||||
Nothing -> do
|
Nothing -> Just <$> insert User
|
||||||
fmap Just $ insert User
|
{ userIdent = credsIdent creds
|
||||||
{ userIdent = credsIdent creds
|
, userPassword = Nothing
|
||||||
, userPassword = Nothing
|
}
|
||||||
}
|
|
||||||
|
|
||||||
-- You can add other plugins like BrowserID, email or OAuth here
|
-- You can add other plugins like BrowserID, email or OAuth here
|
||||||
authPlugins _ = [authBrowserId def]
|
authPlugins _ = [authBrowserId def]
|
||||||
@ -559,7 +573,7 @@ library
|
|||||||
, persistent-template >= 2.0 && < 2.2
|
, persistent-template >= 2.0 && < 2.2
|
||||||
, template-haskell
|
, template-haskell
|
||||||
, shakespeare >= 2.0 && < 2.1
|
, shakespeare >= 2.0 && < 2.1
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 1.1
|
||||||
, wai-extra >= 3.0 && < 3.1
|
, wai-extra >= 3.0 && < 3.1
|
||||||
, yaml >= 0.8 && < 0.9
|
, yaml >= 0.8 && < 0.9
|
||||||
, http-conduit >= 2.1 && < 2.2
|
, http-conduit >= 2.1 && < 2.2
|
||||||
@ -569,7 +583,7 @@ library
|
|||||||
, aeson >= 0.6 && < 0.9
|
, aeson >= 0.6 && < 0.9
|
||||||
, conduit >= 1.0 && < 2.0
|
, conduit >= 1.0 && < 2.0
|
||||||
, monad-logger >= 0.3 && < 0.4
|
, monad-logger >= 0.3 && < 0.4
|
||||||
, fast-logger >= 2.2 && < 2.3
|
, fast-logger >= 2.2 && < 2.4
|
||||||
, wai-logger >= 2.2 && < 2.3
|
, wai-logger >= 2.2 && < 2.3
|
||||||
, file-embed
|
, file-embed
|
||||||
, safe
|
, safe
|
||||||
@ -619,6 +633,7 @@ test-suite test
|
|||||||
, persistent-postgresql
|
, persistent-postgresql
|
||||||
, resourcet
|
, resourcet
|
||||||
, monad-logger
|
, monad-logger
|
||||||
|
, shakespeare
|
||||||
, transformers
|
, transformers
|
||||||
, hspec >= 2.0.0
|
, hspec >= 2.0.0
|
||||||
, classy-prelude
|
, classy-prelude
|
||||||
@ -9122,6 +9137,7 @@ $maybe msg <- mmsg
|
|||||||
|
|
||||||
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
||||||
|
|
||||||
|
<hr />
|
||||||
<li #form>
|
<li #form>
|
||||||
This is an example trivial Form. Read the #
|
This is an example trivial Form. Read the #
|
||||||
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
||||||
@ -9133,6 +9149,7 @@ $maybe msg <- mmsg
|
|||||||
^{formWidget}
|
^{formWidget}
|
||||||
<button .btn .btn-primary type="submit">
|
<button .btn .btn-primary type="submit">
|
||||||
Send it! <span class="glyphicon glyphicon-upload"></span>
|
Send it! <span class="glyphicon glyphicon-upload"></span>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
||||||
test suite that performs tests on this page. #
|
test suite that performs tests on this page. #
|
||||||
@ -9148,11 +9165,25 @@ document.getElementById(#{toJSON aDomId}).innerHTML = "This text was added by th
|
|||||||
|
|
||||||
{-# START_FILE templates/homepage.lucius #-}
|
{-# START_FILE templates/homepage.lucius #-}
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center
|
text-align: center;
|
||||||
|
margin-bottom: 30px
|
||||||
}
|
}
|
||||||
h2##{aDomId} {
|
h2##{aDomId} {
|
||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
li {
|
||||||
|
line-height: 2em;
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
ol {
|
||||||
|
margin-bottom: 30px
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.input-sm {
|
||||||
|
margin-left: 20px
|
||||||
|
}
|
||||||
|
|
||||||
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
||||||
module Handler.CommonSpec (spec) where
|
module Handler.CommonSpec (spec) where
|
||||||
@ -9223,6 +9254,7 @@ import Database.Persist.Sql (SqlPersistM, SqlBackend, runSqlPersistMPool, rawEx
|
|||||||
import Foundation as X
|
import Foundation as X
|
||||||
import Model as X
|
import Model as X
|
||||||
import Test.Hspec as X
|
import Test.Hspec as X
|
||||||
|
import Text.Shakespeare.Text (st)
|
||||||
import Yesod.Default.Config2 (ignoreEnv, loadAppSettings)
|
import Yesod.Default.Config2 (ignoreEnv, loadAppSettings)
|
||||||
import Yesod.Test as X
|
import Yesod.Test as X
|
||||||
|
|
||||||
@ -9249,16 +9281,21 @@ withApp = before $ do
|
|||||||
-- 'withApp' calls it before each test, creating a clean environment for each
|
-- 'withApp' calls it before each test, creating a clean environment for each
|
||||||
-- spec to run in.
|
-- spec to run in.
|
||||||
wipeDB :: App -> IO ()
|
wipeDB :: App -> IO ()
|
||||||
wipeDB app = do
|
wipeDB app = runDBWithApp app $ do
|
||||||
runDBWithApp app $ do
|
tables <- getTables
|
||||||
tables <- getTables
|
sqlBackend <- ask
|
||||||
sqlBackend <- ask
|
|
||||||
|
|
||||||
let escapedTables = map (connEscapeName sqlBackend . DBName) tables
|
let escapedTables = map (connEscapeName sqlBackend . DBName) tables
|
||||||
query = "TRUNCATE TABLE " ++ (intercalate ", " escapedTables)
|
query = "TRUNCATE TABLE " ++ intercalate ", " escapedTables
|
||||||
rawExecute query []
|
rawExecute query []
|
||||||
|
|
||||||
getTables :: MonadIO m => ReaderT SqlBackend m [Text]
|
getTables :: MonadIO m => ReaderT SqlBackend m [Text]
|
||||||
getTables = do
|
getTables = do
|
||||||
tables <- rawSql "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';" []
|
tables <- rawSql [st|
|
||||||
|
SELECT table_name
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = 'public';
|
||||||
|
|] []
|
||||||
|
|
||||||
return $ map unSingle tables
|
return $ map unSingle tables
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,22 @@
|
|||||||
{-# START_FILE .ghci #-}
|
{-# START_FILE .ghci #-}
|
||||||
:set -i.:config:dist/build/autogen
|
:set -i.:config:dist/build/autogen
|
||||||
:set -DDEVELOPMENT
|
:set -DDEVELOPMENT
|
||||||
:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable
|
:set -XCPP
|
||||||
|
:set -XDeriveDataTypeable
|
||||||
|
:set -XEmptyDataDecls
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XGeneralizedNewtypeDeriving
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XNoImplicitPrelude
|
||||||
|
:set -XNoMonomorphismRestriction
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XQuasiQuotes
|
||||||
|
:set -XRecordWildCards
|
||||||
|
:set -XTemplateHaskell
|
||||||
|
:set -XTupleSections
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XViewPatterns
|
||||||
|
|
||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
@ -246,7 +261,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
-- Store session data on the client in encrypted cookies,
|
-- Store session data on the client in encrypted cookies,
|
||||||
-- default session idle timeout is 120 minutes
|
-- default session idle timeout is 120 minutes
|
||||||
makeSessionBackend _ = fmap Just $ defaultClientSessionBackend
|
makeSessionBackend _ = Just <$> defaultClientSessionBackend
|
||||||
120 -- timeout in minutes
|
120 -- timeout in minutes
|
||||||
"config/client_session_key.aes"
|
"config/client_session_key.aes"
|
||||||
|
|
||||||
@ -326,11 +341,10 @@ instance YesodAuth App where
|
|||||||
x <- getBy $ UniqueUser $ credsIdent creds
|
x <- getBy $ UniqueUser $ credsIdent creds
|
||||||
case x of
|
case x of
|
||||||
Just (Entity uid _) -> return $ Just uid
|
Just (Entity uid _) -> return $ Just uid
|
||||||
Nothing -> do
|
Nothing -> Just <$> insert User
|
||||||
fmap Just $ insert User
|
{ userIdent = credsIdent creds
|
||||||
{ userIdent = credsIdent creds
|
, userPassword = Nothing
|
||||||
, userPassword = Nothing
|
}
|
||||||
}
|
|
||||||
|
|
||||||
-- You can add other plugins like BrowserID, email or OAuth here
|
-- You can add other plugins like BrowserID, email or OAuth here
|
||||||
authPlugins _ = [authBrowserId def]
|
authPlugins _ = [authBrowserId def]
|
||||||
@ -515,7 +529,7 @@ library
|
|||||||
, template-haskell
|
, template-haskell
|
||||||
, shakespeare >= 2.0 && < 2.1
|
, shakespeare >= 2.0 && < 2.1
|
||||||
, hjsmin >= 0.1 && < 0.2
|
, hjsmin >= 0.1 && < 0.2
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 1.1
|
||||||
, wai-extra >= 3.0 && < 3.1
|
, wai-extra >= 3.0 && < 3.1
|
||||||
, yaml >= 0.8 && < 0.9
|
, yaml >= 0.8 && < 0.9
|
||||||
, http-conduit >= 2.1 && < 2.2
|
, http-conduit >= 2.1 && < 2.2
|
||||||
@ -525,7 +539,7 @@ library
|
|||||||
, aeson >= 0.6 && < 0.9
|
, aeson >= 0.6 && < 0.9
|
||||||
, conduit >= 1.0 && < 2.0
|
, conduit >= 1.0 && < 2.0
|
||||||
, monad-logger >= 0.3 && < 0.4
|
, monad-logger >= 0.3 && < 0.4
|
||||||
, fast-logger >= 2.2 && < 2.3
|
, fast-logger >= 2.2 && < 2.4
|
||||||
, wai-logger >= 2.2 && < 2.3
|
, wai-logger >= 2.2 && < 2.3
|
||||||
, file-embed
|
, file-embed
|
||||||
, safe
|
, safe
|
||||||
@ -575,6 +589,7 @@ test-suite test
|
|||||||
, persistent-postgresql
|
, persistent-postgresql
|
||||||
, resourcet
|
, resourcet
|
||||||
, monad-logger
|
, monad-logger
|
||||||
|
, shakespeare
|
||||||
, transformers
|
, transformers
|
||||||
, hspec >= 2.0.0
|
, hspec >= 2.0.0
|
||||||
, classy-prelude
|
, classy-prelude
|
||||||
@ -9007,6 +9022,7 @@ $maybe msg <- mmsg
|
|||||||
|
|
||||||
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
||||||
|
|
||||||
|
<hr />
|
||||||
<li #form>
|
<li #form>
|
||||||
This is an example trivial Form. Read the #
|
This is an example trivial Form. Read the #
|
||||||
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
||||||
@ -9018,6 +9034,7 @@ $maybe msg <- mmsg
|
|||||||
^{formWidget}
|
^{formWidget}
|
||||||
<button .btn .btn-primary type="submit">
|
<button .btn .btn-primary type="submit">
|
||||||
Send it! <span class="glyphicon glyphicon-upload"></span>
|
Send it! <span class="glyphicon glyphicon-upload"></span>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
||||||
test suite that performs tests on this page. #
|
test suite that performs tests on this page. #
|
||||||
@ -9028,11 +9045,25 @@ document.getElementById(#{toJSON aDomId}).innerHTML = "This text was added by th
|
|||||||
|
|
||||||
{-# START_FILE templates/homepage.lucius #-}
|
{-# START_FILE templates/homepage.lucius #-}
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center
|
text-align: center;
|
||||||
|
margin-bottom: 30px
|
||||||
}
|
}
|
||||||
h2##{aDomId} {
|
h2##{aDomId} {
|
||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
li {
|
||||||
|
line-height: 2em;
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
ol {
|
||||||
|
margin-bottom: 30px
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.input-sm {
|
||||||
|
margin-left: 20px
|
||||||
|
}
|
||||||
|
|
||||||
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
||||||
module Handler.CommonSpec (spec) where
|
module Handler.CommonSpec (spec) where
|
||||||
@ -9103,6 +9134,7 @@ import Database.Persist.Sql (SqlPersistM, SqlBackend, runSqlPersistMPool, rawEx
|
|||||||
import Foundation as X
|
import Foundation as X
|
||||||
import Model as X
|
import Model as X
|
||||||
import Test.Hspec as X
|
import Test.Hspec as X
|
||||||
|
import Text.Shakespeare.Text (st)
|
||||||
import Yesod.Default.Config2 (ignoreEnv, loadAppSettings)
|
import Yesod.Default.Config2 (ignoreEnv, loadAppSettings)
|
||||||
import Yesod.Test as X
|
import Yesod.Test as X
|
||||||
|
|
||||||
@ -9129,16 +9161,21 @@ withApp = before $ do
|
|||||||
-- 'withApp' calls it before each test, creating a clean environment for each
|
-- 'withApp' calls it before each test, creating a clean environment for each
|
||||||
-- spec to run in.
|
-- spec to run in.
|
||||||
wipeDB :: App -> IO ()
|
wipeDB :: App -> IO ()
|
||||||
wipeDB app = do
|
wipeDB app = runDBWithApp app $ do
|
||||||
runDBWithApp app $ do
|
tables <- getTables
|
||||||
tables <- getTables
|
sqlBackend <- ask
|
||||||
sqlBackend <- ask
|
|
||||||
|
|
||||||
let escapedTables = map (connEscapeName sqlBackend . DBName) tables
|
let escapedTables = map (connEscapeName sqlBackend . DBName) tables
|
||||||
query = "TRUNCATE TABLE " ++ (intercalate ", " escapedTables)
|
query = "TRUNCATE TABLE " ++ intercalate ", " escapedTables
|
||||||
rawExecute query []
|
rawExecute query []
|
||||||
|
|
||||||
getTables :: MonadIO m => ReaderT SqlBackend m [Text]
|
getTables :: MonadIO m => ReaderT SqlBackend m [Text]
|
||||||
getTables = do
|
getTables = do
|
||||||
tables <- rawSql "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';" []
|
tables <- rawSql [st|
|
||||||
|
SELECT table_name
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = 'public';
|
||||||
|
|] []
|
||||||
|
|
||||||
return $ map unSingle tables
|
return $ map unSingle tables
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,22 @@
|
|||||||
{-# START_FILE .ghci #-}
|
{-# START_FILE .ghci #-}
|
||||||
:set -i.:config:dist/build/autogen
|
:set -i.:config:dist/build/autogen
|
||||||
:set -DDEVELOPMENT
|
:set -DDEVELOPMENT
|
||||||
:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable
|
:set -XCPP
|
||||||
|
:set -XDeriveDataTypeable
|
||||||
|
:set -XEmptyDataDecls
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XGeneralizedNewtypeDeriving
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XNoImplicitPrelude
|
||||||
|
:set -XNoMonomorphismRestriction
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XQuasiQuotes
|
||||||
|
:set -XRecordWildCards
|
||||||
|
:set -XTemplateHaskell
|
||||||
|
:set -XTupleSections
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XViewPatterns
|
||||||
|
|
||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
@ -219,7 +234,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
-- Store session data on the client in encrypted cookies,
|
-- Store session data on the client in encrypted cookies,
|
||||||
-- default session idle timeout is 120 minutes
|
-- default session idle timeout is 120 minutes
|
||||||
makeSessionBackend _ = fmap Just $ defaultClientSessionBackend
|
makeSessionBackend _ = Just <$> defaultClientSessionBackend
|
||||||
120 -- timeout in minutes
|
120 -- timeout in minutes
|
||||||
"config/client_session_key.aes"
|
"config/client_session_key.aes"
|
||||||
|
|
||||||
@ -428,7 +443,7 @@ library
|
|||||||
, template-haskell
|
, template-haskell
|
||||||
, shakespeare >= 2.0 && < 2.1
|
, shakespeare >= 2.0 && < 2.1
|
||||||
, hjsmin >= 0.1 && < 0.2
|
, hjsmin >= 0.1 && < 0.2
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 1.1
|
||||||
, wai-extra >= 3.0 && < 3.1
|
, wai-extra >= 3.0 && < 3.1
|
||||||
, yaml >= 0.8 && < 0.9
|
, yaml >= 0.8 && < 0.9
|
||||||
, http-conduit >= 2.1 && < 2.2
|
, http-conduit >= 2.1 && < 2.2
|
||||||
@ -438,7 +453,7 @@ library
|
|||||||
, aeson >= 0.6 && < 0.9
|
, aeson >= 0.6 && < 0.9
|
||||||
, conduit >= 1.0 && < 2.0
|
, conduit >= 1.0 && < 2.0
|
||||||
, monad-logger >= 0.3 && < 0.4
|
, monad-logger >= 0.3 && < 0.4
|
||||||
, fast-logger >= 2.2 && < 2.3
|
, fast-logger >= 2.2 && < 2.4
|
||||||
, wai-logger >= 2.2 && < 2.3
|
, wai-logger >= 2.2 && < 2.3
|
||||||
, file-embed
|
, file-embed
|
||||||
, safe
|
, safe
|
||||||
@ -8888,6 +8903,7 @@ $maybe msg <- mmsg
|
|||||||
|
|
||||||
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
||||||
|
|
||||||
|
<hr />
|
||||||
<li #form>
|
<li #form>
|
||||||
This is an example trivial Form. Read the #
|
This is an example trivial Form. Read the #
|
||||||
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
||||||
@ -8899,6 +8915,7 @@ $maybe msg <- mmsg
|
|||||||
^{formWidget}
|
^{formWidget}
|
||||||
<button .btn .btn-primary type="submit">
|
<button .btn .btn-primary type="submit">
|
||||||
Send it! <span class="glyphicon glyphicon-upload"></span>
|
Send it! <span class="glyphicon glyphicon-upload"></span>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
||||||
test suite that performs tests on this page. #
|
test suite that performs tests on this page. #
|
||||||
@ -8909,11 +8926,25 @@ document.getElementById(#{toJSON aDomId}).innerHTML = "This text was added by th
|
|||||||
|
|
||||||
{-# START_FILE templates/homepage.lucius #-}
|
{-# START_FILE templates/homepage.lucius #-}
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center
|
text-align: center;
|
||||||
|
margin-bottom: 30px
|
||||||
}
|
}
|
||||||
h2##{aDomId} {
|
h2##{aDomId} {
|
||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
li {
|
||||||
|
line-height: 2em;
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
ol {
|
||||||
|
margin-bottom: 30px
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.input-sm {
|
||||||
|
margin-left: 20px
|
||||||
|
}
|
||||||
|
|
||||||
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
||||||
module Handler.CommonSpec (spec) where
|
module Handler.CommonSpec (spec) where
|
||||||
|
|||||||
@ -7,7 +7,22 @@
|
|||||||
{-# START_FILE .ghci #-}
|
{-# START_FILE .ghci #-}
|
||||||
:set -i.:config:dist/build/autogen
|
:set -i.:config:dist/build/autogen
|
||||||
:set -DDEVELOPMENT
|
:set -DDEVELOPMENT
|
||||||
:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable
|
:set -XCPP
|
||||||
|
:set -XDeriveDataTypeable
|
||||||
|
:set -XEmptyDataDecls
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XGeneralizedNewtypeDeriving
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XNoImplicitPrelude
|
||||||
|
:set -XNoMonomorphismRestriction
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XQuasiQuotes
|
||||||
|
:set -XRecordWildCards
|
||||||
|
:set -XTemplateHaskell
|
||||||
|
:set -XTupleSections
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XViewPatterns
|
||||||
|
|
||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
@ -246,7 +261,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
-- Store session data on the client in encrypted cookies,
|
-- Store session data on the client in encrypted cookies,
|
||||||
-- default session idle timeout is 120 minutes
|
-- default session idle timeout is 120 minutes
|
||||||
makeSessionBackend _ = fmap Just $ defaultClientSessionBackend
|
makeSessionBackend _ = Just <$> defaultClientSessionBackend
|
||||||
120 -- timeout in minutes
|
120 -- timeout in minutes
|
||||||
"config/client_session_key.aes"
|
"config/client_session_key.aes"
|
||||||
|
|
||||||
@ -326,11 +341,10 @@ instance YesodAuth App where
|
|||||||
x <- getBy $ UniqueUser $ credsIdent creds
|
x <- getBy $ UniqueUser $ credsIdent creds
|
||||||
case x of
|
case x of
|
||||||
Just (Entity uid _) -> return $ Just uid
|
Just (Entity uid _) -> return $ Just uid
|
||||||
Nothing -> do
|
Nothing -> Just <$> insert User
|
||||||
fmap Just $ insert User
|
{ userIdent = credsIdent creds
|
||||||
{ userIdent = credsIdent creds
|
, userPassword = Nothing
|
||||||
, userPassword = Nothing
|
}
|
||||||
}
|
|
||||||
|
|
||||||
-- You can add other plugins like BrowserID, email or OAuth here
|
-- You can add other plugins like BrowserID, email or OAuth here
|
||||||
authPlugins _ = [authBrowserId def]
|
authPlugins _ = [authBrowserId def]
|
||||||
@ -515,7 +529,7 @@ library
|
|||||||
, template-haskell
|
, template-haskell
|
||||||
, shakespeare >= 2.0 && < 2.1
|
, shakespeare >= 2.0 && < 2.1
|
||||||
, hjsmin >= 0.1 && < 0.2
|
, hjsmin >= 0.1 && < 0.2
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 1.1
|
||||||
, wai-extra >= 3.0 && < 3.1
|
, wai-extra >= 3.0 && < 3.1
|
||||||
, yaml >= 0.8 && < 0.9
|
, yaml >= 0.8 && < 0.9
|
||||||
, http-conduit >= 2.1 && < 2.2
|
, http-conduit >= 2.1 && < 2.2
|
||||||
@ -525,7 +539,7 @@ library
|
|||||||
, aeson >= 0.6 && < 0.9
|
, aeson >= 0.6 && < 0.9
|
||||||
, conduit >= 1.0 && < 2.0
|
, conduit >= 1.0 && < 2.0
|
||||||
, monad-logger >= 0.3 && < 0.4
|
, monad-logger >= 0.3 && < 0.4
|
||||||
, fast-logger >= 2.2 && < 2.3
|
, fast-logger >= 2.2 && < 2.4
|
||||||
, wai-logger >= 2.2 && < 2.3
|
, wai-logger >= 2.2 && < 2.3
|
||||||
, file-embed
|
, file-embed
|
||||||
, safe
|
, safe
|
||||||
@ -575,6 +589,7 @@ test-suite test
|
|||||||
, persistent-sqlite
|
, persistent-sqlite
|
||||||
, resourcet
|
, resourcet
|
||||||
, monad-logger
|
, monad-logger
|
||||||
|
, shakespeare
|
||||||
, transformers
|
, transformers
|
||||||
, hspec >= 2.0.0
|
, hspec >= 2.0.0
|
||||||
, classy-prelude
|
, classy-prelude
|
||||||
@ -9025,6 +9040,7 @@ $maybe msg <- mmsg
|
|||||||
|
|
||||||
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
<li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
|
||||||
|
|
||||||
|
<hr />
|
||||||
<li #form>
|
<li #form>
|
||||||
This is an example trivial Form. Read the #
|
This is an example trivial Form. Read the #
|
||||||
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
\<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
|
||||||
@ -9036,6 +9052,7 @@ $maybe msg <- mmsg
|
|||||||
^{formWidget}
|
^{formWidget}
|
||||||
<button .btn .btn-primary type="submit">
|
<button .btn .btn-primary type="submit">
|
||||||
Send it! <span class="glyphicon glyphicon-upload"></span>
|
Send it! <span class="glyphicon glyphicon-upload"></span>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
<li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
|
||||||
test suite that performs tests on this page. #
|
test suite that performs tests on this page. #
|
||||||
@ -9046,11 +9063,25 @@ document.getElementById(#{toJSON aDomId}).innerHTML = "This text was added by th
|
|||||||
|
|
||||||
{-# START_FILE templates/homepage.lucius #-}
|
{-# START_FILE templates/homepage.lucius #-}
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center
|
text-align: center;
|
||||||
|
margin-bottom: 30px
|
||||||
}
|
}
|
||||||
h2##{aDomId} {
|
h2##{aDomId} {
|
||||||
color: #990
|
color: #990
|
||||||
}
|
}
|
||||||
|
li {
|
||||||
|
line-height: 2em;
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
ol {
|
||||||
|
margin-bottom: 30px
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.input-sm {
|
||||||
|
margin-left: 20px
|
||||||
|
}
|
||||||
|
|
||||||
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
{-# START_FILE test/Handler/CommonSpec.hs #-}
|
||||||
module Handler.CommonSpec (spec) where
|
module Handler.CommonSpec (spec) where
|
||||||
@ -9121,6 +9152,7 @@ import Database.Persist.Sql (SqlPersistM, SqlBackend, runSqlPersistMPool, rawEx
|
|||||||
import Foundation as X
|
import Foundation as X
|
||||||
import Model as X
|
import Model as X
|
||||||
import Test.Hspec as X
|
import Test.Hspec as X
|
||||||
|
import Text.Shakespeare.Text (st)
|
||||||
import Yesod.Default.Config2 (ignoreEnv, loadAppSettings)
|
import Yesod.Default.Config2 (ignoreEnv, loadAppSettings)
|
||||||
import Yesod.Test as X
|
import Yesod.Test as X
|
||||||
|
|
||||||
@ -9182,3 +9214,4 @@ getTables :: MonadIO m => ReaderT SqlBackend m [Text]
|
|||||||
getTables = do
|
getTables = do
|
||||||
tables <- rawSql "SELECT name FROM sqlite_master WHERE type = 'table';" []
|
tables <- rawSql "SELECT name FROM sqlite_master WHERE type = 'table';" []
|
||||||
return (fmap unSingle tables)
|
return (fmap unSingle tables)
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-bin
|
name: yesod-bin
|
||||||
version: 1.4.5
|
version: 1.4.5.1
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user