* 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.
* 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
* 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
* 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'
* 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
* 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
* 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
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.
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
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)