Commit Graph

171 Commits

Author SHA1 Message Date
patrick brisbin
3d4ff8da39 Stop returning extra information in GitHub result
See #71.

New `credsExtra` keys:

- `accessToken`: so you can make your own follow-up requests
- `userResponseJSON`: so you can get more information out of the request
  we already made (you just have to parse it yourself)

Removed keys:

- `access_token`: renamed to `accessToken`
- `avatar_url`: can be re-parsed
- `email`: requires your own request to `/emails`
- `login`: can be re-parsed from `userResponseJSON`
- `location`: can be re-parsed, was not always present
- `name`: can be re-parse, was not not always present
- `public_email`: can be re-parsed, was not not always present

Also re-orders arguments between default and scoped to allow better
partial application -- taking advantage of API breakage already.
2018-02-12 09:10:34 -08:00
patrick brisbin
49542cbca1 Re-structure modules
- Extract ...OAuth2.Dispatch
- Extract ...OAuth2.Prelude
- Reduce ...OAuth2 interface
- Re-export ...OAuth2 from Prelude

Incidental improvements:

- Moves a lot of FromJSON interfaces to withObject which will provide
  better de-serialization errors
- Updates Dispatch code to prepare for fetch-creds functions returning
  either instead of maybe, so we can eventually remove exceptions
  entirely
- Replaces (the potentially information-leaking) 500 on OAuth2-related
  errors with a 403 and logged error
2018-01-27 08:10:55 -05:00
patrick brisbin
82585f9b32 Enable -Wall always 2018-01-27 08:10:55 -05:00
patrick brisbin
257a25e901 Ignore TESTREPORT, used in --rerun testing 2018-01-27 08:10:55 -05:00
patrick brisbin
79be858f44
Correct license information
Fixes #96
2018-01-26 13:58:16 -05:00
patrick brisbin
8283d21997 Skip linting step on 8.0 2018-01-26 12:18:46 -05:00
patrick brisbin
5d59c4e385 Disable 7.10 job for now 2018-01-26 12:18:46 -05:00
patrick brisbin
1c7b377b72 Change cache key strategy
Only look to master- on full-fail, never to "any branch". Use a simple
numeric prefix which we can bump to clear it all.
2018-01-26 12:18:46 -05:00
patrick brisbin
3d6c07221c Lint 2018-01-26 12:18:46 -05:00
patrick brisbin
041a9a318b Test all supported GHCs & nightly 2018-01-26 12:18:46 -05:00
patrick brisbin
606c3d834b Back-fill a CHANGELOG 2018-01-25 17:20:33 -05:00
patrick brisbin
e8f413ebab Drop support for GHC < 7.10 2018-01-24 08:04:58 -05:00
patrick brisbin
52c726b598 Update to LTS 10.1 / GHC 8.2 2018-01-24 08:04:58 -05:00
patrick brisbin
8efe95773b Fix coding style in Battle plugin 2018-01-23 10:16:22 -05:00
patrick brisbin
ed58922727 Fix line-endings in Battle plugin 2018-01-23 10:16:22 -05:00
patrick brisbin
400111f9a0 Restyle imports 2018-01-23 10:16:22 -05:00
patrick brisbin
c93b4081b8 Pull weeds 2018-01-23 10:16:22 -05:00
patrick brisbin
79ef8aded9 Address HLint issues 2018-01-23 10:16:22 -05:00
patrick brisbin
30851ae5fb Replace checksum key with full source digest
Checksumming stack.yaml was a cargo-cult of interpreted languages, where
"build" artifacts are uniquely determined by the dependency lock file.

This approach would result in us refusing to store a new cache after
changing code (as long as it was the same resolver), and forever
recompiling any altered modules.

