Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not include "built": false statuses

  • Loading branch information...
commit 75c70671bb98fea7ade6da9cf08bd20b3251cf51 1 parent 1031cd0
@jfhbrook authored
Showing with 5 additions and 10 deletions.
  1. +3 −4 README.md
  2. +1 −3 bundler/index.js
  3. +1 −3 test/statuses.js
View
7 README.md
@@ -132,7 +132,6 @@ Connection: keep-alive
"module": "concat-stream",
"builds": {
"1.4.1": {
- "built": true,
"ok": true
}
}
@@ -142,11 +141,11 @@ Connection: keep-alive
The "module" and "builds" fields should both exist. Keys for "builds" are the
versions. Properties:
-* "built": Whether a build has been attempted recently or not
-* "ok": Whether the package has last built *successfully* or not
-* "error": If the package was built *insuccessfully* ("built" is true, "ok" is
+* "ok": Whether the package has last built or not
+* "error": If the package was built *insuccessfully* ("ok" is
false), this property will contain information about the error
+Versions which have not been built will not be keyed onto "builds".
## Heroku Installation
View
4 bundler/index.js
@@ -129,7 +129,7 @@ module.exports = function bundler(opts) {
var result = { package: json, bundle: bundle };
- c.statuses.put(pkg, { built: true, ok: true });
+ c.statuses.put(pkg, { ok: true });
inProgress[key].emit('bundle', result);
destroyInProgress();
@@ -145,7 +145,6 @@ module.exports = function bundler(opts) {
destroyInProgress();
c.statuses.db.put(pkg, {
- built: true,
ok: false,
error: xtend(
{
@@ -193,7 +192,6 @@ module.exports = function bundler(opts) {
c.statuses.get({ module: module, version: v }, function (err, st) {
if (err) {
if (err.name == 'NotFoundError') {
- sts[v] = { built: false };
return finish();
}
return finish(err);
View
4 test/statuses.js
@@ -18,8 +18,7 @@ tap.test('latest has not been built', function (t) {
t.doesNotThrow(function () {
t.equal(builds.module, 'concat-stream', 'module is concat-stream');
- t.equal(Object.keys(builds.builds).length, 1, 'there is only 1 `latest`');
- t.equal(builds.builds[Object.keys(builds.builds)].built, false, 'has not been built');
+ t.equal(Object.keys(builds.builds).length, 0, 'no builds for semver range');
}, 'returns an object');
t.end();
})
@@ -51,7 +50,6 @@ tap.test('latest has been built', function (t) {
t.doesNotThrow(function () {
t.equal(builds.module, 'concat-stream', 'module is concat-stream');
t.equal(Object.keys(builds.builds).length, 1, 'there is only 1 `latest`');
- t.equal(builds.builds[Object.keys(builds.builds)].built, true, 'has been built');
t.equal(builds.builds[Object.keys(builds.builds)].ok, true, 'worked correctly');
}, 'returns an object');
t.end();
Please sign in to comment.
Something went wrong with that request. Please try again.