Scaffolding update

This commit is contained in:
Michael Snoyman 2015-06-14 14:23:51 +03:00
parent 524297dafc
commit 5168baa94a
8 changed files with 91 additions and 37 deletions

View File

@ -1,3 +1,7 @@
## 1.4.10
* Scaffolding update
## 1.4.9.2 ## 1.4.9.2
* Collapse paths in keter bundles, see [mailing list thread](https://groups.google.com/d/msg/yesodweb/Ndd310qfSEc/pZOXldsKowsJ) * Collapse paths in keter bundles, see [mailing list thread](https://groups.google.com/d/msg/yesodweb/Ndd310qfSEc/pZOXldsKowsJ)

View File

@ -206,6 +206,7 @@ import Import.NoFoundation
import Text.Hamlet (hamletFile) import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym) import Text.Jasmine (minifym)
import Yesod.Auth.BrowserId (authBrowserId) import Yesod.Auth.BrowserId (authBrowserId)
import Yesod.Auth.Message (AuthMessage (InvalidLogin))
import Yesod.Core.Types (Logger) import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExternal) import Yesod.Default.Util (addStaticContentExternal)
import qualified Yesod.Core.Unsafe as Unsafe import qualified Yesod.Core.Unsafe as Unsafe
@ -232,6 +233,10 @@ instance HasHttpManager App where
-- Note that this is really half the story; in Application.hs, mkYesodDispatch -- Note that this is really half the story; in Application.hs, mkYesodDispatch
-- generates the rest of the code. Please see the linked documentation for an -- generates the rest of the code. Please see the linked documentation for an
-- explanation for this split. -- explanation for this split.
--
-- This function also generates the following type synonyms:
-- type Handler = HandlerT App IO
-- type Widget = WidgetT App IO ()
mkYesodData "App" $(parseRoutesFile "config/routes") mkYesodData "App" $(parseRoutesFile "config/routes")
-- | A convenient synonym for creating forms. -- | A convenient synonym for creating forms.
@ -323,14 +328,11 @@ instance YesodAuth App where
-- Override the above two destinations when a Referer: header is present -- Override the above two destinations when a Referer: header is present
redirectToReferer _ = True redirectToReferer _ = True
getAuthId creds = runDB $ do authenticate creds = runDB $ do
x <- getBy $ UniqueUser $ credsIdent creds x <- getBy $ UniqueUser $ credsIdent creds
case x of return $ case x of
Just (Entity uid _) -> return $ Just uid Just (Entity uid _) -> Authenticated uid
Nothing -> Just <$> insert User Nothing -> UserError InvalidLogin
{ userIdent = credsIdent creds
, 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]
@ -940,6 +942,12 @@ stanzas:
# keter`. Uses `scp` internally, so you can set it to a remote destination # keter`. Uses `scp` internally, so you can set it to a remote destination
# copy-to: user@host:/opt/keter/incoming # copy-to: user@host:/opt/keter/incoming
# You can pass arguments to `scp` used above. This example limits bandwidth to
# 1024 Kbit/s and uses port 2222 instead of the default 22
# copy-to-args:
# - "-l 1024"
# - "-P 2222"
# If you would like to have Keter automatically create a PostgreSQL database # If you would like to have Keter automatically create a PostgreSQL database
# and set appropriate environment variables for it to be discovered, uncomment # and set appropriate environment variables for it to be discovered, uncomment
# the following line. # the following line.

View File

