595 Commits
Author SHA1 Message Date
chris48sandGitHub 65dba94fa8 Stop calling variables "which"; affects [chocolatey codeclimate conda crates debug gem github mozillaobservatory nuget powershellgallery pub resharper vaadindirectory] (#3495)
* which --> variant

* which --> alias

* which --> format

* improve param names in codeclimate

* improve param names in github-issue-detail

* update github-issue-detail unit tests
2019-05-28 23:00:12 +01:00
Caleb CartwrightandGitHub b7982f4459 feat: deprecate jitpack downloads badge (#3493) 2019-05-27 16:21:50 -05:00
Caleb CartwrightandPierre-Yves B 27bb914172 tests(jsdelivr): increase timeout (#3479) 2019-05-24 13:31:35 +01:00
Caleb CartwrightandPierre-Yves B 37030b92a0 tests(GitHubReleaseDate): fix service tests (#3477) 2019-05-23 19:31:49 +01:00
Josep BernadandCaleb Cartwright d685cde52b Add [Subreddit] subscribers (#3443)
* Add subreddit subscribers service file.

* Fix small detail in service and add the tests files.

* Apply suggested changes by the reviewer.

* Trying to make tests work.

* Update services/reddit/subreddit-subscribers.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/reddit/subreddit-subscribers.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Apply suggested changes.

* Add different handler for non existing and invalid subreddits.

* Update services/reddit/subreddit-subscribers.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2019-05-22 16:43:13 -05:00
Caleb CartwrightandPierre-Yves B 02ee34d2a5 feat: deprecate waffle service (#3473) 2019-05-22 10:04:30 +01:00
Caleb CartwrightandPierre-Yves B f94efe74db fix(aur): update test and example package targets (#3475) 2019-05-22 09:57:15 +01:00
Pierre-Yves BandGitHub 570ba18333 lastCompletedBuild for [Jenkins] badges and better discoverability (#3460) 2019-05-16 21:29:16 +01:00
Caleb CartwrightandPaul Melnikow 9fe238a81f fix(stackexchange): questions/month badge with 0 questions (#3456) 2019-05-13 20:41:56 -04:00
Pierre-Yves BandGitHub 992bd81baa Fixed Wordpress rating examples (#3445) 2019-05-12 22:12:47 +01:00
chris48sandGitHub 7caf301730 switch [circleci] service to scrape SVG badge, reorganise routes (#3413)
* switch [circleci] service to scrape SVG badge

* reorganise [circleci] routes

Default URL is now
circleci/build/gh/badges/shields/master?token=abc123
There are redirects on the legacy routes to provide
backwards compatibility for existing users
2019-05-11 17:55:32 +01:00
chris48sandPaul Melnikow 3bb614ff39 fix [microbadger] examples (#3439) 2019-05-09 16:39:40 -04:00
Marcin MielnickiandPaul Melnikow 283601423f Redirect an old png badge with a number as a color; test on [static] (#3412)
Fixes https://github.com/badges/shields/issues/3260

Problem happens when a value of a color in an old PNG static badge is a number: http://localhost:8080/my-label/my-message.png?color=1. In this case `color` in `queryParams` is a number. 
https://github.com/badges/shields/blob/0a0b5b3f031178851c9d295b9967d81ede052723/core/server/server.js#L203-L212

Surprisingly service test listed below is passing currently on master - value `1` is represented in `queryParams` as a String (only in test). 
`services/static-badge/static-badge.tester.js`
```js
t.create('Old static badge with a number as a color')
  .get('/foo/bar.png?color=1', { followRedirect: false })
  .expectStatus(301)
  .expectHeader('Location', '/badge/foo-bar-1.png')
```

Moreover I added some code + description allowing to debug server.
2019-05-08 12:33:43 -04:00
Paul MelnikowandGitHub 7afb26ef14 Add some aliases for license colors; refactor; test colors for [PypiLicense] (#3431)
This covers some of the license strings used by the PyPI badges like **BSD** which currently shows up in lightgrey.
2019-05-07 23:32:15 -04:00
Jeffrey PaulandPaul Melnikow 9b3fd375bb Update references to "WordPress" (#3434)
Fixes #3432
2019-05-07 11:39:00 -04:00
Chris GavinandCaleb Cartwright d6c875c519 Fix [LGTM] badges for non-GitHub projects. (#3362)
* Fix LGTM badges for non-GitHub projects.

* Allow using full repository host names in LGTM badge URLs.

* Add an LGTM redirector service to redirect old LGTM badge URLs to new LGTM badge URLs.

* Add LGTM redirector tester.

* Remove unneeded check in LGTM base file.

Co-Authored-By: chrisgavin <chris@chrisgavin.me>
2019-05-07 07:46:14 -07:00
Paul MelnikowandPierre-Yves B 786bac21ce Convert remaining uses of node-fetch to got (#3417) 2019-05-06 10:10:07 +01:00
Pierre-Yves BandPaul Melnikow 0a0b5b3f03 Added support for branches in "commits since" GitHub badge (#3411) 2019-05-05 10:47:07 -04:00
Ville SkyttäandPaul Melnikow 3b73900b8a Add [Fedora] package version support (#3372) 2019-05-03 17:15:38 -04:00
Ville SkyttäandPaul Melnikow 742f287f06 Move optional path components to the end for [Debian] and [Ubuntu] (#3409)
Refs https://github.com/badges/shields/pull/3372
2019-05-03 17:05:57 -04:00
Paul MelnikowandGitHub 001ade3704 Move checkErrorResponse from lib/ to core/ [chrome] (#3408) 2019-05-02 18:07:18 -04:00
Ville SkyttäandCaleb Cartwright 26852eece9 Add [Ubuntu] package version support (#3398)
* Add [Ubuntu] package version support

https://api.launchpad.net/1.0/

* Mark 400 responses as series not found

* Extract API call into separate fetch function
2019-05-01 11:24:21 -05:00
Ville SkyttäandPaul Melnikow 8f4042f4c8 Distro version improvements (#3397) 2019-04-30 11:24:50 -04:00
Paul MelnikowandGitHub ae2499bf53 Generate JSON badges without using a template [GithubSearch] (#3395)
Warm up for #2428.
2019-04-29 23:26:52 -04:00
Paul MelnikowandGitHub 7980a65d7f [WordpressPlatformTests] Support tested version without trailing ".0" (#3396)
See https://circleci.com/gh/badges/shields/52378 for an example failure,
where a value of `5.2` is triggering "TypeError: Invalid Version: 5.2"
2019-04-29 21:52:57 -04:00
Paul MelnikowandGitHub ad182885ad Get two service helpers to 100% coverage (#3391) 2019-04-29 14:16:33 -04:00
Pierre-Yves BandGitHub 9a869e24ba Added link test expectations (#3376) 2019-04-29 18:52:58 +01:00
Paul MelnikowandGitHub a0492c5283 Remove unused callback-based error helpers (#3371) 2019-04-29 13:35:57 -04:00
Marcin MielnickiandGitHub eeb78ccf15 Badge suggestion feature fix (#3331)
* Display suggested badges

* E2e test for badge suggestion

* Suggest resource returns example with pattern

* Do not require preview in MarkupModalContent

* Skip integration test for suggestion

* Unmodifiable path in customizer

* Use suggested link

* Allow to change suggested badges

* Enable skipped test

* Enable skipped test

* Code refactoring

* Code refactoring

* Code refactoring

* Code refactoring

* Code refactoring

* Code refactoring

* Unused code removed

* Unused code removed

* getExampleWithServiceByPattern helper added

* BadgeExamples uses examples instead of services definitions

* Revert "getExampleWithServiceByPattern helper added"

This reverts commit 80839fd705.

* style removed from example

* example.exact replaced with preview.buildFromExample

* keywords are required again

* Code refactoring

* More e2e tests for suggestion feature

* Code refactoring

* Build add with a base url

* showActualParams -> isPrefilled

* A new schema for BadgeExamples

* Link moved to queryParams

* Updated documentation for the suggest reponse format

* Link moved to queryParams - another test updated

* Revert "Link moved to queryParams - another test updated"

This reverts commit b5f811bb07.

* Revert "Link moved to queryParams"

This reverts commit 3b54c6d2b4.

* Disable changes in path in suggested badges

* 'link' element documentation restored
2019-04-29 18:38:27 +02:00
Ville Skyttäandchris48s 802c3cd8e8 Allow tilde as optional suffix separator (#3378)
For example [Debian] uses them, typically for pre-releases.
2019-04-29 15:11:55 +01:00
chris48sandGitHub 5f29f6a175 case-insentitive asset name compare in [githubdownloads] (#3377)
closes #3364
2019-04-29 15:05:27 +01:00
Ville Skyttäandchris48s 3875d292a6 Add [Debian] package version support (#3373)
https://wiki.debian.org/Services/api.ftp-master.debian.org
2019-04-29 14:58:45 +01:00
Ville Skyttäandchris48s 75def85eca Add [ArchLinux] package version support (#3374) 2019-04-28 21:19:42 +01:00
Pierre-Yves BandGitHub 2806eb8a00 Legacy services clean up (#3367)
* Deleted remaining legacy service bits

* Removed badge from README

* Removed no longer needed try/catch

* Deleted refactoring script

* Switched to const

* Reinstated doc

* Ran Prettier
2019-04-27 19:25:01 +01:00
Pierre-Yves BandPaul Melnikow 499fb8dbaf Fixed color of GitHub forks badge (#3366) 2019-04-27 13:48:47 -04:00
Caleb CartwrightandGitHub 07a8d2ecbe refactor [Scrutinizer] (#3266)
* refactor(Scrutinizer): migrated to new BaseJsonService

* refactor(ScrutinizerCoverage): updated color scale to match

* refactor(Scrutinizer): switched to multiple classes to handle dif. git hosts

* refactor(Scrutinizer): finished migrating to new service arch.

* fix(Scrutinizer): fixed branch check logic

* refactor(Scrutinizer): inline transforms based on PR feedback

* refactor(ScrutinizerCoverage): change handling of no coverage scenario
2019-04-26 21:50:28 -05:00
James CahillandCaleb Cartwright 01d745122b refactor [mavencentral] (#3290)
* refactor maven central

* misc fixes

- include a pretty message on NotFound when the filter returns no results

- split the group and artifact into seperate variables

- remove the connection error test

* remove xml parsing test and add inexistent version prefix test

* use existing test validators and shorthand createservicetester
2019-04-25 18:35:50 -05:00
Paul MelnikowandGitHub 2215693557 Rewrite [GithubTag] (#3360)
Ref #2863
2019-04-25 11:23:16 -04:00
Paul MelnikowandGitHub 0088a9d0da Unify remaining service order and enforce (#3359)
Ref #3353
2019-04-24 16:53:33 -04:00
Paul MelnikowandGitHub f8aeb56129 Unify order of more services (#3358)
Ref #3353
2019-04-24 15:08:26 -04:00
Paul MelnikowandGitHub 1dd8d1329c Unify order of another handful of services (#3356)
Ref #3353
2019-04-24 15:03:23 -04:00
Paul MelnikowandCaleb Cartwright 36f50f2a02 Refactor [cii] (#3357) 2019-04-24 08:36:39 -05:00
Paul MelnikowandGitHub 051e7d04c1 Rewrite [travisphpversion]; improve error message in expectBadge (#3352)
The change in `expectBadge` prints a more helpful error when `message` is empty.

Ref #2863
2019-04-23 23:03:21 -04:00
Paul MelnikowandGitHub 1cdcaabd38 Unify order of properties and methods in services (#3353)
I find having these in a consistent order makes the services much faster to read.

This is the order I’ve generally been using:

1. Category
2. Route
3. Examples
4. Rendering
5. Other helpers (`fetch()`, `transform()`)
6. `handle()`
2019-04-23 21:36:04 -04:00
Caleb CartwrightandGitHub 12191e20c4 refactor [JenkinsTests JenkinsCoverage], also run [JenkinsBuild] (#3337)
* refactor(JenkinsTests): finished core refactor to new service model

* refactor(JenkinsTests): more updates

* refactor(JenkinsCoverage): minor refactor to leverage new common Jenkins content

* refactor(JenkinsBuild): update redirector to include shorthand alias

* chore: apply suggestion on jenkins-tests.service.js

Co-Authored-By: calebcartwright <calebcartwright@users.noreply.github.com>

* refactor(JenkinsTests): rename test helpers

* chore: cleanup JenkinsCoverage redirector

* chore: cleanup JenkinsBuild redirector

* chore: cleanup test docs
2019-04-23 20:20:34 -05:00
Caleb CartwrightandPaul Melnikow 6547a5765c chore: minor cleanup (#3354) 2019-04-23 10:22:47 -04:00
Guy SaarandCaleb Cartwright d3ec64c789 [Bit] add bit components count service (#3338)
* [Bit] add bit components count service

* [Bit] change 404 error to 'collection not found'

* [Bit] remove comment

* [Bit] change collection schema

* [Bit] use isMetric

* [Bit] replace static color to dynamic color

* [BIt] change bit total components route

* change scope to collection

* change all scope var to collection
2019-04-23 06:54:51 -05:00
Paul MelnikowandGitHub ca22d01606 Rewrite [GithubDownloads] (#3351)
For consistency with other download badges, I changed some formatting:

-  **downloads | 24k total** -> **downloads | 24k**
- **downloads | 3k** -> **downloads@latest | 3k**
- **downloads | 3k v0.29.0** -> **downloads@v0.29.0 | 3k**

Ref #2863
2019-04-22 22:55:31 -04:00
Paul MelnikowandGitHub f13326dddf Rewrite [githubcommitssince]; also test [githubrelease] (#3350) 2019-04-22 18:54:58 -05:00
Paul MelnikowandGitHub 5828223356 Refactor [Wordpress] services (#3324)
- Prefer inline transforms to take place in `handle()` rather than `render()`
- Avoid inversion of control by removing `BaseWordpress#handle()`, passing `extensionType` into `fetch()`, and removing one layer of subclassing
- Move “not found” checks into `fetch()`
- Cache wordpress versions instead of fetching on each request
- Start to convert aliases to redirects (there are more of these which could be tackled in a follow-on)
- Replace at least one route `format` with a `pattern` (ref #3329)
- Partially reorder: name, category, route, examples, defaultBadgeData, render, fetch, handle

Some of this is in line with our established patterns or makes it clearly easier to follow; some of it is arguably stylistic.
2019-04-22 10:45:25 -05:00