Commit Graph

557 Commits

Author SHA1 Message Date
Paul Melnikow
0088a9d0da Unify remaining service order and enforce (#3359)
Ref #3353
2019-04-24 16:53:33 -04:00
Paul Melnikow
f8aeb56129 Unify order of more services (#3358)
Ref #3353
2019-04-24 15:08:26 -04:00
Paul Melnikow
1dd8d1329c Unify order of another handful of services (#3356)
Ref #3353
2019-04-24 15:03:23 -04:00
Paul Melnikow
36f50f2a02 Refactor [cii] (#3357) 2019-04-24 08:36:39 -05:00
Paul Melnikow
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 Melnikow
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 Cartwright
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 Cartwright
6547a5765c chore: minor cleanup (#3354) 2019-04-23 10:22:47 -04:00
Guy Saar
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 Melnikow
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 Melnikow
f13326dddf Rewrite [githubcommitssince]; also test [githubrelease] (#3350) 2019-04-22 18:54:58 -05:00
Paul Melnikow
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
chris48s
05af1f82b2 refactor [vaadindirectory] badges (#3339) 2019-04-21 21:10:30 +01:00
Paul Melnikow
b55e3eef60 Rewrite [codeclimate] analysis (#3321)
* WIP

* Rewrite [codeclimate] analysis

Ref #2683

* Tweak names

* chore: tweak redirector category
2019-04-21 11:44:07 -05:00
Paul Melnikow
a291ba73a3 Use url pattern for [nexus] + minor cleanup (#3326)
* Use url `pattern` for [nexus]

* chore: minor nexus example tweaks

* chore: fix prettier issue

* refactor(Nexus): minor refactor to fix tests and examples

* chore: increase timeout on nexus service tests

* chore: prettified for prettier

* tests(Nexus): increase timeout for recurringly slow test

* chore: update nexus schema with docs
2019-04-20 16:23:42 -05:00
Caleb Cartwright
049057c230 add strictSSL query param toggle to [coverity] (#3336)
* feat(coverity): adding query param toggle for strict ssl

* feat: disable coverity strict ssl check by default
2019-04-20 13:52:48 -05:00
Caleb Cartwright
a144f957b6 refactor [JenkinsBuild] (#3302)
* refactor(JenkinsBuild): ported to new service model

* refactor(JenkinsBuild): added redirector for jenkins-ci route

* refactor(JenkinsBuild): trying to debug test on circle

* refactor(JenkinsBuild): fix test of mock creds

* chore: fix typo in wrong file 🤦

* refactor(JenkinsBuild): update route

* refactor(JenkinsBuild): fixed service test

* refactor(JenkinsBuild): made strictSSL configurable via QP
2019-04-19 15:34:21 -05:00
Caleb Cartwright
4ae393565a refactor: deprecated php-eye/hhvm badges (#3335) 2019-04-18 21:05:38 -05:00
Paul Melnikow
b069dbbaad Use route patterns in [snap-ci nsp gratipay githubmanifest codacy cauditor bithound] (#3327)
Ref #3329
2019-04-18 18:15:48 -05:00
Paul Melnikow
b431923e35 Minor rename in [node] (#3325) 2019-04-17 13:13:24 -04:00
Pierre-Yves B
0a9611d574 Migrated JenkinsPluginVersion to new service architecture (#3317) 2019-04-17 06:53:45 +01:00
Paul Melnikow
cffa29dd5c Fix [codeclimatecoverage] coverage-percentage route (#3320) 2019-04-16 23:39:03 -04:00
Paul Melnikow
fc5cd07a0f Consolidate [DubDownloads] into one service (#3319)
Same idea as #3318.
2019-04-16 21:50:15 -04:00
Paul Melnikow
b79d1952c0 Consolidate [NpmDownloads] into one service (#3318)
This moves the four npm download services into a single class, in line with #3174, and other service implementations we've written in the last couple months. 

1. Change the suffixes from **/m** to **/month** for consistency.
2. Add tests of one of the intervals besides total.
3. Rewrite mocked service tests as unit tests.
4. Use (and work with) the `intervalMap` pattern that I think @calebcartwright started us using.
2019-04-16 19:18:16 -04:00
Cedric van Putten
483ecf24de [Drone] Add Drone build badge (#3240)
* Add drone build badge based on travis

* Fix wrong mocked endpoint for done builder

* Refactor service tester using helper method

* Add missing failure status to red statuses

* Remove extraneous invalid svg test from drone

* Test on failure red status in build status spec

* refactor(drone): use json service instead of svg

* refactor(drone): remove status text and extraneous build path in test

* refactor(drone): allow defining self-hosted drone instances

* fix(drone): use proper urls in drone examples

* fix(drone): add drone token authorization for self-hosted instances

* refactor(drone): call render build status badge directly instead of render

* refactor(drone): use server query parameter for self-hosted instances

* fix(drone): separate url and query params in example

* fix(drone): use actual build status message in examples

* fix(drone): add missing message for status code 401

Co-Authored-By: byCedric <me@bycedric.com>

* refactor(drone): remove color from drone tests

* refactor(drone): remove extraneous comments from drone tests

* refactor(drone): remove unused static preview method

* refactor(drone): remove unused static render method

* refactor(drone): reuse render build status badge helper in static previews

* fix(drone): test inaccessible repos on new message
2019-04-16 11:33:15 -05:00
Paul Melnikow
91d6dd6643 Rewrite [codeclimate] coverage (#3316)
Attacking this in two pieces for ease of review. The legacy implementation for coverage is still there, though I disabled it via the route. That whole file will be removed in the next PR.

Ref #2863
2019-04-15 23:47:25 -04:00
Caleb Cartwright
700b61e16b Refactor [Sonar] (#3189)
* refactor(sonar)

* refactor(sonarqube): creating separate services for SQ badges

* refactor(sonar): more sonar refactorings

* refactor(sonar): fixed duplicate service names from c/p

* refactor(sonar): finished violations service impl

* refactor(sonar): finished unit tests for violations service

* feat(sonar): violation badge updates

* refactor(sonar): finished doc. api density service

* feat(sonar): added quality gate service

* chore: sonar doc tweaks

* refactor(sonar): added redirector service

* refactor(sonar): added examples

* refactor(sonar): minor example updates

* refactor(sonar): added final tests

* chore(sonar): removed unneeded test spec file for base class

* refactor(sonar): updates based on PR feedback

* refactor(sonar): change query param to sonarVersion

* refactor(sonar): fixing query param issue

* refactor(sonar): fix test color for generic metric

* chore: fix lint/prettier issue

* chore(sonar): update query param name in examples

* refactor(sonar): make schema metric key required

* reactor(sonar): fix tests

* refactor(sonar): added more example listings

* refactor(sonar): minor style updates

* refactor(sonar): update examples

* refactor(Sonar): minor example tweaks
2019-04-15 17:03:57 -05:00
Caleb Cartwright
89e749f714 fix [gratipay] test (#3303)
Not really sure what happened, but the test for the deprecated gratipay/gittp service has been failing for a while with a 404 badge not found error. For example

`AssertionError: label mismatch: expected '404' to equal 'gratipay'`

This tweaks the rout pattern so the test is passing again.
2019-04-15 13:05:30 -04:00
Caleb Cartwright
9221075d31 fix [sourcegraph] test (#3304) 2019-04-15 12:53:15 -04:00
Caleb Cartwright
263e1be06d tests(Maintenance): refactor and test (#3305)
One of the tests for the Maintenance service that was added when the service was refactored is failing 
`AssertionError: message mismatch: expected 'no! (as of 2018)' to equal 'stale (as of 2019)'`

I believe the test was added in an attempt to cover the one of the code paths, but that original test would only pass a couple months out of the year. 

Testing those paths with the original implementation would have required a lot of stubbing clocks/timers, so instead I refactored the code a bit. I removed the flaky live/service test, and added some unit tests instead (which made more sense to me since this service badge doesn't hit a live endpoint)
2019-04-15 12:47:06 -04:00
Tesla_Ice_Zhang
e12e625141 Add pull request merge/open/closed badge (#3295) 2019-04-14 09:57:26 -05:00
Paul Melnikow
ab95e8415f Rewrite [GitHubForks] (#3299) 2019-04-13 20:12:31 -04:00
Paul Melnikow
11cd0bdbc5 Split up [codeclimate] tests (#3300)
* Split up [codeclimate] tests

* Fix copy-pasta
2019-04-13 18:47:59 -05:00
Paul Melnikow
d343fddb2c Rewrite [dynamicxml] tests, and fix issue with attribute filters (#3298)
This fixes queries with an attribute filter in the middle, such as //book[@id='bk102']/title.

Close #3089
2019-04-13 15:06:36 -04:00
Eray Erdin
6935be5d50 [Jitpack] Added Downloads Badge (#3291)
* added jitpack downloads pack

* added jitpack downloads badge

* used isMetricOverTimePeriod in jitpack-downloads.tester
2019-04-12 08:09:56 -05:00
Pierre-Yves B
fd5553b810 [Node] tests improvements (#3288) 2019-04-08 20:44:28 +01:00
chris48s
83c3c70908 refactor [puppetforge] service, add tests (#3275)
This migrates the puppetforge-modules from legacy
services to the new service arch
There are also some changes to the puppetforge-users
badges, but its just moving code around
2019-04-07 19:35:30 +01:00
Pierre-Yves B
25f8541e5b JSON format modernisation and _shields_test removal (#3272)
* Modernised JSON format and removed _shields_test style

* Added logoWidth and labelColor fields to JSON response

* Reinstated and updated comment

* Extended expectBadge to accept Joi schemas for all fields
2019-04-07 18:57:55 +01:00
Caleb Cartwright
93333509c6 Fix [NpmDependencyVersion] (#3274)
* fix(NpmDependencyVersion): refs #3271

* refactor(NpmDependencyVersion): tweaked route based on PR feedback
2019-04-07 12:28:11 +01:00
Paul Melnikow
766d55e001 [pypi] Improve formatting of trove-based licenses (#3265)
Currently the trove-based license classifiers generate different formatting than the legacy license classifiers. This brings them into alignment.
2019-04-04 04:22:47 -07:00
Denis Duliçi
48e454c63d Fixed GitHub release downloads, run [GithubDownloads] (#3256)
* fixed github release downloads

* npm run prettier code push.

* master package-lock.json file
2019-04-03 17:28:48 -05:00
Caleb Cartwright
7f24e93671 refactor [GithubIssueDetail] (#3259)
* refactor(GithubIssueDetail): ported to new service model

* refactor(GithubIssueDetail): updates based on PR discussions

* refactor(GithubIssueDetail): minor updates and additional tests

* refactor(GithubIssueDetail): minor updates to render functions per PR disc.
2019-04-03 11:59:49 -05:00
Caleb Cartwright
4b81f824d9 refactor(GithubIssues) (#3263) 2019-04-03 10:26:03 -05:00
Caleb Cartwright
c2f44cc284 Fix [TeamCity] build (#3245)
Fix #3244

Updated schema validation on statusText field to account for additional text suffixes
2019-04-02 08:36:21 -07:00
Eray Erdin
c7b37a5de8 Fixed [Jitpack] Badges According to Shields Convention (#3257)
* added fixed jitpack badge

* removing accidental pasted file

* updated transformPath for jitpack-version-redirector service

* refactored jitpack.*.js to jitpack-version.*.js
2019-04-01 17:25:39 -05:00
chris48s
a12ece3d7c refactor [twitter] service (#3241)
* refactor [twitter] service

* pass screen_names in options.qs
2019-03-31 14:00:37 -05:00
Caleb Cartwright
b03b644451 Fix [packagist] badges (#3239)
* fix(packagist): updated schema and version svc to resolve #3238

* refactor(packagist): multiple changes relative to #3238
2019-03-31 09:45:13 -05:00
James Cahill
f0e037e040 refactor [Packagist] service (#3004) 2019-03-27 17:59:41 -04:00
chris48s
96d416068c rewrite Github Languages, split into [githubcodesize githublanguagecount githubtoplanguage] (#3225) 2019-03-25 20:54:58 -04:00
chris48s
d59785b35d refactor [puppetforgeusers], add tests (#3224) 2019-03-24 11:55:28 -04:00