Computing a digest of all git-tracked files seems like the simplest way
to key compilation for now.
2018-01-23 10:16:22 -05:00
patrick brisbin
b25ddab6f6 Disable example executable for now 2018-01-23 10:16:22 -05:00
patrick brisbin
9e0a27feab Circle 2.0 2018-01-23 10:16:22 -05:00
patrick brisbin
1c24a6a1e5 Project setup files 2018-01-23 10:16:22 -05:00
patrick brisbin
c36089b0a1
Version bump 2017-12-15 10:10:53 -05:00
patrick brisbin
1d36cb346e Use modern packaging practices
- Move sources under src
- Use hpack via package.yaml
- Remove the network-uri flag
2017-12-14 08:20:16 -05:00
patrick brisbin
34ae029705 Move nightly compilation to make it cached 2017-12-14 08:20:16 -05:00
Stefan Dresselhaus
7ef60e6089 Add ExtensionSpec to other-modules 2017-12-14 08:20:16 -05:00
patrick brisbin
6f6dbcc74d Relax aeson and hoauth2 upper bounds 2017-12-14 08:20:16 -05:00
patrick brisbin
097fb17ee9 Let's try these shenanigans 2017-12-14 08:20:16 -05:00
patrick brisbin
1c42edce7e Run yammlint over stack.yaml and circle.yml 2017-12-14 08:20:16 -05:00
patrick brisbin
afbc113cd8 Check compilation with nightly 2017-12-14 08:20:16 -05:00
patrick brisbin
7c228694ce Use stack-1.6.1 on CI 2017-12-14 08:20:16 -05:00
patrick brisbin
174952fd4f Install test dependencies in build step
This ensures the extra installation doesn't happen in the test step.
Also add a missing --pedantic.
2017-12-14 08:20:16 -05:00
patrick brisbin
bf05c8a13c Update to latest LTS 2017-12-14 08:20:16 -05:00
patrick brisbin
e9b7f78f78
Version bump 2017-11-27 08:57:47 -05:00
patrick brisbin
937ad572a3 Update to LTS-9.5 and hoauth2 1.3.0
The largest changes were around the hoauth2 interface:

The OAuth2 type replaced all of its ByteString fields with either Text
or URI. This is a huge improvement. The fields that are now Text are the
type we had them in anyway. The fields that are now URI are type safe
and easier to manipulate. For example, we were doing very unsafe query
string manipulations looking for raw ? or & values, but now we can work
with tuples in a well-typed property.

Additionally the AccessToken type was upgraded to OAuth2Token with an
accessToken field, and the simple Either ByteString a results were
replaced by a real OAuth2Error type. This required changes to our
InvalidProfileResponse mechanism to support.

To make working with uri-bytestring more convenient, an Extension
library was added with some useful instances and helper functions. This
library may be upstreamed at some point.
2017-10-18 17:21:47 -04:00
patrick brisbin
aeeddcf1c2 Remove stub test 2017-10-18 17:21:47 -04:00
Edward Betts
20dcb234dc correct spelling mistake 2017-09-05 11:59:20 -04:00
patrick brisbin
25e63cdcc2
Version bump 2017-08-03 14:43:35 -04:00
Brian Schroeder
dc70ce8048 Switch to new, safer URL parsing function 2017-08-03 14:22:47 -04:00
Brian Schroeder
de589f8cb6 Update Nylas provider
- Nylas now requires additional parameters for authentication to succeed
- We remove oauth2NylasScoped because it wasn't exported, and Nylas does
  not support any scopes other than "email"
2017-08-03 14:22:47 -04:00
Sid Raval
e756d88e1b Update stack version for Circle CI. 2017-07-21 17:05:18 -04:00
Sid Raval
a942f40eb5 Upgrade stack resolver 2017-07-21 17:05:18 -04:00
Sid Raval
c416ab90d2 HLint 2017-07-20 18:24:31 -04:00
Vladimir Yanovsky
bed6d04384 Add Battle.Net plugin 2017-07-19 19:13:23 -04:00
Paul Rouse
d9ce2d334c Relax upper bounds on aeson and http-client 2017-07-17 11:54:26 -04:00
Dan Palmer
ae7b625c0b Fix code example in Readme 2017-07-17 11:52:38 -04:00
Joe Ferris
1dcbb2dbc1
Bump version 2016-08-26 11:16:44 -04:00
Stefan Parviainen
210264f3e2 Add Bitbucket plugin 2016-08-26 11:10:18 -04:00
Ruslan Babayev
e3b94912f1 add Salesforce plugin
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2016-07-27 17:05:29 -07:00
patrick brisbin
491fc566ef
Version bump 2016-07-06 18:36:16 -04:00