@ -224,6 +224,7 @@ import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile) import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym) import Text.Jasmine (minifym)
import Yesod.Auth.BrowserId (authBrowserId) import Yesod.Auth.BrowserId (authBrowserId)
import Yesod.Auth.Message (AuthMessage (InvalidLogin))
import Yesod.Default.Util (addStaticContentExternal) import Yesod.Default.Util (addStaticContentExternal)
import Yesod.Core.Types (Logger) import Yesod.Core.Types (Logger)
import qualified Yesod.Core.Unsafe as Unsafe import qualified Yesod.Core.Unsafe as Unsafe
@ -250,6 +251,10 @@ instance HasHttpManager App where
-- Note that this is really half the story; in Application.hs, mkYesodDispatch -- Note that this is really half the story; in Application.hs, mkYesodDispatch
-- generates the rest of the code. Please see the linked documentation for an -- generates the rest of the code. Please see the linked documentation for an
-- explanation for this split. -- explanation for this split.
--
-- This function also generates the following type synonyms:
-- type Handler = HandlerT App IO
-- type Widget = WidgetT App IO ()
mkYesodData "App" $(parseRoutesFile "config/routes") mkYesodData "App" $(parseRoutesFile "config/routes")
-- | A convenient synonym for creating forms. -- | A convenient synonym for creating forms.
@ -340,14 +345,11 @@ instance YesodAuth App where
-- Override the above two destinations when a Referer: header is present -- Override the above two destinations when a Referer: header is present
redirectToReferer _ = True redirectToReferer _ = True
getAuthId creds = runDB $ do authenticate creds = runDB $ do
x <- getBy $ UniqueUser $ credsIdent creds x <- getBy $ UniqueUser $ credsIdent creds
case x of return $ case x of
Just (Entity uid _) -> return $ Just uid Just (Entity uid _) -> Authenticated uid
Nothing -> Just <$> insert User Nothing -> UserError InvalidLogin
{ userIdent = credsIdent creds
, 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]
@ -952,6 +954,12 @@ stanzas:
# keter`. Uses `scp` internally, so you can set it to a remote destination # keter`. Uses `scp` internally, so you can set it to a remote destination
# copy-to: user@host:/opt/keter/incoming # copy-to: user@host:/opt/keter/incoming
# You can pass arguments to `scp` used above. This example limits bandwidth to
# 1024 Kbit/s and uses port 2222 instead of the default 22
# copy-to-args:
# - "-l 1024"
# - "-P 2222"
# If you would like to have Keter automatically create a PostgreSQL database # If you would like to have Keter automatically create a PostgreSQL database
# and set appropriate environment variables for it to be discovered, uncomment # and set appropriate environment variables for it to be discovered, uncomment
# the following line. # the following line.

View File

@ -229,6 +229,7 @@ import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Import.NoFoundation import Import.NoFoundation
import Text.Hamlet (hamletFile) import Text.Hamlet (hamletFile)
import Yesod.Auth.BrowserId (authBrowserId) import Yesod.Auth.BrowserId (authBrowserId)
import Yesod.Auth.Message (AuthMessage (InvalidLogin))
import qualified Yesod.Core.Unsafe as Unsafe import qualified Yesod.Core.Unsafe as Unsafe
import Yesod.Core.Types (Logger) import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExternal) import Yesod.Default.Util (addStaticContentExternal)
@ -257,6 +258,10 @@ instance HasHttpManager App where
-- Note that this is really half the story; in Application.hs, mkYesodDispatch -- Note that this is really half the story; in Application.hs, mkYesodDispatch
-- generates the rest of the code. Please see the linked documentation for an -- generates the rest of the code. Please see the linked documentation for an
-- explanation for this split. -- explanation for this split.
--
-- This function also generates the following type synonyms:
-- type Handler = HandlerT App IO
-- type Widget = WidgetT App IO ()
mkYesodData "App" $(parseRoutesFile "config/routes") mkYesodData "App" $(parseRoutesFile "config/routes")
-- | A convenient synonym for creating forms. -- | A convenient synonym for creating forms.
@ -356,14 +361,11 @@ instance YesodAuth App where
-- Override the above two destinations when a Referer: header is present -- Override the above two destinations when a Referer: header is present
redirectToReferer _ = True redirectToReferer _ = True
getAuthId creds = runDB $ do authenticate creds = runDB $ do
x <- getBy $ UniqueUser $ credsIdent creds x <- getBy $ UniqueUser $ credsIdent creds
case x of return $ case x of
Just (Entity uid _) -> return $ Just uid Just (Entity uid _) -> Authenticated uid
Nothing -> Just <$> insert User Nothing -> UserError InvalidLogin
{ userIdent = credsIdent creds
, 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]
@ -565,7 +567,7 @@ library
, yesod-static >= 1.4.0.3 && < 1.5 , yesod-static >= 1.4.0.3 && < 1.5
, yesod-form >= 1.4.0 && < 1.5 , yesod-form >= 1.4.0 && < 1.5
, yesod-fay >= 0.7 && < 0.8 , yesod-fay >= 0.7 && < 0.8
, fay >= 0.21.2.1 && < 0.22 , fay >= 0.21.2.1 && < 0.24
, classy-prelude >= 0.10.2 , classy-prelude >= 0.10.2
, classy-prelude-conduit >= 0.10.2 , classy-prelude-conduit >= 0.10.2
, classy-prelude-yesod >= 0.10.2 , classy-prelude-yesod >= 0.10.2
@ -1011,6 +1013,12 @@ stanzas:
# keter`. Uses `scp` internally, so you can set it to a remote destination # keter`. Uses `scp` internally, so you can set it to a remote destination
# copy-to: user@host:/opt/keter/incoming # copy-to: user@host:/opt/keter/incoming
# You can pass arguments to `scp` used above. This example limits bandwidth to
# 1024 Kbit/s and uses port 2222 instead of the default 22
# copy-to-args:
# - "-l 1024"
# - "-P 2222"
# If you would like to have Keter automatically create a PostgreSQL database # If you would like to have Keter automatically create a PostgreSQL database
# and set appropriate environment variables for it to be discovered, uncomment # and set appropriate environment variables for it to be discovered, uncomment
# the following line. # the following line.

