Commit Graph

1706 Commits

Author SHA1 Message Date
Paul Melnikow
3a47bb38ac Searches with regex control characters should not crash (#1579)
Fix #1578
2018-03-17 16:52:41 -04:00
Paul Melnikow
6c2ce413b1 Adopt async-await for most promise-based code (#1565)
* Address todo for Node 8 upgrade
2018-03-15 09:36:40 -04:00
greenkeeper[bot]
2adb0e7d52 Update request to the latest version 🚀 (#1566)
* fix(package): update request to version 2.84.0

* fix(package): update request to version 2.85.0

Closes #1566

* update package-lock
2018-03-14 22:57:24 -04:00
greenkeeper[bot]
3a5563d27f Update query-string to the latest version 🚀 (#1572)
* fix(package): update query-string to version 6.0.0

* update package-lock
2018-03-14 22:57:05 -04:00
Paul Melnikow
6750115b79 Add [npm] type definitions badge (#1541)
Let a package show off its type definitions based on devDependency data in the published npm package.

Close #1252
2018-03-11 18:00:41 -07: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
Eli Perelman
7545dcfe42 Add [Bugzilla] bugstatus badge (#1492) 2018-03-11 21:50:14 +01:00
chris48s
f8d511fae2 Add some more rules to dangerfile (#1560)
* warn if the target branch is not master
* link to the logo guidance if PR modifies a SVG file in /logo/
2018-03-11 20:05:49 +00:00
Paul Melnikow
ae848f38f4 Add snapshot tests for SVG and JSON (#1557)
These tests should fail if something is accidentally changed that affects the SVG or JSON files. In the case of deliberate changes, we can update the snapshots.
2018-03-11 09:07:03 -07:00
chris48s
d5fc786ad3 service tests for [dub] (#1559)
- add tests
- improve error handling
- switch to https
2018-03-09 21:37:33 +00:00
Pyves
276f821317 Update contributing guidelines (#1551)
* Added logo acceptance criteria

* Added repository starring section

* Added logo approval expectation sentence

* Extended to spreading the word section

* Rearranged sections
2018-03-09 19:10:03 +00:00
Florian Munz
54afdc189c Add Depfu dependencies badge (#1537) 2018-03-08 11:42:25 -08:00
Paul Melnikow
8fde79b793 Make tests more resilient to time zone (#1558)
These tests were failing locally and I suspect it’s because I’m in a different time zone.
2018-03-08 11:09:26 -08:00
greenkeeper[bot]
dd90d2aced Update sinon-chai to the latest version 🚀 (#1547)
* chore(package): update sinon-chai to version 3.0.0

* Update package-lock
2018-03-08 09:24:38 -08:00
greenkeeper[bot]
2d5a088d6f Update next to the latest version 🚀 (#1490)
* chore(package): update next to version 5.0.0

* Update package-lock

* Get build + tests passing
2018-03-08 09:18:52 -08:00
Danial
a89b6bb163 remove whitespace from data URIs (#1546)
* remove newlines from datauri

* update test, remove decode

* support multiline datauris

* replace whitespace before checking isDataUri

removed multiline support from regex

* prependPrefix set default as empty string

* update
2018-03-08 03:09:29 +01:00
chris48s
1fab9d70de [gratipay gemnasium snap-ci cauditor] add deprecation helpers, deprecate gemnasium (#1524) 2018-03-07 09:08:51 +00:00
chris48s
06fe43c51f [chocolatey powershellgallery myget nuget] tests for NuGet v3 services (#1542) 2018-03-07 09:08:14 +00:00
Danial
be09cee1f2 User defined XML source badge [dynamic-xml dynamic-json] (#1494)
* add dynamic xml badge support

* add tests

* dynamic badge add tests for query param

* remove try catch

* use `checkErrorResponse()`

* update tests

* [dynamic json] add test for multiple items

* Rebase, [dynamic xml] Add support for multiple items

* 404 response -> resource not found

* multiple results test less greedy regex

still alot of room for improvement to this test

* update dynamic badge gen

* add dynamic xml gen tests

* update tests id & path

* datalist -> select

* uri -> url

kept support for uri, incase of any already existing badges.

* split dynamic gen uri

* update query placeholder
2018-03-06 22:43:02 +01:00
Danial
f4d5c41009 [Cauditor] Replace with error message (#1502)
* Depreciate Cauditor

* explicitly set color to lightgray, update test

* add message for date of badge depreciation
2018-03-05 05:55:52 +01:00
Marcin Mielnicki
0640356f2c Travis service tests from tutorial (#1531)
Service tests for Travis CI from tutorial
2018-03-04 21:03:01 +00:00
Pyves
9b564424ba [Snap-CI] Replace with error message (#1468)
* Depreciated Snap CI

* Updated badge color to light gray
2018-03-04 09:32:02 +00:00
greenkeeper[bot]
22ff288eac Update eslint, eslint-config-standard, and friends to the latest versions 🚀 (#1512) 2018-03-03 20:45:12 -05:00
greenkeeper[bot]
ab5514651f Update eslint-plugin-node to the latest version 🚀 (#1489) 2018-03-03 20:36:46 -05:00
greenkeeper[bot]
4a3f1eda9a Update fetch-ponyfill to the latest version 🚀 (#1488) 2018-03-03 20:25:18 -05:00
Danial
49574df0d1 [README.md] add logos (#1507) 2018-03-03 20:14:04 -05:00
greenkeeper[bot]
af04068ffa chore(package): update node-fetch to version 2.0.0 (#1486) 2018-03-03 19:55:13 -05:00
greenkeeper[bot]
4e5669d2eb Update prettier to the latest version 🚀 (#1528) 2018-03-03 19:44:03 -05:00
Paul Melnikow
3b08d9cb35 [Gratipay] Replace with error message (#1449)
Gratipay is gone :(

For #1359

This failure from https://circleci.com/gh/badges/shields/1411?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

```
  7) Gratipay
       Receiving

	[ GET http://localhost:1111/gratipay/Gratipay.json ]:
     ValidationError: child "value" fails because ["value" with value "invalid" fails to match the required pattern: /^\$[0-9]+(\.[0-9]{2})?\/week/]
      at Object.exports.process (node_modules/joi/lib/errors.js:190:19)
      at internals.Object._validateWithOptions (node_modules/joi/lib/types/any/index.js:669:31)
      at module.exports.internals.Any.root.validate (node_modules/joi/lib/index.js:139:23)
      at Object.pathMatch.matchJSONTypes (node_modules/icedfrisby/lib/pathMatch.js:303:9)
      at node_modules/icedfrisby/lib/icedfrisby.js:703:10
      at IcedFrisbyNock._invokeExpects (node_modules/icedfrisby/lib/icedfrisby.js:1294:33)
      at start (node_modules/icedfrisby/lib/icedfrisby.js:1274:12)
      at Request.runCallback [as _callback] (node_modules/icedfrisby/lib/icedfrisby.js:1232:16)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1163:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
      at endReadableNT (_stream_readable.js:1056:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickDomainCallback (internal/process/next_tick.js:218:9)
```
2018-03-03 19:42:54 -05:00
Pyves
abc6e3f181 [microbadger] Handle no DownloadSize (#1536) 2018-03-02 21:48:12 +00:00
Danial
5ded37b5ff logo data uri encoding (#1527)
* logo datauri encode

no longer need to replace `+` with `%2B`

* add comment & tests for spaces
2018-02-27 21:57:06 +01:00
Marcin Mielnicki
ff24bf3ff8 [travis] Updated an expected value in a service test of Travis PHP version badge (#1526)
* Updated an expected value in a service test of Travis PHP version badge

* Use the isPhpVersionReduction in a service tests of Travis PHP version
2018-02-27 04:11:50 +01:00
Marcin Mielnicki
6b76a6ef24 Use 'default' as default JSON style (#1429)
* Use 'default' as a default JSON style

* Using expect instead of assert

* Assert badge is valid svg in test

* Assert badge is valid json in test
2018-02-26 00:41:30 +01:00
Fuzz Stati0n
3f933594a0 Uncaught TypeError crashes server on numeric or boolean 'link' parameter (#1520) 2018-02-25 22:46:35 +01:00
Thaddee Tyl
0ae322b524 Commit index.html and _next on gh-page deployment
Fixes #1458.
2018-02-25 01:14:26 +01:00
Thaddee Tyl
36a22549e5 Add build folder for gh-pages deployment
Fixes #1458.
2018-02-25 01:14:26 +01:00
Brad Kent
ae6dd7101c [hhvm] #1499 - update hhvm service (#1508)
* closes #1499 - update hhvm service

http://hhvm.h4cc.de... -> https://php-eye.com/api/v1/package...

* fix typo

* add switch breaks

* typo

* const & let vs var

* hhvm service tests

* unused const/var

* alias master & dev-master

* improved status messages - repo not found, branch not found
better tests:  including invalidJSON fixture
2018-02-19 22:53:32 +01:00
Patrick Streule
57c7279540 [Bitbucket] #1509 - Add Bitbucket Pipelines service (#1510)
* [Bitbucket] #1509 - Add Bitbucket Pipelines service

* Use ES6 const and error helper
2018-02-19 21:33:09 +01:00
chris48s
75503ec514 [hackage] switch to the /licenses endpoint (#1506)
* switch to /licenses endpoint to check if package exists

refs #1498

* trim whitespace from version string
2018-02-17 06:00:13 +01:00
Danial
3cb71037fd checkErrorResponse update default (#1501) 2018-02-15 23:34:38 +01:00
chris48s
581546d58e [chocolatey powershellgallery] add service tests for NuGet v2 services (#1487)
* add service tests for NuGet v2 services

* fixup - test the correct endpoint

* remove superfluous try/catch blocks

* test the colors too

* use invalid json fixture
2018-02-13 22:09:04 +01:00
Binh Bui
143ec95bf0 Update [Vaadin-Directory] previewUri in all-badge-examples.js (#1496)
* Changed previewUri in all-badge
2018-02-13 03:18:10 +01:00
Binh Bui
e773a9f47d Added [Vaadin-Directory] badge service (#1474)
* Integrated Vaadin service to server.js & load age from color-formatters lib

* Added 8 tests for Vaadin services

* Added Vaadin badge to main page under Misc

* Used checkErrorResponse() and fix 404 test return value

* Removed maturity from URL field option

* Remove duplicate `age` module import

* Removed comment

* Changed several URI fields and fixed according tests
2018-02-13 00:52:46 +01:00
Marcin Mielnicki
17b4a70411 [npm bountysource cdnjs circleci clojars docker gem homebrew itunes microbadger nexus requires shippable suggest uptimerobot] Service tests for NPM total downloads + invalidJSON helper (#1471)
* Service tests for NPM total downloads

* Spread syntax removed

* service-tests/helpers/mocks.js -> service-tests/helpers/response-fixtures.js

* Another value an invalid JSON in response-fixtures

* Using invalidJSON helper in service tests

* Working example in a service test of microbadger

* isPercentage supports decimal and integer values
2018-02-12 21:36:23 +01:00
Tomek Łaziuk
8ad176d014 [bundlephobia] add badge for the npm package size (#1481)
* 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
2018-02-03 08:31:10 -08:00
chris48s
cbb263b102 service tests for [cocoapods] (#1472)
* 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
2018-02-03 08:11:28 -08:00
chris48s
e4199bc806 service tests for [david] (#1465)
* service tests for [david]

* update 500 handling
2018-02-02 15:11:50 -08:00
greenkeeper[bot]
ef038b8049 Update mocha to the latest version 🚀 (#1459)
* chore(package): update mocha to version 5.0.0

* Update package-lock
2018-02-02 14:58:14 -08:00
greenkeeper[bot]
4ffdd85177 Update semver to the latest version 🚀 (#1457)
* fix(package): update semver to version 5.5.0

* Update package-lock
2018-02-02 14:54:26 -08:00
greenkeeper[bot]
1314258913 Update is-svg to the latest version 🚀 (#1483)
* chore(package): update is-svg to version 3.0.0

* Update package-lock
2018-02-02 14:44:29 -08:00