From a4bfb2a0cafd5dbcb6c8879520405e07ec0367cf Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 18 Aug 2011 17:59:25 +0300 Subject: [PATCH] Mirror naming changes in shakespeare --- install-all.sh | 5 +-- yesod-auth/Yesod/Auth.hs | 6 ++-- yesod-auth/Yesod/Auth/HashDB.hs | 6 ++-- yesod-auth/Yesod/Auth/OAuth.hs | 4 +-- yesod-auth/Yesod/Auth/OpenId.hs | 3 -- yesod-core/Yesod/Handler.hs | 4 +-- yesod-core/Yesod/Internal.hs | 22 +++++++------- yesod-core/Yesod/Internal/Core.hs | 8 ++--- yesod-core/Yesod/Widget.hs | 49 ++++++++++++++++-------------- yesod-form/Yesod/Form/Functions.hs | 6 ++-- yesod-form/Yesod/Form/Jquery.hs | 6 ++-- yesod-form/Yesod/Form/Nic.hs | 6 ++-- yesod-newsfeed/Yesod/AtomFeed.hs | 6 ++-- yesod-newsfeed/Yesod/RssFeed.hs | 6 ++-- yesod-sitemap/Yesod/Sitemap.hs | 4 +-- yesod/Yesod.hs | 14 +++++---- yesod/scaffold/sitearg.hs.cg | 4 +-- 17 files changed, 79 insertions(+), 80 deletions(-) diff --git a/install-all.sh b/install-all.sh index d07abd5f..69c2993b 100755 --- a/install-all.sh +++ b/install-all.sh @@ -2,7 +2,6 @@ CABAL=cabal -$CABAL update # install testing dependencies $CABAL install HUnit QuickCheck hspec @@ -11,8 +10,6 @@ for package in $PACKAGES do echo Installing $package cd $package - ($CABAL configure --enable-tests || - ($CABAL install --only-dependencies && $CABAL configure --enable-tests) - ) && $CABAL build && $CABAL test && ./Setup.lhs install || exit + $CABAL configure --enable-tests && $CABAL build && $CABAL test && ./Setup.lhs install || exit cd .. done diff --git a/yesod-auth/Yesod/Auth.hs b/yesod-auth/Yesod/Auth.hs index abffaa90..ae5e5074 100644 --- a/yesod-auth/Yesod/Auth.hs +++ b/yesod-auth/Yesod/Auth.hs @@ -39,7 +39,7 @@ import qualified Data.Map as Map import Language.Haskell.TH.Syntax hiding (lift) import qualified Network.Wai as W -import Text.Hamlet (html) +import Text.Hamlet (shamlet) import Yesod.Core import Yesod.Persist @@ -119,7 +119,7 @@ setCreds doRedirects creds = do Nothing -> when doRedirects $ do case authRoute y of - Nothing -> do rh <- defaultLayout $ addHtml [QQ(html)|

Invalid login |] + Nothing -> do rh <- defaultLayout $ addHtml [QQ(shamlet)|

Invalid login |] sendResponse rh Just ar -> do setMessageI Msg.InvalidLogin redirect RedirectTemporary ar @@ -137,7 +137,7 @@ getCheckR = do addHtml $ html' creds) (json' creds) where html' creds = - [QQ(html)| + [QQ(shamlet)|

Authentication Status $maybe _ <- creds

Logged in. diff --git a/yesod-auth/Yesod/Auth/HashDB.hs b/yesod-auth/Yesod/Auth/HashDB.hs index 58126e1a..358c9345 100644 --- a/yesod-auth/Yesod/Auth/HashDB.hs +++ b/yesod-auth/Yesod/Auth/HashDB.hs @@ -78,7 +78,7 @@ import Yesod.Handler import Yesod.Form import Yesod.Auth import Yesod.Widget (addHamlet) -import Text.Hamlet (hamlet, html) +import Text.Hamlet (hamlet, shamlet) import Control.Applicative ((<$>), (<*>)) import Control.Monad (replicateM,liftM) @@ -167,7 +167,7 @@ postLoginR uniq = do (validateUser <$> (uniq =<< mu) <*> mp) if isValid then setCreds True $ Creds "hashdb" (fromMaybe "" mu) [] - else do setMessage [QQ(html)| Invalid username/password |] + else do setMessage [QQ(shamlet)| Invalid username/password |] toMaster <- getRouteToMaster redirect RedirectTemporary $ toMaster LoginR @@ -196,7 +196,7 @@ getAuthIdHashDB authR uniq creds = do -- user exists Just (uid, _) -> return $ Just uid Nothing -> do - setMessage [QQ(html)| User not found |] + setMessage [QQ(shamlet)| User not found |] redirect RedirectTemporary $ authR LoginR -- | Prompt for username and password, validate that against a database diff --git a/yesod-auth/Yesod/Auth/OAuth.hs b/yesod-auth/Yesod/Auth/OAuth.hs index d9ca50f4..ebb1251d 100644 --- a/yesod-auth/Yesod/Auth/OAuth.hs +++ b/yesod-auth/Yesod/Auth/OAuth.hs @@ -13,7 +13,7 @@ import Yesod.Auth import Yesod.Form import Yesod.Handler import Yesod.Widget -import Text.Hamlet (html) +import Text.Hamlet (shamlet) import Web.Authenticate.OAuth import Data.Maybe import Data.String @@ -69,7 +69,7 @@ authOAuth name ident reqUrl accUrl authUrl key sec = AuthPlugin name dispatch lo render <- lift getUrlRender let oaUrl = render $ tm $ oauthUrl name addHtml - [QQ(html)| Login with #{name} |] + [QQ(shamlet)| Login with #{name} |] authTwitter :: YesodAuth m => String -- ^ Consumer Key diff --git a/yesod-auth/Yesod/Auth/OpenId.hs b/yesod-auth/Yesod/Auth/OpenId.hs index 28fd9166..d27e49a6 100644 --- a/yesod-auth/Yesod/Auth/OpenId.hs +++ b/yesod-auth/Yesod/Auth/OpenId.hs @@ -16,7 +16,6 @@ import Yesod.Form import Yesod.Handler import Yesod.Widget import Yesod.Request -import Text.Hamlet (hamlet) import Text.Cassius (cassius) import Text.Blaze (toHtml) import Control.Monad.Trans.Class (lift) @@ -34,13 +33,11 @@ authOpenId = name = "openid_identifier" login tm = do ident <- lift newIdent - y <- lift getYesod addCassius [QQ(cassius)|##{ident} background: #fff url(http://www.myopenid.com/static/openid-icon-small.gif) no-repeat scroll 0pt 50%; padding-left: 18px; |] - l <- lift languages [QQ(whamlet)|