From dddae247864ebc301949a59571dafe01e886d503 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Tue, 7 Feb 2017 01:00:00 +0530 Subject: [PATCH 01/20] Export plugin identifier for GoogleEmail2 module --- yesod-auth/Yesod/Auth/GoogleEmail2.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/yesod-auth/Yesod/Auth/GoogleEmail2.hs b/yesod-auth/Yesod/Auth/GoogleEmail2.hs index a1302999..06485e7c 100644 --- a/yesod-auth/Yesod/Auth/GoogleEmail2.hs +++ b/yesod-auth/Yesod/Auth/GoogleEmail2.hs @@ -46,6 +46,8 @@ module Yesod.Auth.GoogleEmail2 , Place(..) , Email(..) , EmailType(..) + -- * Other functions + , pid ) where import Yesod.Auth (Auth, AuthPlugin (AuthPlugin), @@ -95,6 +97,10 @@ import Network.HTTP.Types (renderQueryText) import System.IO.Unsafe (unsafePerformIO) +-- | Plugin identifier. This is used to identify the plugin used for +-- authentication. The 'credsPlugin' will contain this value when this +-- plugin is used for authentication. +-- @since 1.4.17 pid :: Text pid = "googleemail2" From 854e0e45e7cb6ca30b37e1fb266a280fe1f5fcf3 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Tue, 7 Feb 2017 01:00:19 +0530 Subject: [PATCH 02/20] Update relevant changelog --- yesod-auth/ChangeLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/yesod-auth/ChangeLog.md b/yesod-auth/ChangeLog.md index ea924908..22786b33 100644 --- a/yesod-auth/ChangeLog.md +++ b/yesod-auth/ChangeLog.md @@ -1,6 +1,7 @@ ## 1.4.17 * Add Show instance for user credentials `Creds` +* Export pid type for identifying plugin ## 1.4.16 From d1ec382fc64515aec64b64139df87b3204fa06c5 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Tue, 7 Feb 2017 01:01:05 +0530 Subject: [PATCH 03/20] Better haddock rendering: Since -> @since --- yesod-auth/Yesod/Auth/GoogleEmail2.hs | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/yesod-auth/Yesod/Auth/GoogleEmail2.hs b/yesod-auth/Yesod/Auth/GoogleEmail2.hs index 06485e7c..57db613e 100644 --- a/yesod-auth/Yesod/Auth/GoogleEmail2.hs +++ b/yesod-auth/Yesod/Auth/GoogleEmail2.hs @@ -22,7 +22,7 @@ -- -- * Enable the Google+ API. -- --- Since 1.3.1 +-- @since 1.3.1 module Yesod.Auth.GoogleEmail2 ( -- * Authentication handlers authGoogleEmail @@ -141,7 +141,7 @@ authGoogleEmail = authPlugin False -- | An alternative version which stores user access token in the session -- variable. Use it if you want to request user's profile from your app. -- --- Since 1.4.3 +-- @since 1.4.3 authGoogleEmailSaveToken :: YesodAuth m => Text -- ^ client ID -> Text -- ^ client secret @@ -268,7 +268,7 @@ makeHttpRequest req = lift $ -- In case of parsing error returns 'Nothing'. -- Will throw 'HttpException' in case of network problems or error response code. -- --- Since 1.4.3 +-- @since 1.4.3 getPerson :: Manager -> Token -> HandlerT site IO (Maybe Person) getPerson manager token = parseMaybe parseJSON <$> (do req <- personValueRequest token @@ -297,7 +297,7 @@ personValueRequest token = do -- 'authGoogleEmailSaveToken'. -- You can acquire saved token with 'getUserAccessToken'. -- --- Since 1.4.3 +-- @since 1.4.3 data Token = Token { accessToken :: Text , tokenType :: Text } deriving (Show, Eq) @@ -310,7 +310,7 @@ instance FromJSON Token where -------------------------------------------------------------------------------- -- | Gender of the person -- --- Since 1.4.3 +-- @since 1.4.3 data Gender = Male | Female | OtherGender deriving (Show, Eq) instance FromJSON Gender where @@ -322,7 +322,7 @@ instance FromJSON Gender where -------------------------------------------------------------------------------- -- | URIs specified in the person's profile -- --- Since 1.4.3 +-- @since 1.4.3 data PersonURI = PersonURI { uriLabel :: Maybe Text , uriValue :: Maybe Text @@ -337,7 +337,7 @@ instance FromJSON PersonURI where -------------------------------------------------------------------------------- -- | The type of URI -- --- Since 1.4.3 +-- @since 1.4.3 data PersonURIType = OtherProfile -- ^ URI for another profile | Contributor -- ^ URI to a site for which this person is a contributor | Website -- ^ URI for this Google+ Page's primary website @@ -356,7 +356,7 @@ instance FromJSON PersonURIType where -------------------------------------------------------------------------------- -- | Current or past organizations with which this person is associated -- --- Since 1.4.3 +-- @since 1.4.3 data Organization = Organization { orgName :: Maybe Text -- ^ The person's job title or role within the organization @@ -383,7 +383,7 @@ instance FromJSON Organization where -------------------------------------------------------------------------------- -- | The type of an organization -- --- Since 1.4.3 +-- @since 1.4.3 data OrganizationType = Work | School | OrganizationType Text -- ^ Something else @@ -397,7 +397,7 @@ instance FromJSON OrganizationType where -------------------------------------------------------------------------------- -- | A place where the person has lived or is living at the moment. -- --- Since 1.4.3 +-- @since 1.4.3 data Place = Place { -- | A place where this person has lived. For example: "Seattle, WA", "Near Toronto". placeValue :: Maybe Text @@ -411,7 +411,7 @@ instance FromJSON Place where -------------------------------------------------------------------------------- -- | Individual components of a name -- --- Since 1.4.3 +-- @since 1.4.3 data Name = Name { -- | The full name of this person, including middle names, suffixes, etc nameFormatted :: Maybe Text @@ -438,7 +438,7 @@ instance FromJSON Name where -------------------------------------------------------------------------------- -- | The person's relationship status. -- --- Since 1.4.3 +-- @since 1.4.3 data RelationshipStatus = Single -- ^ Person is single | InRelationship -- ^ Person is in a relationship | Engaged -- ^ Person is engaged @@ -467,7 +467,7 @@ instance FromJSON RelationshipStatus where -------------------------------------------------------------------------------- -- | The URI of the person's profile photo. -- --- Since 1.4.3 +-- @since 1.4.3 newtype PersonImage = PersonImage { imageUri :: Text } deriving (Show, Eq) instance FromJSON PersonImage where @@ -477,7 +477,7 @@ instance FromJSON PersonImage where -- the image under the URI. If for some reason you need to modify the query -- part, you should do it after resizing. -- --- Since 1.4.3 +-- @since 1.4.3 resizePersonImage :: PersonImage -> Int -> PersonImage resizePersonImage (PersonImage uri) size = PersonImage $ uri `mappend` "?sz=" `mappend` T.pack (show size) @@ -486,7 +486,7 @@ resizePersonImage (PersonImage uri) size = -- | Information about the user -- Full description of the resource https://developers.google.com/+/api/latest/people -- --- Since 1.4.3 +-- @since 1.4.3 data Person = Person { personId :: Text -- | The name of this person, which is suitable for display @@ -556,7 +556,7 @@ instance FromJSON Person where -------------------------------------------------------------------------------- -- | Person's email -- --- Since 1.4.3 +-- @since 1.4.3 data Email = Email { emailValue :: Text , emailType :: EmailType @@ -571,7 +571,7 @@ instance FromJSON Email where -------------------------------------------------------------------------------- -- | Type of email -- --- Since 1.4.3 +-- @since 1.4.3 data EmailType = EmailAccount -- ^ Google account email address | EmailHome -- ^ Home email address | EmailWork -- ^ Work email adress From e90b31bb4a57d468c5d8428f7d84fe0ec31bea41 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 5 Feb 2017 14:38:50 +0200 Subject: [PATCH 04/20] Add appveyor.yml --- appveyor.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..8f05d2cf --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,16 @@ +build: off + +before_test: +- curl -sS -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386 +- 7z x stack.zip stack.exe + +clone_folder: "c:\\stack" +environment: + global: + STACK_ROOT: "c:\\sr" + +test_script: +- stack setup > nul +# The ugly echo "" hack is to avoid complaints about 0 being an invalid file +# descriptor +- echo "" | stack --no-terminal test From 954f813569278ea80df61942537c91c1ab79d78e Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 7 Feb 2017 15:23:35 +0200 Subject: [PATCH 05/20] Fix route parsing for CRLF line endings --- yesod-core/Yesod/Routes/Parse.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-core/Yesod/Routes/Parse.hs b/yesod-core/Yesod/Routes/Parse.hs index b5be876a..580f23d6 100644 --- a/yesod-core/Yesod/Routes/Parse.hs +++ b/yesod-core/Yesod/Routes/Parse.hs @@ -63,7 +63,7 @@ parseRoutesNoCheck = QuasiQuoter -- invalid input. resourcesFromString :: String -> [ResourceTree String] resourcesFromString = - fst . parse 0 . filter (not . all (== ' ')) . lines + fst . parse 0 . filter (not . all (== ' ')) . lines . filter (/= '\r') where parse _ [] = ([], []) parse indent (thisLine:otherLines) From 1bc1ef5a35e0fae15ee990fa1876cdc91a2fc4e3 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 7 Feb 2017 15:51:16 +0200 Subject: [PATCH 06/20] Fix a CR test failure --- yesod-static/test/FileGeneratorTests.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yesod-static/test/FileGeneratorTests.hs b/yesod-static/test/FileGeneratorTests.hs index d1bffa34..98660724 100644 --- a/yesod-static/test/FileGeneratorTests.hs +++ b/yesod-static/test/FileGeneratorTests.hs @@ -78,7 +78,8 @@ fileGenSpecs = do describe "Compress" $ do it "compress tool function" $ do out <- compressTool "runhaskell" [] "main = putStrLn \"Hello World\"" - assertEqual "" "Hello World\n" out + -- 13 == CR, to make this test work on Windows + BL.filter (/= 13) out `shouldBe` "Hello World\n" it "tryCompressTools" $ do out <- flip tryCompressTools "abcdef" From 9ee3c3707441963835be04d38b14831c6d9e4b29 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 7 Feb 2017 15:23:58 +0200 Subject: [PATCH 07/20] Allow latest nightly --- stack.yaml | 2 +- yesod-auth-oauth/yesod-auth-oauth.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stack.yaml b/stack.yaml index 03dfba42..e89cf2a8 100644 --- a/stack.yaml +++ b/stack.yaml @@ -16,7 +16,7 @@ packages: # Needed for LTS 2 extra-deps: -- wai-app-static-3.1.4.1 +- wai-app-static-3.1.6.1 - http-api-data-0.2 - yaml-0.8.17 - nonce-1.0.2 diff --git a/yesod-auth-oauth/yesod-auth-oauth.cabal b/yesod-auth-oauth/yesod-auth-oauth.cabal index 791e7a30..c8bb47b9 100644 --- a/yesod-auth-oauth/yesod-auth-oauth.cabal +++ b/yesod-auth-oauth/yesod-auth-oauth.cabal @@ -21,7 +21,7 @@ library cpp-options: -DGHC7 else build-depends: base >= 4 && < 4.3 - build-depends: authenticate-oauth >= 1.5 && < 1.6 + build-depends: authenticate-oauth >= 1.5 && < 1.7 , bytestring >= 0.9.1.4 , yesod-core >= 1.4 && < 1.5 , yesod-auth >= 1.4 && < 1.5 From a53d2cecf50db1c144e3933f74a4dbc2c759005a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 7 Feb 2017 19:00:48 +0200 Subject: [PATCH 08/20] Try using cabal-head to work around haskell/cabal#4298 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index aab881d9..961b30e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,9 +53,9 @@ matrix: - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 7.10.3" addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} - - env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7 + - env: BUILD=cabal GHCVER=8.0.1 CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 8.0.1" - addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-head,ghc-8.0.1,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} # Build with the newest GHC and cabal-install. This is an accepted failure, # see below. From b55b919800ff65f161149997e111a34618b70d32 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 7 Feb 2017 20:48:43 +0200 Subject: [PATCH 09/20] Revert "Allow latest nightly" This reverts commit 9ee3c3707441963835be04d38b14831c6d9e4b29. --- stack.yaml | 2 +- yesod-auth-oauth/yesod-auth-oauth.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stack.yaml b/stack.yaml index e89cf2a8..03dfba42 100644 --- a/stack.yaml +++ b/stack.yaml @@ -16,7 +16,7 @@ packages: # Needed for LTS 2 extra-deps: -- wai-app-static-3.1.6.1 +- wai-app-static-3.1.4.1 - http-api-data-0.2 - yaml-0.8.17 - nonce-1.0.2 diff --git a/yesod-auth-oauth/yesod-auth-oauth.cabal b/yesod-auth-oauth/yesod-auth-oauth.cabal index c8bb47b9..791e7a30 100644 --- a/yesod-auth-oauth/yesod-auth-oauth.cabal +++ b/yesod-auth-oauth/yesod-auth-oauth.cabal @@ -21,7 +21,7 @@ library cpp-options: -DGHC7 else build-depends: base >= 4 && < 4.3 - build-depends: authenticate-oauth >= 1.5 && < 1.7 + build-depends: authenticate-oauth >= 1.5 && < 1.6 , bytestring >= 0.9.1.4 , yesod-core >= 1.4 && < 1.5 , yesod-auth >= 1.4 && < 1.5 From 58119d90cc48a1a28b06f857d751f4ca285434d4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 7 Feb 2017 21:02:26 +0200 Subject: [PATCH 10/20] Another build speed-up attempt * Don't do the pre-build * Apply --fast to dependencies on OS X --- .travis.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 961b30e5..971066c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -152,23 +152,6 @@ before_install: install: - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" - if [ -f configure.ac ]; then autoreconf -i; fi -- | - set -ex - case "$BUILD" in - stack) - stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies - ;; - cabal) - cabal --version - travis_retry cabal update - - # Get the list of packages from the stack.yaml file - PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') - - cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES - ;; - esac - set +ex script: - | @@ -177,6 +160,9 @@ script: stack) if [ `uname` = "Darwin" ] then + # Build dependencies with -O0 as well + echo "apply-ghc-options: everything" >> stack.yaml + # Use slightly less intensive options on OS X due to Travis timeouts stack --no-terminal $ARGS test --fast --pedantic else @@ -184,6 +170,12 @@ script: fi ;; cabal) + cabal --version + travis_retry cabal update + + # Get the list of packages from the stack.yaml file + PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') + cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES ORIGDIR=$(pwd) From fc9d45aa33c5491b3df5dd2841ab58aaa374b6fd Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 7 Feb 2017 21:05:44 +0200 Subject: [PATCH 11/20] Nightly: use solver --update-config --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 971066c4..b94ecfe4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -152,6 +152,13 @@ before_install: install: - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" - if [ -f configure.ac ]; then autoreconf -i; fi +- | + set -ex + if [ "$RESOLVER" = "--resolver nightly" ] + then + stack $RESOLVER solver --update-config + fi + set +ex script: - | From e83d01800293ed07142e11fa0ff06e112318208f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 8 Feb 2017 07:01:17 +0200 Subject: [PATCH 12/20] Add missing --install-ghc --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b94ecfe4..ae9cfa83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -171,9 +171,9 @@ script: echo "apply-ghc-options: everything" >> stack.yaml # Use slightly less intensive options on OS X due to Travis timeouts - stack --no-terminal $ARGS test --fast --pedantic + stack --install-ghc --no-terminal $ARGS test --fast --pedantic else - stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --pedantic + stack --install-ghc --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --pedantic fi ;; cabal) From 305931f322dcbb038623af5a6b1f81839534c891 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 8 Feb 2017 08:13:35 +0200 Subject: [PATCH 13/20] Not pedantic on OS X (since it applies to deps too) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ae9cfa83..ebfcea75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -171,7 +171,7 @@ script: echo "apply-ghc-options: everything" >> stack.yaml # Use slightly less intensive options on OS X due to Travis timeouts - stack --install-ghc --no-terminal $ARGS test --fast --pedantic + stack --install-ghc --no-terminal $ARGS test --fast else stack --install-ghc --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --pedantic fi From 86411d25f25257c499ade6a6353ec60e6de16b28 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 8 Feb 2017 09:08:10 +0200 Subject: [PATCH 14/20] Silly typo --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebfcea75..ef2d8a0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -154,9 +154,9 @@ install: - if [ -f configure.ac ]; then autoreconf -i; fi - | set -ex - if [ "$RESOLVER" = "--resolver nightly" ] + if [ "$ARGS" = "--resolver nightly" ] then - stack $RESOLVER solver --update-config + stack $ARGS solver --update-config fi set +ex From cdc6c8ae049cd6275ff1feffaa8b5178b8a2f00f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 8 Feb 2017 11:20:31 +0200 Subject: [PATCH 15/20] Version bumps/changelog updates --- yesod-auth-oauth/ChangeLog.md | 4 ++++ yesod-auth-oauth/yesod-auth-oauth.cabal | 2 +- yesod-auth/ChangeLog.md | 1 + yesod-auth/yesod-auth.cabal | 2 +- yesod-bin/ChangeLog.md | 4 ++++ yesod-bin/yesod-bin.cabal | 2 +- yesod-core/ChangeLog.md | 5 +++++ yesod-core/yesod-core.cabal | 2 +- yesod-eventsource/ChangeLog.md | 4 +++- yesod-eventsource/yesod-eventsource.cabal | 2 +- yesod-form/ChangeLog.md | 4 ++++ yesod-form/yesod-form.cabal | 2 +- yesod-persistent/ChangeLog.md | 4 ++++ yesod-persistent/yesod-persistent.cabal | 2 +- yesod-static/ChangeLog.md | 5 +++++ yesod-static/yesod-static.cabal | 2 +- yesod-test/ChangeLog.md | 4 ++++ yesod-test/yesod-test.cabal | 2 +- yesod-websockets/ChangeLog.md | 4 ++++ yesod-websockets/yesod-websockets.cabal | 2 +- yesod/ChangeLog.md | 4 ++++ yesod/yesod.cabal | 2 +- 22 files changed, 53 insertions(+), 12 deletions(-) diff --git a/yesod-auth-oauth/ChangeLog.md b/yesod-auth-oauth/ChangeLog.md index 8dd1ceac..fb5ca395 100644 --- a/yesod-auth-oauth/ChangeLog.md +++ b/yesod-auth-oauth/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.2 + +* Fix warnings + ## 1.4.1 * change OAuth Twitter ID, screen_name → user_id [#1168](https://github.com/yesodweb/yesod/pull/1168) diff --git a/yesod-auth-oauth/yesod-auth-oauth.cabal b/yesod-auth-oauth/yesod-auth-oauth.cabal index 791e7a30..34a5a1f6 100644 --- a/yesod-auth-oauth/yesod-auth-oauth.cabal +++ b/yesod-auth-oauth/yesod-auth-oauth.cabal @@ -1,5 +1,5 @@ name: yesod-auth-oauth -version: 1.4.1.1 +version: 1.4.2 license: BSD3 license-file: LICENSE author: Hiromi Ishii diff --git a/yesod-auth/ChangeLog.md b/yesod-auth/ChangeLog.md index 22786b33..9f56492c 100644 --- a/yesod-auth/ChangeLog.md +++ b/yesod-auth/ChangeLog.md @@ -2,6 +2,7 @@ * Add Show instance for user credentials `Creds` * Export pid type for identifying plugin +* Fix warnings ## 1.4.16 diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index face7de3..5c552686 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.4.16 +version: 1.4.17 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin diff --git a/yesod-bin/ChangeLog.md b/yesod-bin/ChangeLog.md index 80be3276..12b7b3ca 100644 --- a/yesod-bin/ChangeLog.md +++ b/yesod-bin/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.5.2 + +* Fix warnings + ## 1.5.1 * Add `--host` option to `yesod devel` diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 5577eaef..a21610bc 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -1,5 +1,5 @@ name: yesod-bin -version: 1.5.1 +version: 1.5.2 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-core/ChangeLog.md b/yesod-core/ChangeLog.md index cb06ee5d..d694cfc2 100644 --- a/yesod-core/ChangeLog.md +++ b/yesod-core/ChangeLog.md @@ -1,3 +1,8 @@ +## 1.4.32 + +* Fix warnings +* Route parsing handles CRLF line endings + ## 1.4.31 * Add `parseCheckJsonBody` and `requireCheckJsonBody` diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index 5496a8d3..8fda2795 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -1,5 +1,5 @@ name: yesod-core -version: 1.4.31 +version: 1.4.32 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-eventsource/ChangeLog.md b/yesod-eventsource/ChangeLog.md index 58406890..f7658231 100644 --- a/yesod-eventsource/ChangeLog.md +++ b/yesod-eventsource/ChangeLog.md @@ -1 +1,3 @@ -No changes logged yet +## 1.4.1 + +* Fix warnings diff --git a/yesod-eventsource/yesod-eventsource.cabal b/yesod-eventsource/yesod-eventsource.cabal index 591bb6d7..bb64a9e3 100644 --- a/yesod-eventsource/yesod-eventsource.cabal +++ b/yesod-eventsource/yesod-eventsource.cabal @@ -1,5 +1,5 @@ name: yesod-eventsource -version: 1.4.0.1 +version: 1.4.1 license: MIT license-file: LICENSE author: Felipe Lessa diff --git a/yesod-form/ChangeLog.md b/yesod-form/ChangeLog.md index 58731e1c..39b13f4d 100644 --- a/yesod-form/ChangeLog.md +++ b/yesod-form/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.11 + +* Fix warnings + ## 1.4.10 * Fixed `identifyForm` to properly return `FormMissing` for empty forms. [#1072](https://github.com/yesodweb/yesod/issues/1072) diff --git a/yesod-form/yesod-form.cabal b/yesod-form/yesod-form.cabal index 9f8a31de..61dc4e35 100644 --- a/yesod-form/yesod-form.cabal +++ b/yesod-form/yesod-form.cabal @@ -1,5 +1,5 @@ name: yesod-form -version: 1.4.10 +version: 1.4.11 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-persistent/ChangeLog.md b/yesod-persistent/ChangeLog.md index 81161e3a..ebb2d8e2 100644 --- a/yesod-persistent/ChangeLog.md +++ b/yesod-persistent/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.2 + +* Fix warnings + ## 1.4.1.1 * Fix build failure with older persistent versions [#1324](https://github.com/yesodweb/yesod/issues/1324) diff --git a/yesod-persistent/yesod-persistent.cabal b/yesod-persistent/yesod-persistent.cabal index 99c99432..2d04725b 100644 --- a/yesod-persistent/yesod-persistent.cabal +++ b/yesod-persistent/yesod-persistent.cabal @@ -1,5 +1,5 @@ name: yesod-persistent -version: 1.4.1.1 +version: 1.4.2 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-static/ChangeLog.md b/yesod-static/ChangeLog.md index 48b51236..7d5c9d26 100644 --- a/yesod-static/ChangeLog.md +++ b/yesod-static/ChangeLog.md @@ -1,3 +1,8 @@ +## 1.5.2 + +* Fix test case for CRLF line endings +* Fix warnings + ## 1.5.1.1 * Fix test suite compilation diff --git a/yesod-static/yesod-static.cabal b/yesod-static/yesod-static.cabal index c7321e9d..297cc452 100644 --- a/yesod-static/yesod-static.cabal +++ b/yesod-static/yesod-static.cabal @@ -1,5 +1,5 @@ name: yesod-static -version: 1.5.1.1 +version: 1.5.2 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-test/ChangeLog.md b/yesod-test/ChangeLog.md index 1b135213..98ff81a4 100644 --- a/yesod-test/ChangeLog.md +++ b/yesod-test/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.5.5 + +* Fix warnings + ## 1.5.4.1 * Compilation fix for GHC 7.8 diff --git a/yesod-test/yesod-test.cabal b/yesod-test/yesod-test.cabal index fd1d90e6..7448e7ee 100644 --- a/yesod-test/yesod-test.cabal +++ b/yesod-test/yesod-test.cabal @@ -1,5 +1,5 @@ name: yesod-test -version: 1.5.4.1 +version: 1.5.5 license: MIT license-file: LICENSE author: Nubis diff --git a/yesod-websockets/ChangeLog.md b/yesod-websockets/ChangeLog.md index b1dd21f3..74ece92f 100644 --- a/yesod-websockets/ChangeLog.md +++ b/yesod-websockets/ChangeLog.md @@ -1,3 +1,7 @@ +## 0.2.6 + +* Fix warnings + ## 0.2.5 * Allow to start websockets with custom ConnectionOptions with `webSocketsOptions` and `webSocketsOptionsWith` diff --git a/yesod-websockets/yesod-websockets.cabal b/yesod-websockets/yesod-websockets.cabal index 6c4d4740..81a9f147 100644 --- a/yesod-websockets/yesod-websockets.cabal +++ b/yesod-websockets/yesod-websockets.cabal @@ -1,5 +1,5 @@ name: yesod-websockets -version: 0.2.5 +version: 0.2.6 synopsis: WebSockets support for Yesod description: WebSockets support for Yesod homepage: https://github.com/yesodweb/yesod diff --git a/yesod/ChangeLog.md b/yesod/ChangeLog.md index a8608c7d..6799776d 100644 --- a/yesod/ChangeLog.md +++ b/yesod/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.5 + +* Fix warnings + ## 1.4.4 * Reduce dependencies diff --git a/yesod/yesod.cabal b/yesod/yesod.cabal index 53e9ebe0..fdde1f0e 100644 --- a/yesod/yesod.cabal +++ b/yesod/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 1.4.4 +version: 1.4.5 license: MIT license-file: LICENSE author: Michael Snoyman From e032785af93c7f12924b2e8fa15953104a05d5fa Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 8 Feb 2017 11:46:08 +0200 Subject: [PATCH 16/20] Another missing --install-ghc --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ef2d8a0f..6d1cec98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -156,7 +156,7 @@ install: set -ex if [ "$ARGS" = "--resolver nightly" ] then - stack $ARGS solver --update-config + stack --install-ghc $ARGS solver --update-config fi set +ex From 4327dac8a760bae1de44fac128938e6398caf539 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 8 Feb 2017 13:35:31 +0200 Subject: [PATCH 17/20] For nightly, build cabal-install --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6d1cec98..9a2002f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -156,6 +156,7 @@ install: set -ex if [ "$ARGS" = "--resolver nightly" ] then + stack --install-ghc $ARGS build cabal-install stack --install-ghc $ARGS solver --update-config fi set +ex From 797278243ea3d00d69d19b215c90998a681004ab Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Fri, 17 Feb 2017 00:18:17 +0530 Subject: [PATCH 18/20] Add and export getPostParams function --- yesod-core/Yesod/Core/Handler.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/yesod-core/Yesod/Core/Handler.hs b/yesod-core/Yesod/Core/Handler.hs index fc58f53f..e1fae75d 100644 --- a/yesod-core/Yesod/Core/Handler.hs +++ b/yesod-core/Yesod/Core/Handler.hs @@ -31,6 +31,7 @@ module Yesod.Core.Handler , getsYesod , getUrlRender , getUrlRenderParams + , getPostParams , getCurrentRoute , getRequest , waiRequest @@ -339,6 +340,18 @@ getUrlRenderParams => m (Route (HandlerSite m) -> [(Text, Text)] -> Text) getUrlRenderParams = rheRender <$> askHandlerEnv +-- | Get all the post parameters passed to the handler. To also get +-- the submitted files (if any), you have to use 'runRequestBody' +-- instead of this function. +-- +-- @since 1.4.33 +getPostParams + :: MonadHandler m + => m [(Text, Text)] +getPostParams = do + reqBodyContent <- runRequestBody + return $ fst reqBodyContent + -- | Get the route requested by the user. If this is a 404 response- where the -- user requested an invalid route- this function will return 'Nothing'. getCurrentRoute :: MonadHandler m => m (Maybe (Route (HandlerSite m))) From 470858f81cd9e5c84abb74de7bf7e27e2f822ec9 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Fri, 17 Feb 2017 00:21:31 +0530 Subject: [PATCH 19/20] Better Haddock rendering. Since -> @since --- yesod-core/Yesod/Core/Handler.hs | 84 ++++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/yesod-core/Yesod/Core/Handler.hs b/yesod-core/Yesod/Core/Handler.hs index e1fae75d..0afced9a 100644 --- a/yesod-core/Yesod/Core/Handler.hs +++ b/yesod-core/Yesod/Core/Handler.hs @@ -438,7 +438,7 @@ handlerToIO = -- Uses 'handlerToIO', liftResourceT, and resourceForkIO -- for correctness and efficiency -- --- Since 1.2.8 +-- @since 1.2.8 forkHandler :: (SomeException -> HandlerT site IO ()) -- ^ error handler -> HandlerT site IO () -> HandlerT site IO () @@ -630,7 +630,7 @@ sendResponseStatus s = handlerError . HCContent s . toTypedContent -- | Bypass remaining handler code and output the given JSON with the given -- status code. -- --- Since 1.4.18 +-- @since 1.4.18 sendStatusJSON :: (MonadHandler m, ToJSON c) => H.Status -> c -> m a #if MIN_VERSION_aeson(0, 11, 0) sendStatusJSON s v = sendResponseStatus s (toEncoding v) @@ -655,7 +655,7 @@ sendWaiResponse = handlerError . HCWai -- | Switch over to handling the current request with a WAI @Application@. -- --- Since 1.2.17 +-- @since 1.2.17 sendWaiApplication :: MonadHandler m => W.Application -> m b sendWaiApplication = handlerError . HCWaiApp @@ -663,7 +663,7 @@ sendWaiApplication = handlerError . HCWaiApp -- WebSockets. Requires WAI 3.0 or later, and a web server which supports raw -- responses (e.g., Warp). -- --- Since 1.2.16 +-- @since 1.2.16 sendRawResponseNoConduit :: (MonadHandler m, MonadBaseControl IO m) => (IO S8.ByteString -> (S8.ByteString -> IO ()) -> m ()) @@ -679,7 +679,7 @@ sendRawResponseNoConduit raw = control $ \runInIO -> -- WAI 2.1 or later, and a web server which supports raw responses (e.g., -- Warp). -- --- Since 1.2.7 +-- @since 1.2.7 sendRawResponse :: (MonadHandler m, MonadBaseControl IO m) => (Source IO S8.ByteString -> Sink S8.ByteString IO () -> m ()) -> m a @@ -698,7 +698,7 @@ sendRawResponse raw = control $ \runInIO -> -- | Send a 304 not modified response immediately. This is a short-circuiting -- action. -- --- Since 1.4.4 +-- @since 1.4.4 notModified :: MonadHandler m => m a notModified = sendWaiResponse $ W.responseBuilder H.status304 [] mempty @@ -778,7 +778,7 @@ setLanguage = setSession langKey -- Note that, while the data type used here is 'Text', you must provide only -- ASCII value to be HTTP compliant. -- --- Since 1.2.0 +-- @since 1.2.0 addHeader :: MonadHandler m => Text -> Text -> m () addHeader a = addHeaderInternal . Header (encodeUtf8 a) . encodeUtf8 @@ -823,7 +823,7 @@ expiresAt = setHeader "Expires" . formatRFC1123 -- value is a value etag value, no sanity checking is performed by this -- function. -- --- Since 1.4.4 +-- @since 1.4.4 setEtag :: MonadHandler m => Text -> m () setEtag etag = do mmatch <- lookupHeader "if-none-match" @@ -869,7 +869,7 @@ deleteSession = modify . modSession . Map.delete -- | Clear all session variables. -- --- Since: 1.0.1 +-- @since: 1.0.1 clearSession :: MonadHandler m => m () clearSession = modify $ \x -> x { ghsSession = Map.empty } @@ -909,7 +909,7 @@ instance (key ~ Text, val ~ Text) => RedirectUrl master (Route master, Map.Map k -- -- > redirect (NewsfeedR :#: storyId) -- --- Since 1.2.9. +-- @since 1.2.9. data Fragment a b = a :#: b deriving (Show, Typeable) instance (RedirectUrl master a, PathPiece b) => RedirectUrl master (Fragment a b) where @@ -973,7 +973,7 @@ hamletToRepHtml = withUrlRenderer -- | Deprecated synonym for 'withUrlRenderer'. -- --- Since 1.2.0 +-- @since 1.2.0 giveUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output @@ -983,7 +983,7 @@ giveUrlRenderer = withUrlRenderer -- | Provide a URL rendering function to the given function and return the -- result. Useful for processing Shakespearean templates. -- --- Since 1.2.20 +-- @since 1.2.20 withUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output @@ -1011,7 +1011,7 @@ getMessageRender = do -- -- See the original announcement: -- --- Since 1.2.0 +-- @since 1.2.0 cached :: (MonadHandler m, Typeable a) => m a -> m a @@ -1035,7 +1035,7 @@ cached action = do -- You can turn those parameters into a ByteString cache key. -- For example, caching a lookup of a Link by a token where multiple token lookups might be performed. -- --- Since 1.4.0 +-- @since 1.4.0 cachedBy :: (MonadHandler m, Typeable a) => S.ByteString -> m a -> m a cachedBy k action = do cache <- ghsCacheBy <$> get @@ -1076,13 +1076,13 @@ lookup' a = map snd . filter (\x -> a == fst x) -- | Lookup a request header. -- --- Since 1.2.2 +-- @since 1.2.2 lookupHeader :: MonadHandler m => CI S8.ByteString -> m (Maybe S8.ByteString) lookupHeader = fmap listToMaybe . lookupHeaders -- | Lookup a request header. -- --- Since 1.2.2 +-- @since 1.2.2 lookupHeaders :: MonadHandler m => CI S8.ByteString -> m [S8.ByteString] lookupHeaders key = do req <- waiRequest @@ -1091,7 +1091,7 @@ lookupHeaders key = do -- | Lookup basic authentication data from __Authorization__ header of -- request. Returns user name and password -- --- Since 1.4.9 +-- @since 1.4.9 lookupBasicAuth :: (MonadHandler m) => m (Maybe (Text, Text)) lookupBasicAuth = fmap (>>= getBA) (lookupHeader "Authorization") where @@ -1101,7 +1101,7 @@ lookupBasicAuth = fmap (>>= getBA) (lookupHeader "Authorization") -- | Lookup bearer authentication datafrom __Authorization__ header of -- request. Returns bearer token value -- --- Since 1.4.9 +-- @since 1.4.9 lookupBearerAuth :: (MonadHandler m) => m (Maybe Text) lookupBearerAuth = fmap (>>= getBR) (lookupHeader "Authorization") @@ -1175,7 +1175,7 @@ lookupCookies pn = do -- | Select a representation to send to the client based on the representations -- provided inside this do-block. Should be used together with 'provideRep'. -- --- Since 1.2.0 +-- @since 1.2.0 selectRep :: MonadHandler m => Writer.Writer (Endo [ProvidedRep m]) () -> m TypedContent @@ -1231,13 +1231,13 @@ selectRep w = do -- | Internal representation of a single provided representation. -- --- Since 1.2.0 +-- @since 1.2.0 data ProvidedRep m = ProvidedRep !ContentType !(m Content) -- | Provide a single representation to be used, based on the request of the -- client. Should be used together with 'selectRep'. -- --- Since 1.2.0 +-- @since 1.2.0 provideRep :: (Monad m, HasContentType a) => m a -> Writer.Writer (Endo [ProvidedRep m]) () @@ -1250,7 +1250,7 @@ provideRep handler = provideRepType (getContentType handler) handler -- -- > provideRepType "application/x-special-format" "This is the content" -- --- Since 1.2.0 +-- @since 1.2.0 provideRepType :: (Monad m, ToContent a) => ContentType -> m a @@ -1260,7 +1260,7 @@ provideRepType ct handler = -- | Stream in the raw request body without any parsing. -- --- Since 1.2.0 +-- @since 1.2.0 rawRequestBody :: MonadHandler m => Source m S.ByteString rawRequestBody = do req <- lift waiRequest @@ -1280,7 +1280,7 @@ fileSource = transPipe liftResourceT . fileSourceRaw -- -- > respond ct = return . TypedContent ct . toContent -- --- Since 1.2.0 +-- @since 1.2.0 respond :: (Monad m, ToContent a) => ContentType -> a -> m TypedContent respond ct = return . TypedContent ct . toContent @@ -1292,7 +1292,7 @@ respond ct = return . TypedContent ct . toContent -- actions make no sense here. For example: short-circuit responses, setting -- headers, changing status codes, etc. -- --- Since 1.2.0 +-- @since 1.2.0 respondSource :: ContentType -> Source (HandlerT site IO) (Flush Builder) -> HandlerT site IO TypedContent @@ -1306,44 +1306,44 @@ respondSource ctype src = HandlerT $ \hd -> -- | In a streaming response, send a single chunk of data. This function works -- on most datatypes, such as @ByteString@ and @Html@. -- --- Since 1.2.0 +-- @since 1.2.0 sendChunk :: Monad m => ToFlushBuilder a => a -> Producer m (Flush Builder) sendChunk = yield . toFlushBuilder -- | In a streaming response, send a flush command, causing all buffered data -- to be immediately sent to the client. -- --- Since 1.2.0 +-- @since 1.2.0 sendFlush :: Monad m => Producer m (Flush Builder) sendFlush = yield Flush -- | Type-specialized version of 'sendChunk' for strict @ByteString@s. -- --- Since 1.2.0 +-- @since 1.2.0 sendChunkBS :: Monad m => S.ByteString -> Producer m (Flush Builder) sendChunkBS = sendChunk -- | Type-specialized version of 'sendChunk' for lazy @ByteString@s. -- --- Since 1.2.0 +-- @since 1.2.0 sendChunkLBS :: Monad m => L.ByteString -> Producer m (Flush Builder) sendChunkLBS = sendChunk -- | Type-specialized version of 'sendChunk' for strict @Text@s. -- --- Since 1.2.0 +-- @since 1.2.0 sendChunkText :: Monad m => T.Text -> Producer m (Flush Builder) sendChunkText = sendChunk -- | Type-specialized version of 'sendChunk' for lazy @Text@s. -- --- Since 1.2.0 +-- @since 1.2.0 sendChunkLazyText :: Monad m => TL.Text -> Producer m (Flush Builder) sendChunkLazyText = sendChunk -- | Type-specialized version of 'sendChunk' for @Html@s. -- --- Since 1.2.0 +-- @since 1.2.0 sendChunkHtml :: Monad m => Html -> Producer m (Flush Builder) sendChunkHtml = sendChunk @@ -1387,7 +1387,7 @@ stripHandlerT (HandlerT f) getSub toMaster newRoute = HandlerT $ \hd -> do -- | The default cookie name for the CSRF token ("XSRF-TOKEN"). -- --- Since 1.4.14 +-- @since 1.4.14 defaultCsrfCookieName :: S8.ByteString defaultCsrfCookieName = "XSRF-TOKEN" @@ -1395,7 +1395,7 @@ defaultCsrfCookieName = "XSRF-TOKEN" -- -- The cookie's path is set to @/@, making it valid for your whole website. -- --- Since 1.4.14 +-- @since 1.4.14 setCsrfCookie :: MonadHandler m => m () setCsrfCookie = setCsrfCookieWithCookie def { setCookieName = defaultCsrfCookieName, setCookiePath = Just "/" } @@ -1403,7 +1403,7 @@ setCsrfCookie = setCsrfCookieWithCookie def { setCookieName = defaultCsrfCookieN -- -- Make sure to set the 'setCookiePath' to the root path of your application, otherwise you'll generate a new CSRF token for every path of your app. If your app is run from from e.g. www.example.com\/app1, use @app1@. The vast majority of sites will just use @/@. -- --- Since 1.4.14 +-- @since 1.4.14 setCsrfCookieWithCookie :: MonadHandler m => SetCookie -> m () setCsrfCookieWithCookie cookie = do mCsrfToken <- reqToken <$> getRequest @@ -1411,14 +1411,14 @@ setCsrfCookieWithCookie cookie = do -- | The default header name for the CSRF token ("X-XSRF-TOKEN"). -- --- Since 1.4.14 +-- @since 1.4.14 defaultCsrfHeaderName :: CI S8.ByteString defaultCsrfHeaderName = "X-XSRF-TOKEN" -- | Takes a header name to lookup a CSRF token. If the value doesn't match the token stored in the session, -- this function throws a 'PermissionDenied' error. -- --- Since 1.4.14 +-- @since 1.4.14 checkCsrfHeaderNamed :: MonadHandler m => CI S8.ByteString -> m () checkCsrfHeaderNamed headerName = do valid <- hasValidCsrfHeaderNamed headerName @@ -1426,7 +1426,7 @@ checkCsrfHeaderNamed headerName = do -- | Takes a header name to lookup a CSRF token, and returns whether the value matches the token stored in the session. -- --- Since 1.4.14 +-- @since 1.4.14 hasValidCsrfHeaderNamed :: MonadHandler m => CI S8.ByteString -> m Bool hasValidCsrfHeaderNamed headerName = do mCsrfToken <- reqToken <$> getRequest @@ -1438,14 +1438,14 @@ hasValidCsrfHeaderNamed headerName = do -- | The default parameter name for the CSRF token ("_token") -- --- Since 1.4.14 +-- @since 1.4.14 defaultCsrfParamName :: Text defaultCsrfParamName = "_token" -- | Takes a POST parameter name to lookup a CSRF token. If the value doesn't match the token stored in the session, -- this function throws a 'PermissionDenied' error. -- --- Since 1.4.14 +-- @since 1.4.14 checkCsrfParamNamed :: MonadHandler m => Text -> m () checkCsrfParamNamed paramName = do valid <- hasValidCsrfParamNamed paramName @@ -1453,7 +1453,7 @@ checkCsrfParamNamed paramName = do -- | Takes a POST parameter name to lookup a CSRF token, and returns whether the value matches the token stored in the session. -- --- Since 1.4.14 +-- @since 1.4.14 hasValidCsrfParamNamed :: MonadHandler m => Text -> m Bool hasValidCsrfParamNamed paramName = do mCsrfToken <- reqToken <$> getRequest @@ -1464,7 +1464,7 @@ hasValidCsrfParamNamed paramName = do -- | Checks that a valid CSRF token is present in either the request headers or POST parameters. -- If the value doesn't match the token stored in the session, this function throws a 'PermissionDenied' error. -- --- Since 1.4.14 +-- @since 1.4.14 checkCsrfHeaderOrParam :: (MonadHandler m, MonadLogger m) => CI S8.ByteString -- ^ The header name to lookup the CSRF token -> Text -- ^ The POST parameter name to lookup the CSRF token From 6d7ba59e4b767355e0741e4c51a474140d9fb593 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Fri, 17 Feb 2017 00:22:57 +0530 Subject: [PATCH 20/20] Update changelog --- yesod-core/ChangeLog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yesod-core/ChangeLog.md b/yesod-core/ChangeLog.md index d694cfc2..17a5d774 100644 --- a/yesod-core/ChangeLog.md +++ b/yesod-core/ChangeLog.md @@ -1,3 +1,8 @@ +## 1.4.33 + +* Add 'getPostParams' in Yesod.Core.Handler +* Haddock rendering improved. + ## 1.4.32 * Fix warnings