get recent commits from local libs cloned instead of couch.
diff --git a/package.json b/package.json
index b8b0279..42b825b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "medic",
- "version": "0.1.10",
+ "version": "0.1.11",
"description": "continuous integration setup for Apache Cordova",
"author": "Fil Maj <maj.fil@gmail.com> (http://filmaj.ca)",
"main": "dashboard.js",
@@ -12,7 +12,7 @@
"request": "2.12.0",
"follow": "0.8.0",
"ncallbacks": "1.0.0",
- "mime":"1.2.9"
+ "mime": "1.2.9"
},
"devDependencies": {
"elementtree": "0.1.4",
diff --git a/src/dashboard/api.js b/src/dashboard/api.js
index d6f93ed..04764be 100644
--- a/src/dashboard/api.js
+++ b/src/dashboard/api.js
@@ -63,6 +63,7 @@
for (var lib in libraries.first_tested_commit) if (libraries.first_tested_commit.hasOwnProperty(lib)) {
var platform = lib.substr('cordova-'.length);
module.exports.tested_shas[lib] = commit_list.since(lib, libraries.first_tested_commit[lib]);
+ module.exports.commits[lib] = commit_list.recent(lib, 20);
// query each sha for data
console.log('[COUCH] Querying ' + platform + ' for ' + module.exports.tested_shas[lib].shas.length + ' SHAs...');
query_for_results(platform, module.exports.tested_shas[lib].shas, end);
@@ -70,24 +71,6 @@
}
});
- // TODO: is this necessary?
- // get recent commits from couch for each repo
- for (var repo in libraries.paths) if (libraries.paths.hasOwnProperty(repo)) (function(lib) {
- if (lib.indexOf('mobile-spec') > -1) return;
- couch.cordova_commits.get(lib, function(err, doc) {
- if (err) {
- console.error('WTF CANT TALK TO COUCH?!');
- throw new Error(err);
- } else {
- // save the commit SHAs + dates
- module.exports.commits[lib] = {
- "shas":doc.shas,
- "dates":doc.dates
- };
- }
- });
- })(repo);
-
// subscribe to couch changes for commits
couch.cordova_commits.follow(function(err, change) {
if (err) console.error('COMMIT FOLLOW ERR OMFGWTFBBQ', err);