* Add W3C Markup Validation Service Badge (#3833)
* Move helper functions into different file and added unit tests
* Remove unnecessary comments from spec file
* pr changes move code into transform method and validation of messages
* use joi.string().regex instead of custom validator
* Simplify the fetch, handle methods. Make Joi validation for string
* Remove empty parameter from tests and label from render method
* encodeUri on the doc and schema properties send to API
* Documentation and remove unnecessary Object.keys call
* Use regular expressions to make tests less brittle
* made service less for message and color more generic and less brittle
* Throw standard NoFound exception for invalid URL. Use w3c endpoint
* use sazerac for w3c-validation-helper.spec.js
* Replace documentation API url and API documentation url
* Switch back to https://validator.nu endpoint. Remove html4 assertions
* Increase strictness of NotFound checks
* Add documentation for publicity state of pipelines
* Modify visual picture to be smaller and add red circle to mark important setting
* Adapt suggestion
Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>
* Support XPath query with type convertion
* Support XPath query with node function
* Parametrized tests for transform function
* Handle unusual values returned by 'select'
* fix: support scrutinizer branches with only failed builds
* tests: increase timeout for microbadger tests
* tests: increase timeouts for jsdelivr and microbadger tests
While playing around with a badge for Hacktoberfest I noticed the GitHub Issues badge fetches a huge amount of JSON to render just the total count. There doesn’t seem to be a way to limit the response size through the REST API, so I thought I’d switch this to use GraphQL instead.
I recently published https://github.com/metabolize/rq-dashboard-on-heroku and want to add badges to show the locked version of Python and rq-dashboard, the main dependency it’s wrapping.
This is along the lines of #2259, which was for package.json-based applications, and also included some discussion of a Python application that used `requirements.txt`. It’s useful for showing the pinned version of any dependency in a Python application that uses a lockfile.
In the future, as an alternative to reading Pipfile.lock, I could see expanding this to read Pipfile. However for my purposes I prefer to show the locked dependency, since that’s the version that a user of my package would actually get if they ran it on Heroku.
This looks like a case of confusing `Joi.allow()` with `Joi.valid()`.
`Joi.valid(...['A', 'A-']).validate('-')` throws an error but `Joi.allow(...['A', 'A-']).validate('-')` allows it through.
Closes#4033
* refactor: switch Discourse url to query param
* tests: fix e2e test with Discourse example
* refactor(Discourse): change query param name to server
* tests: update e2e test with new discourse param name
It’s hard to understand how #3813 is persisting. The schema should reject keys not in the object… it’s very puzzling.
This replaces the code used to get the color with a function call that throws an explicit error when the key is missing. It should at least make it clear what the key value is when this fails in the future.
* add /twitch/status/:user badge
* update comments
* use a proper schema for the Twitch API calls
* use a token to make Twitch api calls
* fix handling of rate-limit error and bad token error
* [twitch] get a token as soon as creating a Twitch service
* [twitch] start both requests to users and stream before awaiting
* [twitch] set a timeout to replace the token before it expires
* [twitch] use authHelper
* [twitch] skip tests when no credentials
* [twitch] add one more status test
* twitch: do not check whether a user exists