-
- Downloads
Move [StaticBadge] to own service & add test; also affects [gitter] (#2284)
This picks up @RedSparr0w's work in #1802. 1. The handler for the static badge is moved into its own service with a synchronous handler. Avoiding an async call may make the static badges slightly faster, though it may be worth profiling this if it turns out we want asynchronous static badges in the future. If it doesn't make a performance difference we could make this handler `async` like the others. 2. Most of the custom static-badge logic is in a BaseStaticBadge base class. 3. Rewrite the static Gitter badge to use BaseStaticBadge. 4. A bit of minor cleanup in related functions.
Showing
- gh-badges/lib/make-badge.js 0 additions, 1 deletiongh-badges/lib/make-badge.js
- lib/request-handler.js 5 additions, 5 deletionslib/request-handler.js
- server.js 4 additions, 51 deletionsserver.js
- services/base-static.js 58 additions, 0 deletionsservices/base-static.js
- services/base.js 58 additions, 50 deletionsservices/base.js
- services/gitter/gitter.service.js 18 additions, 17 deletionsservices/gitter/gitter.service.js
- services/static-badge/static-badge.service.js 20 additions, 0 deletionsservices/static-badge/static-badge.service.js
- services/static-badge/static-badge.tester.js 40 additions, 0 deletionsservices/static-badge/static-badge.tester.js
Loading
Please register or sign in to comment