View File

@ -224,6 +224,7 @@ import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile) import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym) import Text.Jasmine (minifym)
import Yesod.Auth.BrowserId (authBrowserId) import Yesod.Auth.BrowserId (authBrowserId)
import Yesod.Auth.Message (AuthMessage (InvalidLogin))
import Yesod.Default.Util (addStaticContentExternal) import Yesod.Default.Util (addStaticContentExternal)
import Yesod.Core.Types (Logger) import Yesod.Core.Types (Logger)
import qualified Yesod.Core.Unsafe as Unsafe import qualified Yesod.Core.Unsafe as Unsafe
@ -250,6 +251,10 @@ instance HasHttpManager App where
-- Note that this is really half the story; in Application.hs, mkYesodDispatch -- Note that this is really half the story; in Application.hs, mkYesodDispatch
-- generates the rest of the code. Please see the linked documentation for an -- generates the rest of the code. Please see the linked documentation for an
-- explanation for this split. -- explanation for this split.
--
-- This function also generates the following type synonyms:
-- type Handler = HandlerT App IO
-- type Widget = WidgetT App IO ()
mkYesodData "App" $(parseRoutesFile "config/routes") mkYesodData "App" $(parseRoutesFile "config/routes")
-- | A convenient synonym for creating forms. -- | A convenient synonym for creating forms.
@ -340,14 +345,11 @@ instance YesodAuth App where
-- Override the above two destinations when a Referer: header is present -- Override the above two destinations when a Referer: header is present
redirectToReferer _ = True redirectToReferer _ = True
getAuthId creds = runDB $ do authenticate creds = runDB $ do
x <- getBy $ UniqueUser $ credsIdent creds x <- getBy $ UniqueUser $ credsIdent creds
case x of return $ case x of
Just (Entity uid _) -> return $ Just uid Just (Entity uid _) -> Authenticated uid
Nothing -> Just <$> insert User Nothing -> UserError InvalidLogin
{ userIdent = credsIdent creds
, 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]
@ -952,6 +954,12 @@ stanzas:
# keter`. Uses `scp` internally, so you can set it to a remote destination # keter`. Uses `scp` internally, so you can set it to a remote destination
# copy-to: user@host:/opt/keter/incoming # copy-to: user@host:/opt/keter/incoming
# You can pass arguments to `scp` used above. This example limits bandwidth to
# 1024 Kbit/s and uses port 2222 instead of the default 22
# copy-to-args:
# - "-l 1024"
# - "-P 2222"
# If you would like to have Keter automatically create a PostgreSQL database # If you would like to have Keter automatically create a PostgreSQL database
# and set appropriate environment variables for it to be discovered, uncomment # and set appropriate environment variables for it to be discovered, uncomment
# the following line. # the following line.

View File

