Commit Graph

809 Commits

Author SHA1 Message Date
chris48s
350a9819cd check status code before parsing body (#1343) 2017-12-06 14:03:32 -05:00
Peter Gribanov
962cf61b82 PHP version from .travis.yml (#1258)
Reference: #819
2017-12-06 11:04:24 -05:00
mattbk
2028251ca0 Add [Liberapay] (#1251) 2017-12-05 23:01:02 -05:00
Eric Berry
3581efe5e1 Add [Discourse] status/stats shield (#1326)
Close #1325
2017-12-05 17:34:59 -05:00
Marcin Mielnicki
0570a9e920 License badge colour corresponding to license type (#1190) 2017-12-05 16:43:29 -05:00
chris48s
433d69b684 Fixes and tests for BitBucket + GitHub (#1315)
* 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`
2017-12-05 15:39:08 -05:00
Paul Melnikow
9882a44e56 Configure for deployment with zeit now (#1308)
I'm experimenting with Zeit Now as another hosting option. These changes enable a working deployment.
2017-12-04 18:25:16 -05:00
Thaddee Tyl
e61373e739 Add system endpoint to fetch network information
This is part of an effort to set up an admin monitoring platform.
2017-12-03 18:48:31 +01:00
chris48s
56b82e1665 [pypi] Add badge for django version support (#1286)
Closes #1018
2017-12-01 16:10:34 -05:00
Paul Melnikow
127b46aef8 Github auth admin endpoint and logging (#1267)
- 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)
2017-11-30 13:21:27 -05:00
Paul Melnikow
1af1f497bb Allow configuring allowed CORS origins for suggest (#1282)
- 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.
2017-11-25 18:27:02 -05:00
Vladimir Starkov
e588bef199 Support custom npm registry URLs (#1277) 2017-11-20 19:22:42 -05:00
Paul Melnikow
d91b904b82 Redirect the root only when configured (#1270)
- Fix `’INFOSITE' is not recognized` in `npm start` on Windows

Close #1259
2017-11-17 13:42:38 -06:00
PyvesB
b61a3968ef Cleaned up Elm Package version text and colour 2017-11-12 12:14:42 -05:00
Pyves
7039e68018 Consistent version formatting (#1246)
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).
2017-11-11 17:54:38 -05:00
Danial
8c2de04d99 [sonar] support new SonarQube api (#1239)
* update sonarqube

* parse value as int

* Add tests

* Update example & Add depreciated API example

* eslint

* tidyup & depreciated -> legacy
2017-11-12 09:26:15 +13:00
rnons
178376ddf0 add [elm-package] badge 2017-11-11 14:17:30 -05:00
Peter Gribanov
0d3d33bf1b Get PHP version from [Packagist] (#1256) 2017-11-10 12:46:52 -05:00
Tyler Nickerson
632c70b6b5 Added support for new Code Climate scores (#1236) 2017-11-06 18:53:40 -05:00
Tatsuya Saito
6788a31ed5 Adds new badge for [Redmine] plugin rating (#1247) 2017-11-06 10:59:26 -05:00
Danial
ebcfb105a0 [badge/dynamic/json] User defined JSON source badge (#820)
* 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
2017-11-01 17:02:37 +13:00
Pyves
12dcdc14da Consistent overriding of labels set by the user (#1218)
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.
2017-10-31 23:16:02 -04:00
Paul Melnikow
c22e8965f8 Revert "github issue/pr support labels with spaces (#1240)"
This reverts commit 0d1e4c0923.
2017-10-31 23:12:07 -04:00
Danial
0d1e4c0923 github issue/pr support labels with spaces (#1240) 2017-11-01 12:08:40 +13:00
freezy
ad4a8b4406 [bitrise] Added new build service Bitrise.io (#1227)
Close #574.
2017-10-31 13:23:33 -04:00
Paul Melnikow
37fbef5504 Clean up the outer scope of server.js (#1235) 2017-10-31 13:21:43 -04:00
Paul Melnikow
b458faee1a Change makeBadge() to a synchronous function 2017-10-31 00:10:45 -04:00
Paul Melnikow
a54338afa8 Rename badge() -> makeBadge() (#1232) 2017-10-30 22:08:33 -04:00
Paul Melnikow
3c37dbd3dc [maven-metadata] Add support for maven-metadata.xml (#1214)
Based on ArsenArsen's work in #953.
2017-10-28 15:12:44 -04:00
Paul Melnikow
bde4d925f2 Retire try.html and create new dev + prod builds (#1194)
- Followup from #1163
- Retire try.html
- Separate build config for dev and production
    - Move config for badge examples into the JS build
- Move the prod transform into npm scripts
    - In the future this could be handled using a bundler plugin
- make website builds production build as before
- Run the production build in CI to make sure it’s working
- Build the frontend on Heroku
2017-10-28 14:02:45 -04:00
Pyves
ffb6fdb884 [eclipse-marketplace] New last updated Eclipse badge (#1204)
Implement a fifth Eclipse Marketplace badge, which displays the "date" when the plugin was last updated on the marketplace.
2017-10-25 22:23:22 -04:00
Paul Melnikow
446d4ce21e Correct cache behavior for custom query parameters (#1186)
I developed this for #820 to provide the correct cache behavior when a service wants to use custom parameters from the query string.

For safety, only the declared parameters (and the global parameters) are provided to the service. Consequently, failure to declare a parameter results in the parameter not working at all (undesirable, but easy to debug) rather than indeterminate behavior that depends on the cache state (undesirable, but hard to debug).
2017-10-24 23:00:23 -04:00
Paul Melnikow
366c939cdc Fix downloads and commit activity badges showing zero (#1201)
- `isMetric` tests must be > 0 to pass.
- Fix downloads badge bug introduced in #1140. (So much for [being clever](https://github.com/badges/shields/pull/1140#discussion_r143544396)!)
- Fix 1 week activity badge by returning the previous week instead of the current week.
2017-10-22 10:42:10 -04:00
piekar294
8ac0605e12 [Coveralls] Bitbucket support + service tests (#1189)
Close #793
2017-10-20 12:45:48 -04:00
Mikko Piuhola
396fd494b1 Support for Jenkins plugin version (#1158)
Add simple badge for Jenkins plugins: shows latest version published to Jenkins' repository (fetched from: https://updates.jenkins.io/update-center.actual.json).

Jenkins usually publishes plugin updates one to two times a day, so 4 hours is a reasonable timeout for this large payload.

Close #622
2017-10-18 13:00:50 -04:00
Paul Melnikow
dc44ba7725 Clean up request-handler, github-auth, and analytics; upgrade to Mocha 4 (#1142)
- Add tests to request-handler to prepare for some tweaks to caching for #820
- Clean up code in request-handler: renames, DRY, arrows, imports
- Allow for clean shutdown of `setInterval` code. This requires the ability to cancel autosaving.
- Upgrade to Mocha 4, and clean up so the process exits on its own (see mochajs/mocha#3044)
- Better encapsulate analytics
2017-10-17 22:01:46 -04:00
Marcin Mielnicki
f371c8fb07 On [Github] issues badge, add quotes around multi-word labels (#1178)
- Fix an alt name in readme
2017-10-17 18:11:27 -04:00
Pyves
7fa38c3335 More precise star display with test (#1179) 2017-10-16 16:30:40 -04:00
Pyves
81b9f6ac53 [dotnetstatus github gratipay hexpm wordpress] General test improvements (#1177)
* Extended usage of the metric validators
* Fixed incorrect Worldpress test data
* Removed usages of Joi.equal for bare string literals
* Switched to proper star formatting and made tests more robust
* Removed debug
2017-10-15 16:58:54 -04:00
Pyves
66dbc04bdb [eclipse-marketplace] Eclipse marketplace integration (#1175)
Close #1165
2017-10-14 18:44:09 -04:00
Pyves
b0f2eed0cb [GitHub] Repository size badge (#1174) 2017-10-14 11:38:28 -04:00
Daniel Bankhead
a073a2b9a4 [NSP] badge with tests (#1156)
A continuation of #803. Scoped to `nsp/npm/:package:format` for future-proofing.
2017-10-13 11:58:47 -04:00
Jared Nance
25115ae738 Add [dotnetstatus] integration (#1028) 2017-10-12 22:55:42 -04:00
Tesla Ice Zhang
8e180a0cc5 [JetBrains] Plugin version badge (#1164)
Close #1162
2017-10-12 17:56:01 -04:00
Paul Melnikow
c5a8087ceb Node version for scoped packages and tags (#1144)
This is a rewrite of #1084.

Also touches the implementation of `npm/v` to keep the implementations more consistent with each other.

Clean lint in master.

Closes #723.
2017-10-12 16:06:28 -04:00
Paul Melnikow
7f385fb361 Upgrade dev dependencies, clean lint (#1151)
Looks like eslint 4 adds `no-useless-escape` and `no-self-compare` to `eslint:recommended`.
2017-10-12 15:57:29 -04:00
Pyves
71531b81ef [GitHub] Top language, languages count and code size badges (#1160)
Close #1139
2017-10-12 15:16:10 -04:00
Delgan
088f307ddf [ReadTheDocs] Add initial support (#1150)
Close #136
2017-10-10 12:11:24 -04:00
Ben Gundersen
8f802f6230 Add [Wordpress] theme support (#1138)
- Added badges for Wordpress theme downloads (total) and theme rating
- Add missing dev dependency (minimist)

Close #869
2017-10-10 11:02:42 -04:00
abal
af0f338373 Attempt to show [Discord]-provided error message (#1145)
The Discord API occasionally returns Cloudflare HTML errors or invalid JSON, so in those cases it will fallback to the standard 'inaccessible' message. Some of the returned errors have uppercase letters, so toLowerCase() is used to stay consistent with the rest of shields.

Close #981
2017-10-09 21:31:23 -04:00