Approach so far:
The SpecHelper sets up an example App type which should (theoretically)
be enough to get some fake requests and responses going, as in any
yesod-test-based suite.
The spec then tries to build an example plugin and make assertions on
how it dispatches. This is currently falling down on subsite-related
type errors (see commented attempts).
Another potential direction is to define the YesodAuth instance for App
to specify authPlugins built using the library. With that, we might be
able to create specs using yesod-test that exercise aspects of the
plugins in an indirect way, but enough to make useful assertions.
We do lose some coverage here. Rather than confirming we build across a
slew of GHC versions, the sdist succeeds, etc, we just run the test
suite against the Stackage snapshot configured. Stackage snapshots is
the direction Haskell is moving, so I think this is an acceptable
simplification.
If the endpoint URL doesn't yet have any query parameters, this code
would construct an invalid URL by appending `&state=` rather than
`?state=`. We now correctly append `?state=` or `&state=` depending on
the URL already containing a `?` character.
Fixes#44
This is a "good enough" solution for the moment, done for ease of
implementation and speed of delivery. An eventual better solution would
be to use a URL-parsing and constructing library to parse the existing
endpoint, append parameter tuples, and re-construct a new URL.
Restructuring the data types so we start handling real URL and
QueryParam values instead of ByteStrings would also be an option, though
we're a little cornered by the Yesod.Auth.OAuth interface.
- Fix invalid data declaration
- Fix -Wall compilation warnings
- Unused imports
- Unused functions
- Unused arguments
- Shadowed function name
- Incorporate plain link into WidgetType, remove Maybe
- Use only one function, always accept WidgetType
- Runs check and sdist, in addition to build/test
- Based on https://github.com/hvr/multi-ghc-travis
- Tests various combinations of Cabal and GHC (including 7.10)
- Tests HEAD versions, but allows failure there
- Alphabetize imports
- Place qualified imports separate and last
- BL for ByteString.Lazy
- Don't align tokens in tuple lists or record assignments
- Two-space indent for where keyword
- Use record syntax for Creds
- Break before operators in Applicative expressions
- Consistent whitespace throughout
Resolves#19