Commit Graph

5202 Commits

Author SHA1 Message Date
Michael Snoyman
98afc13e92
Allow random 1.2 2020-06-24 10:34:43 +03:00
Michael Snoyman
d4a60baf77
Merge pull request #1680 from yesodweb/printBodyPreview
When statusIs fails, print a preview of the body
2020-06-22 08:59:32 +03:00
Maximilian Tagher
1d67e3a359 1.6.10 2020-06-21 20:27:35 -04:00
Maximilian Tagher
28e5b606b2 attempt to fix 8.2 2020-06-20 17:27:13 -04:00
Maximilian Tagher
4ddff42847 .. 2020-06-20 15:01:51 -04:00
Maximilian Tagher
f50d23ce49 .. 2020-06-20 15:01:26 -04:00
Maximilian Tagher
8f00e76257 .. 2020-06-20 14:56:19 -04:00
Maximilian Tagher
34927e3401 .. 2020-06-20 14:54:31 -04:00
Maximilian Tagher
2ddc63e66a When statusIs fails, print a preview of the body
My team makes frequent use of `statusIs`, but in virtually all cases where `statusIs` fails, we need to add a call to `printBody` to do further debugging.

Following in the footsteps of `requireJSONResponse`, this PR automatically prints a portion of the body when `statusIs` fails, assuming the body looks like a text-based response (e.g. not a JPEG).

I've found that a status code alone is often very misleading and leads people on a wild good chase, because e.g. a 403 could be triggered for many different reasons.

I'm opening this PR as a draft to confirm people like the idea of doing this. If so I'll do a closer review of the code (this is my first draft basically), and also write some tests + test the code works in all cases.
2020-06-17 17:31:00 -04:00
Maximilian Tagher
e7cf662af7 Update yesod-test cabal file for distribution
Hackage is now requiring a higher cabal file version, and with that comes a requirement to specify the language of each module
2020-06-01 14:54:39 -04:00
Maximilian Tagher
d03c095b63 Add bumped GHC dependency in yesod-test changelog 2020-06-01 11:53:03 -04:00
Maximilian Tagher
b94da055c0
Merge pull request #1676 from yesodweb/documentYesodTest
Add more documentation to yesod-test
2020-06-01 11:29:12 -04:00
Maximilian Tagher
5c33dcb518 .. 2020-05-31 16:56:09 -04:00
Maximilian Tagher
8e89ec0e40 .. 2020-05-31 16:38:48 -04:00
Maximilian Tagher
ab8a994a34 .. 2020-05-31 16:38:09 -04:00
Maximilian Tagher
c3fa2adddd Add more documentation to yesod-test
This adds high-level documentation to yesod-test, plus some function documentation
2020-05-31 16:35:27 -04:00
Michael Snoyman
074865bca9
Merge pull request #1674 from ericdeansanchez/fix-typo
Fix small typo in documentation
2020-05-23 21:37:16 +03:00
eric
d382d67769
Fix small typo in documentation
This PR seeks to correct a small typo in the word _continuously_.
2020-05-23 11:29:06 -07:00
Michael Snoyman
2b5bf7b9b9
Merge pull request #1672 from amkhlv/master
increase the size of CSRF token
2020-05-01 13:35:16 +03:00
Andrei Mikhailov
c39b165ff3 increase the size of CSRF token 2020-05-01 00:40:11 -03:00
Michael Snoyman
7f37d2b6fa
Merge pull request #1664 from RyanGlScott/master
Use DeriveLift to generate yesod-core's Lift instances
2020-03-31 16:21:23 +03:00
Ryan Scott
29a08425e9 Use DeriveLift to generate yesod-core's Lift instances
GHC 8.0 and later come with the `DeriveLift` extension for deriving
instances of `Language.Haskell.TH.Syntax.Lift`. `yesod-core` supports
GHC 8.2 and up, so it is able to make use of this. Not only does
`DeriveLift` make for much shorter code, but it also fixes warnings
that you get when compiling `yesod-core` with GHC 8.10 or later:

