* Added a shield for calculating npm bundle sizes
* Fix linting errors
* Fixed badges for bundlephobia
* Remove un-required keywords
* Simplified handler based on feedback
* Use isFileSize for validation
* Convert camel-cased error codes to space separated ones
* Updated error format
* Fixed error formatting
* Renamed gzip to minzip
* Fixes lint error
* Remove test that times out
* refactor tests to make it more readable
* meaningless change
* use trim
* service tests for [cocoapods]
* Add tests for CocoaPods Endpoints
Bug fixes:
* Call `metrics.cocoapods.org` API endpoints over HTTPs
* Show correct left-side badge text on error in version/platform/license badges
* Handle null doc coverage gracefully
* Add handling for 'not found' responses
* drop last param to checkErrorResponse
* remove redundant line
* set badge label using more terse notation
* specify allowed platform values
* Fixed remaining CodeClimate badges
* Added explicit percentage keyword and dropped top level URL
* Merged the two badge handlers into one
* Removed trailing space
* Switched to "dash" URL style
* Reinstated top-level URL
* Swicthed to use letter as optional keyword
* Updated badge examples
* Cleaned up
* Changed badge label to technical debt
* Switched tests to more mainstream projects as previous ones were deleted
* Rearranged badge URLs and default formats
* Updated examples
* add test suite to formalise existing behaviour of shippable service
* throw more descriprive errors, use es6 declarations
* switch from SVG parsing to shippable API
* add test case for unexpected status code
* remove unused import
* link to source for status codes
* [FIX] error colorscheme
* throw error if jsonpath query non existent
* fixup
* show brightgreen badge by default
* update test
* let -> var
* set lightgrey when no uri specified
* update tests
* red color for no uri specified
* dynamic badge use setBadgecolor()
* add tests for ruby gems version badge
* add tests for ruby gems users badge
* add tests for ruby gems rank badge
* add tests for ruby gems downloads badges
* don't allow 0th rank
* move version info to left side of badge
To fix service test that fails in CI (due to no github auth) https://github.com/badges/shields/issues/1359#issuecomment-354184074
- DRY getPhpReleases()
- Pass named options to regularUpdate
- Add json option
- php-version: Move helpers before functions, and move exports to end
* twitter | add error text
inaccessable = 404 etc
invalid user = no data returned from endpoint
invalid = error thrown
* Twitter add tests
* add test for twitter url badge
Ref: #1379
This takes a naive approach to font-width computation, the most compute-intensive part of rendering badges.
1. Add the widths of the individual characters.
- These widths are measured on startup using PDFKit.
2. For each character pair, add a kerning adjustment
- The difference between the width of each character pair, and the sum of the characters' separate widths.
- These are computed for each character pair on startup using PDFKit.
3. For a string with characters outside the printable ASCII character set, fall back to PDFKit.
This branch averaged 0.041 ms in `makeBadge`, compared to 0.144 ms on master, a speedup of 73%. That was on a test of 10,000 consecutive requests (using the `benchmark-performance.sh` script, now checked in).
The speedup applies to badges containing exclusively printable ASCII characters. It wouldn't be as dramatic on non-ASCII text. Though, we could add some frequently used non-ASCII characters to the cached set.
* Add test suite for BitBucket service integration
* Present BitBucket issues as a metric (for consistency with BitBucket PR endpoint and GitHub endpoints)
* Factor out a shared regex
* Fail cleanly if count is `undefined`
- Periodically log github auth information
- Tokens are hashed which reduces the security risk inherent in the logs
- A consistent hash is used so tokens can be correlated across the three data structures and across the three servers
- Add an admin endpoint for github auth information
- Tokens are returned as-is to enable troubleshooting (e.g. comparing our reqRemaining to github’s)
- Support single-server testing and a local dev server (like Next) that is on a different port from the shields server
- Refactor config schema
With this change, the suggestions work locally in #1273.
Provide greater consistency for badges related to versions. Fix#1181.
- the `version` function in `color-formatters` was previously returning the colour of the badge, but also its text with a leading _v_. It was broken down into two separate functions and the text formatting part was moved to `text-formatters`, where it really belongs.
- unit tests were added for these two functions in `color-formatters.spec` and `text-formatters.spec`, using Sazerac.
- as discussed in #1181, the leading _v_ was omitted for _xxxx-yy-zz_ date patterns. Any future exceptions can easily be added to the `ignoredVersionPatterns` pattern.
- the badge colour was previously switched to orange if a hyphen was found in the version string. This didn't seem ideal, instead pattern matching is done to find keywords such as `beta`, `alpha` or `snapshot`. Of course, this list can easily be extended.
- all badges related to versions now use the `versionText` and `versionColor` functions. There are a few rare exceptions, for instance in cases where the data returned by the service's API allows to figure things out without relying on any parsing/pattern matching (eg. `badgeData.colorscheme = prerelease ? 'orange' : 'blue';`, where `prerelease` is determined from an API's response).
* Add User Defined URL support
* Add test
* eslint fixes
* 100% coverage
* use JSONpath
* update try.html
* Update tests, restore prefix & suffix
* order dependencies alphabetically
* update jsonpath version dependency
* update url structure & move to query strings
* update error handling & remove xml refrences
* fix eslint errors
* update tests
* update dynamic badge generator
* url -> uri & decode uri
Allow an encoded url to be used.
needed for any uri that requires params in the address
* resolve conflicts
* update for new page generation
* check uri is defined
* add query params to `request-handler.js`
* eslint fixes
* add test for no uri specified
* move query params to be local to dynamic badge
* update tests
* dynamic badge gen use same base url as static badge
This piece of work makes sure preference is given to the user defined value if any, by adding missing calls to `getLabel` when the value of `badgeData.text[0]` is reassigned.