packages feed

yesod-auth-hashdb 1.7 → 1.7.1

raw patch · 5 files changed

+20/−15 lines, 5 filesdep ~persistentPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: persistent

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,8 @@+## 1.7.1++* Relax upper bounds to allow persistent-2.9 (for GHC 8.6 versions of Stackage nightly)+* Remove testing of GHC below 8.0.2, and lts below 9+ ## 1.7  * Update for changes in yesod version 1.6, but retain compatibility with previous versions
stack.yaml view
@@ -1,4 +1,4 @@-resolver: lts-10.5+resolver: lts-12.19 packages: - . extra-deps: []
test/IntegrationTest.hs view
@@ -11,10 +11,10 @@ import qualified Data.Aeson as JSON import Network.Wai.Test             (simpleBody) import Test.Hspec                   (Spec, SpecWith, before,-                                     describe, context, it)+                                     describe, it) import qualified Yesod.Test as YT -import TestSite                     (App, Route(..), Handler, runDB)+import TestSite                     (App, Route(..)) import TestTools  type MyTestApp = YT.TestApp App@@ -24,7 +24,7 @@ authUrl :: Text authUrl = "http://localhost:3000/auth/login" -data AuthUrl = AuthUrl Text deriving Eq+data AuthUrl = AuthUrl Text deriving (Eq, Show) instance FromJSON AuthUrl where     parseJSON (JSON.Object v) = AuthUrl <$> v .: "authentication_url"     parseJSON _ = mempty@@ -32,7 +32,7 @@ loginUrl :: Text loginUrl = "http://localhost:3000/auth/page/hashdb/login" -data LoginUrl = LoginUrl Text deriving Eq+data LoginUrl = LoginUrl Text deriving (Eq, Show) instance FromJSON LoginUrl where     parseJSON (JSON.Object v) = LoginUrl <$> v .: "loginUrl"     parseJSON _ = mempty@@ -40,7 +40,7 @@ successMsg :: Text successMsg = "Login Successful" -data SuccessMsg = SuccessMsg Text deriving Eq+data SuccessMsg = SuccessMsg Text deriving (Eq, Show) instance FromJSON SuccessMsg where     parseJSON (JSON.Object v) = SuccessMsg <$> v .: "message"     parseJSON _ = mempty@@ -101,7 +101,7 @@           YT.addRequestHeader ("Accept", "application/json")         YT.statusIs 401         auth <- getBodyJSON-        YT.assertEqual "Authentication URL" auth (Just $ AuthUrl authUrl)+        YT.assertEq "Authentication URL" auth (Just $ AuthUrl authUrl)       it "Custom loginHandler using submitRouteHashDB has correct URL in JSON" $ do         YT.request $ do           YT.setMethod "GET"@@ -109,7 +109,7 @@           YT.addRequestHeader ("Accept", "application/json")         YT.statusIs 200         login <- getBodyJSON-        YT.assertEqual "Login URL" login (Just $ LoginUrl loginUrl)+        YT.assertEq "Login URL" login (Just $ LoginUrl loginUrl)       -- This example needs yesod-test >= 1.5.0.1, since older ones use wrong       -- content type for JSON (https://github.com/yesodweb/yesod/issues/1063).       it "Sending JSON username and password produces JSON success message" $ do@@ -128,4 +128,4 @@           YT.addTokenFromCookie         YT.statusIs 200         msg <- getBodyJSON-        YT.assertEqual "Login success" msg (Just $ SuccessMsg successMsg)+        YT.assertEq "Login success" msg (Just $ SuccessMsg successMsg)
test/TestTools.hs view
@@ -38,7 +38,7 @@  -- Force failure by swearing that black is white, and pigs can fly... assertFailure :: String -> YesodExample App ()-assertFailure msg = assertEqual msg True False+assertFailure msg = assertEq msg True False  -- Convert an absolute URL (eg extracted from responses) to just the path -- for use in test requests.@@ -60,7 +60,7 @@  assertLoginPage :: ByteString -> YesodExample App () assertLoginPage loc = do-    assertEqual "correct login redirection location"+    assertEq "correct login redirection location"                 (testRoot ++ "/auth/login") loc     get $ urlPathB loc     statusIs 200@@ -81,7 +81,7 @@ extractLocation = do     withResponse ( \ SResponse { simpleStatus = s, simpleHeaders = h } -> do                         let code = statusCode s-                        assertEqual ("Expected a 302 or 303 redirection status "+                        assertEq ("Expected a 302 or 303 redirection status "                                      ++ "but received " ++ Prelude.show code)                                     (code `elem` [302,303])                                     True@@ -119,7 +119,7 @@ doLoginPart2 :: Maybe ByteString -> YesodExample App (Maybe ByteString) doLoginPart2 mbloc2 = do     maybe (assertFailure "Should have second location header")-          (assertEqual "Check after-login redirection" $ testRoot ++ afterLogin)+          (assertEq "Check after-login redirection" $ testRoot ++ afterLogin)           mbloc2     -- Now get the home page to obtain the sessAuth value     get ("/" :: Text)
yesod-auth-hashdb.cabal view
@@ -1,5 +1,5 @@ name:            yesod-auth-hashdb-version:         1.7+version:         1.7.1 license:         MIT license-file:    LICENSE author:          Patrick Brisbin, later changes Paul Rouse@@ -38,7 +38,7 @@                    , yesod-auth              >= 1.4.18     && < 1.7                    , text                    >= 0.7                    , yesod-persistent        >= 1.2-                   , persistent              >= 2.1        && < 2.9+                   , persistent              >= 2.1        && < 2.10                    , yesod-form              >= 1.4        && < 1.7                    , aeson