alpha-one
Version:
ideas about recurring tasks in Web- and Backend-Application building
64 lines (44 loc) • 1.41 kB
JavaScript
// Generated by CoffeeScript 1.7.1
(function() {
var TRM, TYPES, alert, badge, debug, echo, git, git_route, info, log, njs_path, repo, rpr, warn, whisper;
njs_path = require('path');
TYPES = require('coffeenode-types');
TRM = require('coffeenode-trm');
rpr = TRM.rpr.bind(TRM);
badge = 'alpha/git';
echo = TRM.echo.bind(TRM);
log = TRM.get_logger('plain', badge);
info = TRM.get_logger('info', badge);
whisper = TRM.get_logger('whisper', badge);
alert = TRM.get_logger('alert', badge);
debug = TRM.get_logger('debug', badge);
warn = TRM.get_logger('warn', badge);
git = require('gift');
git_route = njs_path.join(__dirname, '../.git');
git_route = '/Users/flow/cnd/node_modules/coffeenode-trm/.git';
repo = git(git_route);
TRM.dir(repo);
repo.commits(function(erroror, commits) {
var commit, _i, _len, _results;
if (typeof error !== "undefined" && error !== null) {
throw error;
}
commits.sort(function(a, b) {
a = 1 * a['committed_date'];
b = 1 * b['committed_date'];
if (a > b) {
return +1;
}
if (a < b) {
return -1;
}
return 0;
});
_results = [];
for (_i = 0, _len = commits.length; _i < _len; _i++) {
commit = commits[_i];
_results.push(info(commit['committed_date'], TRM.grey(commit['message'])));
}
return _results;
});
}).call(this);