Commit Graph
55 Commits
Author SHA1 Message Date
Paul MelnikowandGitHub 6e09a93cf0 Provide a descriptive message when json can’t be parsed (#1796)
* Test handling of invalid JSON on BaseJsonService
* Remove invalidJSON tests from new-style services
2018-07-23 19:35:42 -05:00
Paul MelnikowandGitHub 91c3626aac Fix time service (#1791) 2018-07-22 08:26:36 -07:00
chris48sandGitHub b9db222c8a send longer cache headers by default (#1725)
* tell browsers and downstream caches to cache for
  `env.BADGE_MAX_AGE_SECONDS`, default 0 for dev

* set Cache-Control: no-cache, no-store, must-revalidate if maxAge=0

* add servertime badge to help with cache header debugging

* if service category is 'debug', exclude from examples

* ignore maxAge GET param if less than `env.BADGE_MAX_AGE_SECONDS`
2018-07-20 20:24:02 +01:00
DanialandGitHub 6a1f0f60b1 handle malformed url [dynamic-json] (#1782) 2018-07-17 12:50:36 +12:00
PyvesandGitHub 66c678e0dd [appveyor bitbucket buildkite circleci codeship continuousphp docker readthedocs scrutinizer shippable travis] Extracted isBuildStatus test validator (#1767) 2018-07-13 09:21:02 +01:00
chris48sandPaul Melnikow 7de10783fa Deprecate [magnumci bithound] (#1770)
* deprecate Magnum CI badge

* deprecate BitHound badges
2018-07-11 23:30:52 -04:00
Marcin MielnickiandGitHub 9ca74740fa Using invalidJSON instead of other ways to mock an invalid JSON (#1756) 2018-07-11 22:43:32 +02:00
Stanley NgandDanial 85dd5f0809 Add [Jenkins] Jacoco coverage badge ☘ (#1593)
* Add Jenkins Jacoco coverage badge

* [Jenkins] add service test for jacoco coverage

* Added Jenkins Coverage (Jacoco) in all-badge-examples page

* Defined variables using let/const instead of var

* Used template string for the uri

* Used checkErrorResponse helper function for the error check

* Used NaN method for not a number test

* Prefixed the original Jenkin coverage test with "cobertura:"

* Moved the happy test case at front

* Merge the business logic between jacoco and cobertura

* Fixed lint issue

* Trigger notification
2018-07-10 18:12:26 +12:00
chris48sandGitHub dc8bc9c5b4 update [bitrise] URL (#1764) 2018-07-08 12:50:19 +01:00
PyvesandGitHub 8ad3bc7e90 [scrutinizer] Fix #1739, add tests and refactor (#1759)
* Added tests for Scrutinizer service

* Refactored service and fixed NaN bug

* Updated example

* Improved badge regex
2018-07-08 10:32:13 +01:00
chris48sandGitHub b05d93c9c1 fix [waffle] labels badge (#1745)
fix [waffle] labels badge

- update URL and parsing code to use /columns endpoint
- add error handling for 'not found' case
- add missing test cases
- update home page example

Closes #1731
2018-07-05 19:06:06 +01:00
Grey Bakerandchris48s e1e2a2ff2b Rename semver compatibility to semver stability (#1744) 2018-06-25 19:13:05 +01:00
chris48sandGitHub def1bc331c fix [sonar] legacy/unsupported service tests (#1741) 2018-06-18 17:34:05 +01:00
Grey BakerandMarcin Mielnicki ca58d84447 Add [dependabot] SemVer compatibility badge (#1734)
* Add [dependabot] SemVer compatibility badge

* Add dependabot logo

* Clean up and additional tests
2018-06-17 21:32:57 +02:00
Ivan de la Beldad FernandezandPyves 4308b60c8f [Travis] Add travis-ci.com support (#1711) 2018-06-17 10:14:00 +02:00
Paul MelnikowandGitHub fa61247dba Rewrite [npm] typedefs badge using new-style service (#1735)
For #1358
2018-06-16 16:38:52 -04:00
chris48sandGitHub 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 MelnikowandGitHub 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
chris48sandGitHub 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
chris48sandGitHub 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
chris48sandGitHub 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 MielnickiandGitHub b418235c7f Standard name in nuget v2 downloads badge (#1726) 2018-06-10 21:36:40 +02:00
Matthias KochandMarcin Mielnicki 7f9102dbb5 Add ReSharper gallery badge. (#1722) 2018-06-09 21:51:58 +02:00
chris48sandGitHub fa52c04439 allow 0 for cocoapods weekly downloads (#1713) 2018-06-07 20:08:53 +01:00
chris48sandGitHub f4ea029e52 service tests for Arch Linux [aur] (#1707) 2018-06-02 19:04:23 +01:00
chris48sandGitHub 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 MielnickiandGitHub 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
chris48sandGitHub de4e527f57 service tests for [libscore], improve error handling (#1706) 2018-05-29 09:41:42 +01:00
Sebastian StaudtandPyves 498684cf24 Adapt to new JSON API of formulae.brew.sh (#1684) 2018-05-21 19:48:33 +01:00
RazielandDanial 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 MielnickiandGitHub 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
chris48sandGitHub bf53e612f5 [cdnjs gem] make exception classes more consistent (#1683)
make exception classes more consistent
2018-05-15 18:57:33 +01:00
Sam Lanningandchris48s 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
chris48sandGitHub 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
PyvesandGitHub 3518b642e7 [MicroBadger] Fixed tests (#1677) 2018-05-07 21:47:36 +01:00
Sam Lanningandchris48s 45ff94d5a3 Add [LGTM] service (#1672) 2018-05-05 19:14:58 +01:00
chris48sandGitHub 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
chris48sandGitHub 714df8fac5 change CC0 example in GH service tests (#1634) 2018-04-28 20:59:27 +01:00
Raul RieraandDanial 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
PyvesandGitHub ac13fdb8d4 [librariesio] Missing try/catch block and tests (#1644) 2018-04-14 08:35:47 +01:00
Binh Buiandchris48s e1755df212 [vaadin-directory] Support star and stars endpoints (#1603) 2018-04-09 20:14:21 +01:00
Jacob TomlinsonandMarcin Mielnicki 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
PyvesandGitHub f98d17e00d [SourceForge] Fixes, tests and cleaning up (#1626) 2018-04-02 21:51:41 +01:00
Paul MelnikowandGitHub 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
PyvesandGitHub a168072cd5 [DotnetStatus] Service deprecation (#1630) 2018-04-02 09:40:50 +01:00
PyvesandGitHub 3aa21301ff [Ansible] Handle no data responses (#1629) 2018-04-02 09:38:25 +01:00
Paul MelnikowandGitHub 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
PyvesandThaddée Tyl 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
PyvesandGitHub 66c5d914c7 [CircleCI] Extended existing try-catch block (#1614) 2018-03-30 09:34:20 +01:00
Paul MelnikowandGitHub 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