1591 Commits

Author SHA1 Message Date
Ivan de la Beldad Fernandez
4308b60c8f [Travis] Add travis-ci.com support (#1711) 2018-06-17 10:14:00 +02:00
Paul Melnikow
fa61247dba Rewrite [npm] typedefs badge using new-style service (#1735)
For #1358
2018-06-16 16:38:52 -04:00
chris48s
f78e6f1f8a [gem cdnjs appveyor clojars] refactor clojars, establish BaseJsonService (#1702)
* refactor clojars integration

* DRY up services that request data from JSON endpoints
2018-06-16 20:50:14 +01:00
Paul Melnikow
20b8d0c3b8 BaseService: Query params (#1589)
Provide support for query parameters, in parity with the functionality in old-style services.
2018-06-16 13:10:02 -04:00
chris48s
1f928281f2 allow 0 in all [cocoapods] download tests (#1728)
It appears this does not only
happen on the weekly stats.
refs https://github.com/badges/shields/pull/1713
2018-06-13 21:03:42 +01: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
chris48s
67eb92e583 fix [dub] service test (#1729)
The version we were testing against
seems to have gone away - spooky 👻
https://code.dlang.org/api/packages/vibe-d/0.7.23/stats

Switch to a version that exists:
https://code.dlang.org/api/packages/vibe-d/0.7.27/stats
2018-06-10 22:18:15 +01:00
Marcin Mielnicki
b418235c7f Standard name in nuget v2 downloads badge (#1726) 2018-06-10 21:36:40 +02:00
Matthias Koch
7f9102dbb5 Add ReSharper gallery badge. (#1722) 2018-06-09 21:51:58 +02:00
chris48s
fa52c04439 allow 0 for cocoapods weekly downloads (#1713) 2018-06-07 20:08:53 +01:00
chris48s
f4ea029e52 service tests for Arch Linux [aur] (#1707) 2018-06-02 19:04:23 +01:00
chris48s
e6559a0889 fix typescript regex in [npm] tests (#1712)
- Expect `TypeScript vX.Y | Flow vX.Y`
  instead of `TypeScript vX.Y Flow vX.Y`
- Allow version numbers to have more than >1 digit
  after the point
2018-06-02 19:03:55 +01:00
Marcin Mielnicki
9d90bd1f95 [github] Commit merge status badge (#1709)
* Basic version of commit-status badge added

* Support for case with no common ancestor

* Handle unknown branch

* Service tests with error responses

* Handle unexpected 404 responses from github

* Branch is a base

* Tests reordered

* Using not the newest commit in tests

* Test for checked commit identical with the newest commit in branch

* Code refactoring

* Example for Github commit merge status
2018-05-30 18:51:52 +02:00
chris48s
de4e527f57 service tests for [libscore], improve error handling (#1706) 2018-05-29 09:41:42 +01:00
Sebastian Staudt
498684cf24 Adapt to new JSON API of formulae.brew.sh (#1684) 2018-05-21 19:48:33 +01:00
Raziel
c76e221b47 [david] add support for path (#1687)
* Example with a path query parameter

* Support for David path query parameters

* David path not found test

* [david] updated invalid path test
2018-05-18 11:50:04 +12:00
Marcin Mielnicki
d51ae90270 Bugfix: override colorB in [docker] badges (#1690)
* Color fix for Docker Hub automated integration

* Test for overriding colorB in docker stars badge

* Test for overriding colorB in docker pulls badge

* #008bb8 is color of automated docker builds

* Test for overriding colorB in docker build badge

* Overriding colorB in docker stars badge

* Overriding colorB in docker pulls badge

* Overriding colorB in docker automated badge

* Better assertions in docker tests

* The default docker color updated to match the logo
2018-05-16 18:11:26 +02:00
chris48s
bf53e612f5 [cdnjs gem] make exception classes more consistent (#1683)
make exception classes more consistent
2018-05-15 18:57:33 +01:00
Sam Lanning
4f8414c003 Add grade badge for [lgtm] (#1681)
* Add LGTM Grade badge

* Add new tests for LGTM Grade badge

* Add lgtm grade example to homepage
2018-05-12 10:30:48 +01:00
chris48s
b5635bf55a [gem cdnjs appveyor] refactor ruby gems service (#1680)
* allow services to export >1 classes

This change to loadServiceClasses() allows us to define
services which either export a single service class e.g:

module.exports = class Cdnjs extends BaseService {
  //...
}

or more than one. e.g:

module.exports = {
  GemVersion,
  GemDownloads,
  GemOwner,
  GemRank,
}

* refactor ruby gem badges

- move badge code to service classes
- throw exceptions for errors
- use let and const
- change tests to expect 'downloads' label for error badges
- general tidying

* fix typo in tests

* Don't always use class name in example label

This allows (for example) GemVersion and GemDownloads
both to use the example label 'Gem'
2018-05-10 17:32:45 +01:00
Pyves
3518b642e7 [MicroBadger] Fixed tests (#1677) 2018-05-07 21:47:36 +01:00
Sam Lanning
45ff94d5a3 Add [LGTM] service (#1672) 2018-05-05 19:14:58 +01:00
chris48s
8fcc13d5bc refactor [cdnjs] integration (#1668)
* pass error object to InvaildResponse()

this prevents us from throwing
TypeError: Cannot read property 'stack' of undefined
when we attempt to parse invalid json

* refactor [cdnjs] integration
2018-05-04 21:55:51 +01:00
chris48s
714df8fac5 change CC0 example in GH service tests (#1634) 2018-04-28 20:59:27 +01:00
Raul Riera
f607ad787e Add [buildkite] service (#1657)
* Support for buildkite

* Added to the examples as well

* Removed the unnecessary label property

* Fixed the example

* Improve the tests

* Made the branch optional and review suggestions

* Added network error test

* Unexpected response test

* PR review suggestions

* Updated test to include all responses

* Forgot one of the tests
2018-04-24 08:13:24 +12:00
Pyves
ac13fdb8d4 [librariesio] Missing try/catch block and tests (#1644) 2018-04-14 08:35:47 +01:00
Binh Bui
e1755df212 [vaadin-directory] Support star and stars endpoints (#1603) 2018-04-09 20:14:21 +01:00
Jacob Tomlinson
d56b6961da Add [dynamic-yaml] badge (#1623)
* Add dynamic yaml badge

* Forgot package lock

* Switch tests to yaml data source

* Add yaml to the dynamic badge maker options

* Reorder to match documentation examples

* Reordered dynamic types to be alphabetical

* Removed regex as pinend commit makes it unnecessary and fixed url

* Removed unused import

* Add more YAML MIME types

* Removed duplicate tests which don't differ between data types
2018-04-08 21:47:28 +02:00
Pyves
f98d17e00d [SourceForge] Fixes, tests and cleaning up (#1626) 2018-04-02 21:51:41 +01:00
Paul Melnikow
f2efd751b5 Minor refactor of examples preparation (#1632)
This cleans up the work from #1582, clarifying concerns, removing a bit of duplication, and renaming for clarity.
2018-04-02 07:03:52 -05:00
Pyves
a168072cd5 [DotnetStatus] Service deprecation (#1630) 2018-04-02 09:40:50 +01:00
Pyves
3aa21301ff [Ansible] Handle no data responses (#1629) 2018-04-02 09:38:25 +01:00
Paul Melnikow
416d433fa0 [appveyor] Error handling in BaseService (#1590)
Make a clear distinction between programmer errors ("internal errors") and runtime errors, and allow configuring the server to let the programmer errors bubble up in development and unit testing. This saves a huge amount of time because it generates ordinary stack traces when things go wrong. And, if these errors occur in production, we'll catch them, and display **shields | internal error** which is the equivalent of a 500 error.
2018-04-01 22:04:22 -05: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
Pyves
66c5d914c7 [CircleCI] Extended existing try-catch block (#1614) 2018-03-30 09:34:20 +01:00
Paul Melnikow
ac7c418222 Extract examples from new-style services (#1582)
Instead of centralizing examples, specify them from within a service.

* Avoid duplication in service loading + refactor
* Avoid duplication in URLs, rename uri -> url in BaseService
2018-03-30 03:07:44 -05:00
Pyves
ed419b0a77 [microbadger] Fix tests (#1600) 2018-03-27 11:15:51 +01:00
Paul Melnikow
ea4b758612 Move service tests alongside code (#1563)
Per discussion in #1543
2018-03-20 18:32:48 -07:00
Paul Melnikow
71ef474afc Add tests for BaseService + fix hex colors (#1581) 2018-03-20 15:04:55 -07:00
Paul Melnikow
0654abe2b2 Fix colors for new appveyor badge (#1583) 2018-03-19 20:16:47 -04:00
Paul Melnikow
2d651533aa New API for registering services: #963 #1423 #1425 #1450 #1451 #1544 #1543
This merges the `node-8` branch. The heavy lift was by @Daniel15 with refactoring from me and a patch by @RedSparr0w.

* New API for registering services (#963)
* Disable Node 6 tests on node-8 branch (#1423)
* BaseService: Factor out methods _regex and _namedParamsForMatch (#1425)
    - Adjust test grouping
    - Rename data -> queryParams, text -> message
* BaseService tests: Use Chai (#1450)
* BaseService: make serviceData and badgeData explicit and declarative (#1451)
* fix isValidStyle test (#1544)
* Run tests in Node 9, not Node 6 (#1543)
2018-03-11 17:53:01 -07:00