Skip to content

Commit

Permalink
remove legacy wrong code
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Janda committed Apr 14, 2012
1 parent aadafce commit 632d1bf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lib/ant.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ Ant.prototype._init = function() {
self.off(name, cb);
}
});

self.server.on('connection', function (connection) {
self.emit('connection.open', connection);
});

self.server.on('ready', function () {
self.emit('ant.listening', self.post);
Expand Down Expand Up @@ -158,25 +154,4 @@ Ant.prototype.start = function() {
Ant.prototype.stop = function() {
var self = this;
self.server.server.close();
}

Ant.prototype.spawn = function(path) {
var self = this;

var child = new (forever.Monitor)(path, {
max: 10,
silent: true,
//forever: true,
options: []
});

child.on('exit', function(code) {
self.emit('child.exit')
});

child.on('start', function(process, data) {
self.emit('child.started', data)
})

child.start();
}
23 changes: 23 additions & 0 deletions lib/anthill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var Anthill = module.exports = function(options) {
}

Anthill.prototype.spawn = function(path) {
var self = this;

var child = new (forever.Monitor)(path, {
max: 10,
silent: true,
//forever: true,
options: []
});

child.on('exit', function(code) {
self.emit('child.exit')
});

child.on('start', function(process, data) {
self.emit('child.started', data)
})

child.start();
}
Empty file added spec/anthillSpec.rb
Empty file.

0 comments on commit 632d1bf

Please sign in to comment.