Skip to content

Commit

Permalink
Add your own host!
Browse files Browse the repository at this point in the history
  • Loading branch information
goatslacker committed Nov 23, 2011
1 parent c67db64 commit 0446184
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.hash
config.json
7 changes: 0 additions & 7 deletions Makefile

This file was deleted.

5 changes: 3 additions & 2 deletions bin/git-stats
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/usr/bin/env node
require('../lib/')(process.argv.slice(2));
#!/bin/bash
git "$@"
nohup bin/gitstatsjs "$@" > /dev/null 2>&1 &
2 changes: 2 additions & 0 deletions bin/gitstatsjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('../lib/')(process.argv.slice(2));
27 changes: 0 additions & 27 deletions lib/git.js

This file was deleted.

19 changes: 11 additions & 8 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
const git = require('./git');
const stats = require('./stats');
var config = require('../config.json');

const git_stats = function (args) {
// process stats
stats(args.slice(0));
var xhr = require('xhr').load(config.host, config.port);

// call git
git(args.slice(0));
var stats = function (args) {
var data = {
date: Date.now(),
command: args.shift(),
details: args
};

xhr(config.path).post(data);
};

module.exports = git_stats;
module.exports = stats;
13 changes: 0 additions & 13 deletions lib/stats.js

This file was deleted.

5 changes: 3 additions & 2 deletions node_modules/xhr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0446184

Please sign in to comment.