Permalink
Browse files

put pending status in the badge filenames

  • Loading branch information...
1 parent c6d051c commit e18aca1a56207beecb4a56b1fa8478199cc12807 @substack substack committed Mar 17, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 index.js
View
@@ -11,8 +11,12 @@ function cachedBadgeFilename (cacheDir, browsers) {
var browserVersions = Object.keys(browsers[browserName]).sort();
browserVersions.forEach(function (browserVersion) {
var browser = browserName + browserVersion;
- var success = browsers[browserName][browserVersion] ? 's' : 'f';
- fileNameParts.push(browser + success);
+ var status = {
+ true: 's',
+ false: 'f',
+ pending: 'p'
+ }[browsers[browserName][browserVersion]] || 'f';
+ fileNameParts.push(browser + status);
});
});
var fileName = fileNameParts.join('-');

0 comments on commit e18aca1

Please sign in to comment.