```
[20 of 31] Compiling Yesod.Routes.TH.Types ( src/Yesod/Routes/TH/Types.hs, interpreted )

src/Yesod/Routes/TH/Types.hs:34:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (ResourceTree t)’
   |
34 | instance Lift t => Lift (ResourceTree t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Yesod/Routes/TH/Types.hs:49:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (Resource t)’
   |
49 | instance Lift t => Lift (Resource t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Yesod/Routes/TH/Types.hs:59:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (Piece t)’
   |
59 | instance Lift t => Lift (Piece t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^

src/Yesod/Routes/TH/Types.hs:78:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (Dispatch t)’
   |
78 | instance Lift t => Lift (Dispatch t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

This is because `DeriveLift` fills in implementations of `liftTyped`,
a method that was introduced to `Lift` in `template-haskell-2.16.0.0`
(bundled with GHC 8.10).
2020-03-31 08:41:00 -04:00
Jezen Thomas
59f601a34c
Add functions for setting description and OG meta (#1663)
* Add functions for setting description and OG meta

It's common that a website author will want to add a specific
description and Open Graph image to a given page in their website. These
functions are simple conveniences to add these meta tags to the document
head.

I decided against simply adding all possible meta tags, because not all
of them are useful, and even in the case of Open Graph tags, many of
them should be set only once and they should use the same value for the
entire website. In those cases, it's probably better for the website
author to add those tags in their layout template.

Closes https://github.com/yesodweb/yesod/issues/1659
2020-03-30 19:00:24 +07:00
Michael Snoyman
4a4dd06df8
Azure matrix/stack.yaml update 2020-03-24 12:20:19 +02:00
Michael Snoyman
179296c568
Merge pull request #1662 from charukiewicz/master
Yesod.Auth.Email: Fixed incorrect confirmation message, enabled customizing 'forgot password' email
2020-03-24 07:15:56 +02:00
charukiewicz
c5e76faf4d adjusted indentation of if/then/else to be more compact 2020-03-21 12:49:18 -05:00
charukiewicz
ff8ad9717f added link to PR in changelog entry 2020-03-21 02:27:52 -05:00
charukiewicz
cef6fc42ef bumped yesod-auth to 1.6.10 and updated ChangeLog 2020-03-21 02:16:40 -05:00
charukiewicz
61f1e5eeae added sendForgotPasswordEmail to YesodAuthEmail typeclass and incorporated into defaultRegisterHelper 2020-03-21 02:15:27 -05:00
charukiewicz
f80ec711ff updated AuthMessage to accommodate user registration flow with password: added EmailVerified and EmailVerifiedChangePass, deprecated AddressVerified 2020-03-20 22:22:13 -05:00
Michael Snoyman
9d0c9180b9
unliftio-core 0.2 2020-03-01 11:00:36 +02:00
Michael Snoyman
b4c613f766
Merge pull request #1660 from charukiewicz/register-helper
Add methods to YesodAuthEmail that allow custom flow after registration/password reset
2020-02-11 08:44:30 +02:00
charukiewicz
4f62e39fb1 added pull request link to ChangeLog entry 2020-02-09 17:03:51 -06:00
charukiewicz
16bf146887 version bump to 1.6.9 and changelog update 2020-02-05 23:49:16 -06:00
charukiewicz
c35c2fddc2 added passwordResetHelper method, exposed defaultRegisterHelper 2020-02-05 23:45:02 -06:00
charukiewicz
abdd844279 added registerHandler method to YesodAuthEmail class to enable override 2020-02-05 01:21:56 -06:00
Sasha Bogicevic
cfaf517f54 Replace decodeFile with decodeFileEither 2020-01-28 09:18:59 +01:00
Michael Snoyman
5943ee527d
Version bump 2020-01-27 17:52:24 +02:00
Michael Snoyman
6c9279c146
Merge pull request #1657 from simonmichael/master
support template-haskell 2.16, build with GHC 8.10
2020-01-27 17:51:35 +02:00
Simon Michael
dd649bf238 support template-haskell 2.16, build with GHC 8.10 2020-01-27 06:11:48 -08:00
Maximilian Tagher
873bee0cfa
Merge pull request #1654 from juanpaucar/remove_typeable
Remove unnecessary Typeable deriving, Solves #1653
2020-01-25 14:03:07 -08:00
Juan Paucar
6e38a3b99d Bump version properly 2020-01-20 11:06:35 -05:00
Juan Paucar
eb159b6fd5 Bump versions 2020-01-17 14:03:59 -05:00
Juan Paucar
c279547962 Remove unnecesary Typeable deriving 2020-01-17 11:48:58 -05:00
Michael Snoyman
804b114d91
Drop LTS 9 2020-01-07 13:36:58 +02:00
Michael Snoyman
dc16761492
Merge pull request #1649 from yesodweb/yesodPersistentCompatibility
Add extensions for yesod-persistent tests to be compatible with lates…
2020-01-03 07:38:07 +02:00
Maximilian Tagher
a8a7b6c7a5 .. 2020-01-02 22:51:54 -05:00
Maximilian Tagher
367d77a8c3 .. 2020-01-02 22:00:13 -05:00
Maximilian Tagher
cf365d18a2 Add extensions for yesod-persistent tests to be compatible with latest persistent-template
The upcoming version of persistent-template will require these yesodweb/persistent#1002
2020-01-02 21:57:00 -05:00
Maximilian Tagher
4f51153b09 Require latest yesod-core for yesod-test
(This was missing from #1646)
2019-12-01 08:06:10 -05:00