From d3e4831b3808d0c38ad1c0126023ef7fea45d7e9 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 14 Sep 2014 07:23:19 +0300 Subject: [PATCH] Scaffolding update --- yesod-bin/hsfiles/mongo.hsfiles | 16 +++++++--------- yesod-bin/hsfiles/mysql.hsfiles | 16 ++++++++-------- yesod-bin/hsfiles/postgres-fay.hsfiles | 16 ++++++++-------- yesod-bin/hsfiles/postgres.hsfiles | 16 ++++++++-------- yesod-bin/hsfiles/simple.hsfiles | 4 ++-- yesod-bin/hsfiles/sqlite.hsfiles | 16 ++++++++-------- yesod-bin/yesod-bin.cabal | 2 +- 7 files changed, 42 insertions(+), 44 deletions(-) diff --git a/yesod-bin/hsfiles/mongo.hsfiles b/yesod-bin/hsfiles/mongo.hsfiles index 6fce7882..1ec3ae44 100644 --- a/yesod-bin/hsfiles/mongo.hsfiles +++ b/yesod-bin/hsfiles/mongo.hsfiles @@ -188,7 +188,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -230,7 +230,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = Action + type YesodPersistBackend App = MongoContext runDB = defaultRunDB persistConfig connPool instance YesodAuth App where @@ -359,9 +359,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -let mongoSettings = (mkPersistSettings (ConT ''MongoBackend)) - { mpsGeneric = False - } +let mongoSettings = (mkPersistSettings (ConT ''MongoContext)) in share [mkPersist mongoSettings] $(persistFileWith upperCaseSettings "config/models") @@ -411,15 +409,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-mongoDB >= 1.3 && < 1.5 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-mongoDB >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/hsfiles/mysql.hsfiles b/yesod-bin/hsfiles/mysql.hsfiles index d02bfadb..f3f0e37f 100644 --- a/yesod-bin/hsfiles/mysql.hsfiles +++ b/yesod-bin/hsfiles/mysql.hsfiles @@ -130,7 +130,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -195,7 +195,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -237,7 +237,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -366,7 +366,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -415,15 +415,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-mysql >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-mysql >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/hsfiles/postgres-fay.hsfiles b/yesod-bin/hsfiles/postgres-fay.hsfiles index a8920c3b..c0f3a608 100644 --- a/yesod-bin/hsfiles/postgres-fay.hsfiles +++ b/yesod-bin/hsfiles/postgres-fay.hsfiles @@ -133,7 +133,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -199,7 +199,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -250,7 +250,7 @@ instance YesodFay App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -398,7 +398,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -451,7 +451,7 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 @@ -459,9 +459,9 @@ library , fay >= 0.16 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-postgresql >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-postgresql >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , monad-control >= 0.3 && < 0.4 diff --git a/yesod-bin/hsfiles/postgres.hsfiles b/yesod-bin/hsfiles/postgres.hsfiles index bb8e1346..0634535a 100644 --- a/yesod-bin/hsfiles/postgres.hsfiles +++ b/yesod-bin/hsfiles/postgres.hsfiles @@ -130,7 +130,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -195,7 +195,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -237,7 +237,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -366,7 +366,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -415,15 +415,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-postgresql >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-postgresql >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/hsfiles/simple.hsfiles b/yesod-bin/hsfiles/simple.hsfiles index 449a2e4f..ec1ccb2a 100644 --- a/yesod-bin/hsfiles/simple.hsfiles +++ b/yesod-bin/hsfiles/simple.hsfiles @@ -174,7 +174,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -342,7 +342,7 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 diff --git a/yesod-bin/hsfiles/sqlite.hsfiles b/yesod-bin/hsfiles/sqlite.hsfiles index bd288dd8..0d3772b6 100644 --- a/yesod-bin/hsfiles/sqlite.hsfiles +++ b/yesod-bin/hsfiles/sqlite.hsfiles @@ -130,7 +130,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -195,7 +195,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -237,7 +237,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -366,7 +366,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -415,15 +415,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-sqlite >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-sqlite >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 5952d4f3..e7d3ab65 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -1,5 +1,5 @@ name: yesod-bin -version: 1.2.12.8 +version: 1.2.13 license: MIT license-file: LICENSE author: Michael Snoyman