8 Commits

Author SHA1 Message Date
Paul Melnikow
02ec19fd22 BaseService terminology: Rename url to route (#2278)
The term “url” is overloaded in services, to refer to the Shields route and also the API URL. Calling the Shields URL a “route” is on the whole more descriptive, and makes it clearer and more obvious which one of these we’re talking about. It’s a small thing, though seems like an improvement.

We have a few functions called `buildUrl`. I’ve renamed them to `buildRoute` when they refer to routes, and left them as `buildUrl` when they refer to API URLs.

I included a minor style tweak and some formatting cleanup in `TUTORIAL.md`.
2018-11-09 15:11:03 -05:00
Paul Melnikow
83ac6ff1b3 Enforce use of template literals (#2242)
This is consistent with what we're pretty much already doing, and saves us from making the request during code review.

These were all autofixed and most of them seem easier to read. Some in the legacy services should be rewritten in more legible forms during refactor (ie using intermediate variables, or using request’s qs option). There are some in helper functions and elsewhere that should get rewritten separately. I don't want to change them in this PR because the changes will get lost in this diff, though we could identify them here and fix them before or just after.
2018-11-02 17:11:44 -04:00
Pierre-Yves B
efb40fe4c0 Static Code Climate examples (#2201) 2018-10-23 18:12:29 +01:00
Paul Melnikow
bedba47d77 Move legacy services from server.js into services/ (#1958)
This builds on the work of #1931 by moving the legacy services into `services/`.
2018-08-27 13:29:54 -04:00
Paul Melnikow
7a664ca3e8 Run prettier (#1866)
Merging this separately so the commit with the tooling change is readable. This is a follow-on to #1167 which turned prettier on.
2018-08-08 17:57:14 -04:00
chris48s
124748ecde Fix [codeclimate] tests (#1727)
* update nock

The version we were using didn't allow
regex pattern with allowUnmocked option.

Update to latest version which includes this patch:
https://github.com/node-nock/nock/pull/1068

* update codeclimate test to allow any snapshot id on second call

This test was failing because the
snapshot id changed for some reason.

This change allows that to happen
and we will still intercept the
second API call.
2018-06-10 22:20:21 +01:00
Pyves
dd35739c5c [CodeClimate] Added missing try-catch block (#1613)
* Added missing try-catch block

* Added tests to cover malformed responses
2018-04-01 17:32:43 +02:00
Paul Melnikow
ea4b758612 Move service tests alongside code (#1563)
Per discussion in #1543
2018-03-20 18:32:48 -07:00