@ -220,6 +220,10 @@ instance HasHttpManager App where
-- Note that this is really half the story; in Application.hs, mkYesodDispatch -- Note that this is really half the story; in Application.hs, mkYesodDispatch
-- generates the rest of the code. Please see the linked documentation for an -- generates the rest of the code. Please see the linked documentation for an
-- explanation for this split. -- explanation for this split.
--
-- This function also generates the following type synonyms:
-- type Handler = HandlerT App IO
-- type Widget = WidgetT App IO ()
mkYesodData "App" $(parseRoutesFile "config/routes") mkYesodData "App" $(parseRoutesFile "config/routes")
-- | A convenient synonym for creating forms. -- | A convenient synonym for creating forms.
@ -853,6 +857,12 @@ stanzas:
# keter`. Uses `scp` internally, so you can set it to a remote destination # keter`. Uses `scp` internally, so you can set it to a remote destination
# copy-to: user@host:/opt/keter/incoming # copy-to: user@host:/opt/keter/incoming
# You can pass arguments to `scp` used above. This example limits bandwidth to
# 1024 Kbit/s and uses port 2222 instead of the default 22
# copy-to-args:
# - "-l 1024"
# - "-P 2222"
# If you would like to have Keter automatically create a PostgreSQL database # If you would like to have Keter automatically create a PostgreSQL database
# and set appropriate environment variables for it to be discovered, uncomment # and set appropriate environment variables for it to be discovered, uncomment
# the following line. # the following line.

View File

@ -224,6 +224,7 @@ import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile) import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym) import Text.Jasmine (minifym)
import Yesod.Auth.BrowserId (authBrowserId) import Yesod.Auth.BrowserId (authBrowserId)
import Yesod.Auth.Message (AuthMessage (InvalidLogin))
import Yesod.Default.Util (addStaticContentExternal) import Yesod.Default.Util (addStaticContentExternal)
import Yesod.Core.Types (Logger) import Yesod.Core.Types (Logger)
import qualified Yesod.Core.Unsafe as Unsafe import qualified Yesod.Core.Unsafe as Unsafe
@ -250,6 +251,10 @@ instance HasHttpManager App where
-- Note that this is really half the story; in Application.hs, mkYesodDispatch -- Note that this is really half the story; in Application.hs, mkYesodDispatch
-- generates the rest of the code. Please see the linked documentation for an -- generates the rest of the code. Please see the linked documentation for an
-- explanation for this split. -- explanation for this split.
--
-- This function also generates the following type synonyms:
-- type Handler = HandlerT App IO
-- type Widget = WidgetT App IO ()
mkYesodData "App" $(parseRoutesFile "config/routes") mkYesodData "App" $(parseRoutesFile "config/routes")
-- | A convenient synonym for creating forms. -- | A convenient synonym for creating forms.
@ -340,14 +345,11 @@ instance YesodAuth App where
-- Override the above two destinations when a Referer: header is present -- Override the above two destinations when a Referer: header is present
redirectToReferer _ = True redirectToReferer _ = True
getAuthId creds = runDB $ do authenticate creds = runDB $ do
x <- getBy $ UniqueUser $ credsIdent creds x <- getBy $ UniqueUser $ credsIdent creds
case x of return $ case x of
Just (Entity uid _) -> return $ Just uid Just (Entity uid _) -> Authenticated uid
Nothing -> Just <$> insert User Nothing -> UserError InvalidLogin
{ userIdent = credsIdent creds
, 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]
@ -952,6 +954,12 @@ stanzas:
# keter`. Uses `scp` internally, so you can set it to a remote destination # keter`. Uses `scp` internally, so you can set it to a remote destination
# copy-to: user@host:/opt/keter/incoming # copy-to: user@host:/opt/keter/incoming
# You can pass arguments to `scp` used above. This example limits bandwidth to
# 1024 Kbit/s and uses port 2222 instead of the default 22
# copy-to-args:
# - "-l 1024"
# - "-P 2222"
# If you would like to have Keter automatically create a PostgreSQL database # If you would like to have Keter automatically create a PostgreSQL database
# and set appropriate environment variables for it to be discovered, uncomment # and set appropriate environment variables for it to be discovered, uncomment
# the following line. # the following line.

View File

@ -1,5 +1,5 @@
name: yesod-bin name: yesod-bin
version: 1.4.9.2 version: 1.4.10
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com> author: Michael Snoyman <michael@snoyman.com>