From 26a09d87de5a903535e20d3d2b36c003e81f51e6 Mon Sep 17 00:00:00 2001 From: indexzero Date: Wed, 16 Feb 2011 05:44:33 -0500 Subject: [PATCH] [api dist] Update everything for rebrand from `jobber` to `neuron` --- README.md | 18 ++++---- docs/jobber.html | 17 ------- docs/neuron.html | 32 +++++++++++++ docs/{jobber => neuron}/job-manager.html | 57 +++++++++--------------- docs/{jobber => neuron}/job.html | 2 +- docs/{jobber => neuron}/worker.html | 10 ++--- lib/{jobber.js => neuron.js} | 14 +++--- lib/{jobber => neuron}/job-manager.js | 18 ++++---- lib/{jobber => neuron}/job.js | 0 lib/{jobber => neuron}/worker.js | 8 ++-- package.json | 10 ++--- test/helpers.js | 2 +- test/job-manager-concurrency-test.js | 10 ++--- test/job-manager-simple-test.js | 14 +++--- test/job-test.js | 14 +++--- test/worker-test.js | 16 +++---- 16 files changed, 121 insertions(+), 121 deletions(-) delete mode 100644 docs/jobber.html create mode 100644 docs/neuron.html rename docs/{jobber => neuron}/job-manager.html (75%) rename docs/{jobber => neuron}/job.html (90%) rename docs/{jobber => neuron}/worker.html (90%) rename lib/{jobber.js => neuron.js} (74%) rename lib/{jobber => neuron}/job-manager.js (89%) rename lib/{jobber => neuron}/job.js (100%) rename lib/{jobber => neuron}/worker.js (88%) diff --git a/README.md b/README.md index d57e767..dd1fdd2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Jobber +# Neuron -The simplest possible event driven job manager / FIFO queue in node.js +The simplest possible event driven job manager, FIFO queue, and "task based cache" in node.js ## Installation @@ -11,29 +11,29 @@ The simplest possible event driven job manager / FIFO queue in node.js ### Installing forever
-  [sudo] npm install jobber
+  [sudo] npm install neuron
 
## Usage -Jobber is not a simple job queue with support for a dynamic level of concurrency. It a way to manage jobs as they are created and completed in an async, event-driven manner. Heuristics for parallelization, ordering, and pooling are simple right now and jobs are processed in a FIFO order. +Neuron is not a simple job queue with support for a dynamic level of concurrency. It a way to manage jobs as they are created and completed in an async, event-driven manner. Heuristics for parallelization, ordering, and pooling are simple right now and jobs are processed in a FIFO order. More features may be added in the future, so keep me posted on how you use it. ### Managing Jobs -Managing jobs in jobber is easy. Jobber doesn't assume anything about the internal structure of the properties for each of your jobs except that they have a function called `work()`. Each JobManager is designed to process one instance of a Job. +Managing jobs in neuron is easy. Neuron doesn't assume anything about the internal structure of the properties for each of your jobs except that they have a function called `work()`. Each JobManager is designed to process one instance of a Job. Here's a quick sample of creating a manager and adding a job.
   var util = require('util'),
-      jobber = require('jobber'),
-      manager = new jobber.JobManager();
+      neuron = require('neuron'),
+      manager = new neuron.JobManager();
       
   //
   // Create the manager and set the job.
   //
-  var manager = new jobber.JobManager({ concurrency: 100 });
-  manager.setJob(new jobber.Job('listDir', {
+  var manager = new neuron.JobManager({ concurrency: 100 });
+  manager.setJob(new neuron.Job('listDir', {
     dirname: __dirname,
     work: function (dirname) {
       var self = this;
diff --git a/docs/jobber.html b/docs/jobber.html
deleted file mode 100644
index 4bfe874..0000000
--- a/docs/jobber.html
+++ /dev/null
@@ -1,17 +0,0 @@
-      jobber.js           

jobber.js

/*
- * jobber.js: Creates and manages jobs and job results. 
- *
- * (C) 2010 Charlie Robbins
- * MIT LICENSE
- *
- */
-
-require.paths.unshift(__dirname);
-
-var jobber = exports;

Export Components

- -

Export each of the core prototypes exposed by jobber.

jobber.JobManager = require('jobber/job-manager').JobManager;
-jobber.Job        = require('jobber/job').Job;
-jobber.Worker     = require('jobber/worker').Worker;
-
-
\ No newline at end of file diff --git a/docs/neuron.html b/docs/neuron.html new file mode 100644 index 0000000..4829dec --- /dev/null +++ b/docs/neuron.html @@ -0,0 +1,32 @@ + neuron.js

neuron.js

/*
+ * neuron.js: Creates and manages jobs and job results. 
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+require.paths.unshift(__dirname);
+
+var neuron = exports;

Export Components

+ +

Export each of the core prototypes exposed by neuron.

neuron.JobManager = require('neuron/job-manager').JobManager;
+neuron.Job        = require('neuron/job').Job;
+neuron.Worker     = require('neuron/worker').Worker;

function randomString (bits)

+ +

@bits {int} Number of bits for the random string to have (base64)

+ +

randomString returns a pseude-random ASCII string which contains at least the specified number of bits of entropy +the return value is a string of length ⌈bits/6⌉ of characters from the base64 alphabet

neuron.randomString = function (bits) {
+  var chars, rand, i, ret;
+  chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
+  ret = '';
+  

in v8, Math.random() yields 32 pseudo-random bits (in spidermonkey it gives 53)

  while (bits > 0) {
+    rand = Math.floor(Math.random()*0x100000000) // 32-bit integer

base 64 means 6 bits per character, so we use the top 30 bits from rand to give 30/6=5 characters.

    for (i=26; i>0 && bits>0; i-=6, bits-=6) { 
+      ret+=chars[0x3F & rand >>> i];
+    }
+  }
+  return ret;
+};
+
+
\ No newline at end of file diff --git a/docs/jobber/job-manager.html b/docs/neuron/job-manager.html similarity index 75% rename from docs/jobber/job-manager.html rename to docs/neuron/job-manager.html index 8109539..d1bee48 100644 --- a/docs/jobber/job-manager.html +++ b/docs/neuron/job-manager.html @@ -1,4 +1,4 @@ - job-manager.js

job-manager.js

/*
+      job-manager.js           

job-manager.js

/*
  * JobManager.js: Creates and manages jobs, workers and job results. 
  *
  * (C) 2010 Charlie Robbins
@@ -8,31 +8,16 @@
  
 var util = require('util'),
     events = require('events'),
-    jobber = require('jobber');

function randomString (bits)

- -

@bits {int} Number of bits for the random string to have (base64)

- -

randomString returns a pseude-random ASCII string which contains at least the specified number of bits of entropy -the return value is a string of length ⌈bits/6⌉ of characters from the base64 alphabet

function randomString (bits) {
-  var chars, rand, i, ret;
-  chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
-  ret = '';
-  

in v8, Math.random() yields 32 pseudo-random bits (in spidermonkey it gives 53)

  while (bits > 0) {
-    rand = Math.floor(Math.random()*0x100000000) // 32-bit integer

base 64 means 6 bits per character, so we use the top 30 bits from rand to give 30/6=5 characters.

    for (i=26; i>0 && bits>0; i-=6, bits-=6) { 
-      ret+=chars[0x3F & rand >>> i];
-    }
-  }
-  return ret;
-};

function JobManager (options)

+ neuron = require('neuron');

function JobManager (options)

@options {Object} Settings to use for this instance

Constructor function for the JobManager object which manages a set of workers -for a single instance of jobber.Job.

var JobManager = exports.JobManager = function (options) {
+for a single instance of neuron.Job.

var JobManager = exports.JobManager = function (options) {
   options = options || {};
   
-  if (options.job && !(options.job instanceof jobber.Job)) {
-    throw new Error('job must be an instance of jobber.Job');
+  if (options.job && !(options.job instanceof neuron.Job)) {
+    throw new Error('job must be an instance of neuron.Job');
   }
   
   this.concurrency = options.concurrency || 50;
@@ -40,16 +25,16 @@ 

@options {Object} Settings to use for this instance

this.running = {}; this.waiting = {}; this.queue = []; -};

Inherit from events.EventEmitter

util.inherits(JobManager, events.EventEmitter);

funtion JobManager.prototype.setJob (job)

+};

Inherit from events.EventEmitter

util.inherits(JobManager, events.EventEmitter);

funtion JobManager.prototype.setJob (job)

@job {Job} The job to use for this instance.

Sets the job for this instance to manage.

JobManager.prototype.setJob = function (job) {
   if (this.queue.length > 0) throw new Error('Cannot setJob() with unfinished jobs in queue.');
-  else if (!(job instanceof jobber.Job)) throw new Error('job must be an instance of jobber.Job');
+  else if (!(job instanceof neuron.Job)) throw new Error('job must be an instance of neuron.Job');
   
   this.job = job;
-};

function start (/* variable arguments */)

+};

function start (/* variable arguments */)

@arguments {variable} The arguments to pass to the running job.

@@ -57,14 +42,14 @@

@arguments {variable} The arguments to pass to the running job.

by creating a new worker to run which takes @arguments. If the number of keys in this.running exceeds this.concurrency the job is appended to the waiting set and added to the queue managed by this instance.

JobManager.prototype.start = function () {
-  if (!(this.job instanceof jobber.Job)) throw new Error('Cannot runNext() with no job to perform.');
-  

Create a unique id for this worker.

  workerId = randomString(32);
+  if (!(this.job instanceof neuron.Job)) throw new Error('Cannot runNext() with no job to perform.');
+  

Create a unique id for this worker.

  workerId = neuron.randomString(32);
   while (this.running[workerId] || this.waiting[workerId]) {
-    workerId = randomString(32);
+    workerId = neuron.randomString(32);
   }
   
   var self = this,
-      worker = new jobber.Worker(workerId, this.job, Array.prototype.slice.call(arguments));
+      worker = new neuron.Worker(workerId, this.job, Array.prototype.slice.call(arguments));
   
   worker.once('finish', function () {
     self._workComplete(worker);
@@ -82,7 +67,7 @@ 

@arguments {variable} The arguments to pass to the running job.

} return workerId; -};

function JobManager.prototype.getWorker (workerId)

+};

function JobManager.prototype.getWorker (workerId)

@workerId {string} The id of the worker to retreive.

@@ -95,23 +80,23 @@

@workerId {string} The id of the worker to retreive.

} return null; -};

function _workComplete (worker)

+};

function _workComplete (worker)

@worker {Worker} The worker who has just completed.

Updates bookkeeping associated with this instance knowing that the given worker is now complete.

JobManager.prototype._workComplete = function (worker) {
   var self = this, nextWorker, nextId;
-  

Wait a moment before indicating to the user that we are done

  process.nextTick(function () {
+  

Wait a moment before indicating to the user that we are done

  process.nextTick(function () {
     self.emit('finish', worker);
-    

If the queue is now empty, notify the user

    if (self.queue.length === 0) {
+    

If the queue is now empty, notify the user

    if (self.queue.length === 0) {
       self.emit('empty');
     }
   });
   
   delete this.running[worker.id];
   this._replenish();
-};

function _replenish ()

+};

function _replenish ()

Replenishes the running worker by dequeuing waiting workers from this.queue.

JobManager.prototype._replenish = function () {
   var self = this, running = Object.keys(this.running).length,
@@ -120,13 +105,13 @@ 

@worker {Worker} The worker who has just completed.

if (this.queue.length === 0) return false; else if (running > this.concurrency) return false; - while (running < this.concurrency && (workerId = this.queue.shift())) {

Close over the workerId and the worker annoymously so we can + while (running < this.concurrency && (workerId = this.queue.shift())) {

Close over the workerId and the worker annoymously so we can user process.nextTick() effectively without leakage.

    (function (id, w) {
-      started.push(id);

Move the worker from the set of waiting workers to the set + started.push(id);

Move the worker from the set of waiting workers to the set of running workers

      delete self.waiting[id];
       self.running[id] = w;
-      

Increment the length of the running workers manually -so we don't have to call Object.keys(this.running) again

      running += 1;

Start the worker on the next tick.

      process.nextTick(function () {
+      

Increment the length of the running workers manually +so we don't have to call Object.keys(this.running) again

      running += 1;

Start the worker on the next tick.

      process.nextTick(function () {
         w.run();
       });
     })(workerId, this.waiting[workerId]);
diff --git a/docs/jobber/job.html b/docs/neuron/job.html
similarity index 90%
rename from docs/jobber/job.html
rename to docs/neuron/job.html
index 78afb33..41dfb1f 100644
--- a/docs/jobber/job.html
+++ b/docs/neuron/job.html
@@ -1,4 +1,4 @@
-      job.js           

job.js

/*
+      job.js           

job.js

/*
  * job.js: Simple data structure for tracking a predefined task (i.e. work() and default params). 
  *
  * (C) 2010 Charlie Robbins
diff --git a/docs/jobber/worker.html b/docs/neuron/worker.html
similarity index 90%
rename from docs/jobber/worker.html
rename to docs/neuron/worker.html
index 9f416cd..1c303b1 100644
--- a/docs/jobber/worker.html
+++ b/docs/neuron/worker.html
@@ -1,5 +1,5 @@
-      worker.js           

worker.js

/*
- * worker.js: Runs individual instances of jobs being managed inside of jobber.
+      worker.js           

worker.js

/*
+ * worker.js: Runs individual instances of jobs being managed inside of neuron.
  *
  * (C) 2010 Charlie Robbins
  * MIT LICENSE
@@ -8,7 +8,7 @@
  
 var util = require('util'),
     events = require('events'),
-    jobber = require('jobber');

function Worker (workerId, job, args)

+ neuron = require('neuron');

function Worker (workerId, job, args)

@workerId {string} The id of this worker

@@ -17,9 +17,9 @@

@job {Job} The job that this worker should run

@args {Array} The arguments to pass to the job.work() function

Constructor function for the Worker object which runs the specified arguments -on the work() function of the given instance of jobber.Job.

var Worker = exports.Worker = function (workerId, job, args) {
+on the work() function of the given instance of neuron.Job.

var Worker = exports.Worker = function (workerId, job, args) {
   if (!workerId) throw new Error('workerId is required.');
-  else if (!(job instanceof jobber.Job)) throw new Error('job must be an instanceof jobber.Job');
+  else if (!(job instanceof neuron.Job)) throw new Error('job must be an instanceof neuron.Job');
   
   this.id = workerId;
   this.job = job;
diff --git a/lib/jobber.js b/lib/neuron.js
similarity index 74%
rename from lib/jobber.js
rename to lib/neuron.js
index 7e3e043..f8ab37c 100644
--- a/lib/jobber.js
+++ b/lib/neuron.js
@@ -1,5 +1,5 @@
 /*
- * jobber.js: Creates and manages jobs and job results. 
+ * neuron.js: Creates and manages jobs and job results. 
  *
  * (C) 2010 Charlie Robbins
  * MIT LICENSE
@@ -8,15 +8,15 @@
 
 require.paths.unshift(__dirname);
 
-var jobber = exports;
+var neuron = exports;
 
 //
 // ### Export Components
-// Export each of the core prototypes exposed by jobber.
+// Export each of the core prototypes exposed by neuron.
 //
-jobber.JobManager = require('jobber/job-manager').JobManager;
-jobber.Job        = require('jobber/job').Job;
-jobber.Worker     = require('jobber/worker').Worker;
+neuron.JobManager = require('neuron/job-manager').JobManager;
+neuron.Job        = require('neuron/job').Job;
+neuron.Worker     = require('neuron/worker').Worker;
 
 
 //
@@ -25,7 +25,7 @@ jobber.Worker     = require('jobber/worker').Worker;
 // randomString returns a pseude-random ASCII string which contains at least the specified number of bits of entropy
 // the return value is a string of length ⌈bits/6⌉ of characters from the base64 alphabet
 //
-jobber.randomString = function (bits) {
+neuron.randomString = function (bits) {
   var chars, rand, i, ret;
   chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
   ret = '';
diff --git a/lib/jobber/job-manager.js b/lib/neuron/job-manager.js
similarity index 89%
rename from lib/jobber/job-manager.js
rename to lib/neuron/job-manager.js
index e45d091..12e26ae 100644
--- a/lib/jobber/job-manager.js
+++ b/lib/neuron/job-manager.js
@@ -8,19 +8,19 @@
  
 var util = require('util'),
     events = require('events'),
-    jobber = require('jobber');
+    neuron = require('neuron');
 
 //
 // ### function JobManager (options)
 // #### @options {Object} Settings to use for this instance
 // Constructor function for the JobManager object which manages a set of workers
-// for a single instance of jobber.Job.
+// for a single instance of neuron.Job.
 //
 var JobManager = exports.JobManager = function (options) {
   options = options || {};
   
-  if (options.job && !(options.job instanceof jobber.Job)) {
-    throw new Error('job must be an instance of jobber.Job');
+  if (options.job && !(options.job instanceof neuron.Job)) {
+    throw new Error('job must be an instance of neuron.Job');
   }
   
   this.concurrency = options.concurrency || 50;
@@ -40,7 +40,7 @@ util.inherits(JobManager, events.EventEmitter);
 //
 JobManager.prototype.setJob = function (job) {
   if (this.queue.length > 0) throw new Error('Cannot setJob() with unfinished jobs in queue.');
-  else if (!(job instanceof jobber.Job)) throw new Error('job must be an instance of jobber.Job');
+  else if (!(job instanceof neuron.Job)) throw new Error('job must be an instance of neuron.Job');
   
   this.job = job;
 };
@@ -54,18 +54,18 @@ JobManager.prototype.setJob = function (job) {
 // to the `waiting` set and added to the `queue` managed by this instance.
 //
 JobManager.prototype.start = function () {
-  if (!(this.job instanceof jobber.Job)) throw new Error('Cannot runNext() with no job to perform.');
+  if (!(this.job instanceof neuron.Job)) throw new Error('Cannot runNext() with no job to perform.');
   
   //
   // Create a unique id for this worker.
   //
-  workerId = jobber.randomString(32);
+  workerId = neuron.randomString(32);
   while (this.running[workerId] || this.waiting[workerId]) {
-    workerId = jobber.randomString(32);
+    workerId = neuron.randomString(32);
   }
   
   var self = this,
-      worker = new jobber.Worker(workerId, this.job, Array.prototype.slice.call(arguments));
+      worker = new neuron.Worker(workerId, this.job, Array.prototype.slice.call(arguments));
   
   worker.once('finish', function () {
     self._workComplete(worker);
diff --git a/lib/jobber/job.js b/lib/neuron/job.js
similarity index 100%
rename from lib/jobber/job.js
rename to lib/neuron/job.js
diff --git a/lib/jobber/worker.js b/lib/neuron/worker.js
similarity index 88%
rename from lib/jobber/worker.js
rename to lib/neuron/worker.js
index 318efc8..80e0a38 100644
--- a/lib/jobber/worker.js
+++ b/lib/neuron/worker.js
@@ -1,5 +1,5 @@
 /*
- * worker.js: Runs individual instances of jobs being managed inside of jobber.
+ * worker.js: Runs individual instances of jobs being managed inside of neuron.
  *
  * (C) 2010 Charlie Robbins
  * MIT LICENSE
@@ -8,7 +8,7 @@
  
 var util = require('util'),
     events = require('events'),
-    jobber = require('jobber');
+    neuron = require('neuron');
 
 //
 // ### function Worker (workerId, job, args)
@@ -16,11 +16,11 @@ var util = require('util'),
 // #### @job {Job} The job that this worker should run
 // #### @args {Array} The arguments to pass to the `job.work()` function
 // Constructor function for the Worker object which runs the specified arguments
-// on the work() function of the given instance of jobber.Job.
+// on the work() function of the given instance of neuron.Job.
 //
 var Worker = exports.Worker = function (workerId, job, args) {
   if (!workerId) throw new Error('workerId is required.');
-  else if (!(job instanceof jobber.Job)) throw new Error('job must be an instanceof jobber.Job');
+  else if (!(job instanceof neuron.Job)) throw new Error('job must be an instanceof neuron.Job');
   
   this.id = workerId;
   this.job = job;
diff --git a/package.json b/package.json
index d766c48..01b6f38 100644
--- a/package.json
+++ b/package.json
@@ -1,17 +1,17 @@
 {
-  "name": "jobber",
-  "description": "The simplest possible event driven job manager / FIFO queue in node.js",
+  "name": "neuron",
+  "description": "The simplest possible event driven job manager, FIFO queue, and 'task based cache' in node.js",
   "version": "0.2.1",
   "author": "Charlie Robbins ",
   "repository": {
       "type": "git",
-      "url": "http://github.com/indexzero/jobber.git" 
+      "url": "http://github.com/indexzero/neuron.git" 
   },
-  "keywords": ["job queue", "tools"],
+  "keywords": ["job queue", "tools", "cache"],
   "dependencies": {
     "vows": ">= 0.5.2"
   },
-  "main": "./lib/jobber",
+  "main": "./lib/neuron",
   "scripts": { "test": "vows test/*-test.js --spec" },
   "engines": { "node": ">= 0.4.0" }
 }
diff --git a/test/helpers.js b/test/helpers.js
index 0b992c6..bb2418c 100644
--- a/test/helpers.js
+++ b/test/helpers.js
@@ -1,5 +1,5 @@
 /*
- * helpers.js: Helpers for the jobber tests
+ * helpers.js: Helpers for the neuron tests
  *
  * (C) 2010 Charlie Robbins
  *
diff --git a/test/job-manager-concurrency-test.js b/test/job-manager-concurrency-test.js
index e34a813..2f037a3 100644
--- a/test/job-manager-concurrency-test.js
+++ b/test/job-manager-concurrency-test.js
@@ -1,5 +1,5 @@
 /*
- * jobber-test.js: Tests unit tests for jobber module
+ * neuron-test.js: Tests unit tests for neuron module
  *
  * (C) 2010 Charlie Robbins
  *
@@ -13,7 +13,7 @@ var sys = require('sys'),
     eyes = require('eyes'),
     vows = require('vows'),
     assert = require('assert'),
-    jobber = require('jobber'),
+    neuron = require('neuron'),
     helpers = require('./helpers');
     
 var workerIds = [];
@@ -22,8 +22,8 @@ function createConcurrentBatch (message, nestedTest, timeout) {
   var batch = {
     "When using an instance of the JobManager": {
       topic: function () {
-        var manager = new jobber.JobManager({ concurrency: 10 });
-        manager.setJob(new jobber.Job('listDir', {
+        var manager = new neuron.JobManager({ concurrency: 10 });
+        manager.setJob(new neuron.Job('listDir', {
           dirname: __dirname,
           work: helpers.listDir(timeout || 3000)
         }));
@@ -50,7 +50,7 @@ function createConcurrentBatch (message, nestedTest, timeout) {
   return batch;
 }
 
-vows.describe('jobber/job-manager/simple').addBatch(
+vows.describe('neuron/job-manager/simple').addBatch(
   createConcurrentBatch("should have the correct number running and waiting", function (manager) {
     assert.equal(manager.queue.length, 15);
     assert.equal(Object.keys(manager.running).length, 10);
diff --git a/test/job-manager-simple-test.js b/test/job-manager-simple-test.js
index 0309515..5a8ab0a 100644
--- a/test/job-manager-simple-test.js
+++ b/test/job-manager-simple-test.js
@@ -1,5 +1,5 @@
 /*
- * jobber-test.js: Tests unit tests for jobber module
+ * neuron-test.js: Tests unit tests for neuron module
  *
  * (C) 2010 Charlie Robbins
  *
@@ -13,16 +13,16 @@ var sys = require('sys'),
     eyes = require('eyes'),
     vows = require('vows'),
     assert = require('assert'),
-    jobber = require('jobber'),
+    neuron = require('neuron'),
     helpers = require('./helpers');
     
 var workerId;
 
-vows.describe('jobber/job-manager/simple').addBatch({
+vows.describe('neuron/job-manager/simple').addBatch({
   "When using an instance of the JobManager": {
     topic: function () {
-      var manager = new jobber.JobManager();
-      manager.setJob(new jobber.Job('listDir', {
+      var manager = new neuron.JobManager();
+      manager.setJob(new neuron.Job('listDir', {
         dirname: __dirname,
         work: helpers.listDir(100)
       }));
@@ -60,7 +60,7 @@ vows.describe('jobber/job-manager/simple').addBatch({
 }).addBatch({
   "When using an instance of the JobManager": {
     topic: function () {
-      var manager = new jobber.JobManager();
+      var manager = new neuron.JobManager();
       return manager;
     },
     "the start() method with no job should throw an error": function (manager) {
@@ -71,7 +71,7 @@ vows.describe('jobber/job-manager/simple').addBatch({
         assert.throws(function () { manager.setJob('foo') });
         manager.queue.unshift('foo');
         assert.throws(function () {
-          manager.setJob(new jobber.Job('listDir', {
+          manager.setJob(new neuron.Job('listDir', {
             dirname: __dirname,
             work: helpers.listDir(100)
           }));
diff --git a/test/job-test.js b/test/job-test.js
index ee6a6cd..3529a45 100644
--- a/test/job-test.js
+++ b/test/job-test.js
@@ -1,5 +1,5 @@
 /*
- * jobber-test.js: Tests unit tests for jobber module
+ * neuron-test.js: Tests unit tests for neuron module
  *
  * (C) 2010 Charlie Robbins
  *
@@ -13,26 +13,26 @@ var sys = require('sys'),
     eyes = require('eyes'),
     vows = require('vows'),
     assert = require('assert'),
-    jobber = require('jobber'),
+    neuron = require('neuron'),
     helpers = require('./helpers');
 
-vows.describe('jobber/job').addBatch({
+vows.describe('neuron/job').addBatch({
   "When using an instance of a Job": {
     "when passed invalid parameters": {
       "should throw an error": function () {
         // No params
         assert.throws(function () {
-          var j = new jobber.Job();
+          var j = new neuron.Job();
         });
         
         // No work
         assert.throws(function () {
-          var j = new jobber.Worker('someId');
+          var j = new neuron.Worker('someId');
         });
         
         // Pass finished
         assert.throws(function () {
-          var j = new jobber.Worker('someId', {
+          var j = new neuron.Worker('someId', {
             work: function () { /* Purposefully Empty */ },
             finished: false
           });
@@ -41,7 +41,7 @@ vows.describe('jobber/job').addBatch({
     },
     "when passed valid parameters": {
       topic: function () {
-        var job = new jobber.Job('testJob', {
+        var job = new neuron.Job('testJob', {
           work: function () { /* Purposefully empty */ },
           someProp: true,
           someObj: {
diff --git a/test/worker-test.js b/test/worker-test.js
index 4adf208..81444c0 100644
--- a/test/worker-test.js
+++ b/test/worker-test.js
@@ -1,5 +1,5 @@
 /*
- * jobber-test.js: Tests unit tests for jobber module
+ * neuron-test.js: Tests unit tests for neuron module
  *
  * (C) 2010 Charlie Robbins
  *
@@ -13,34 +13,34 @@ var sys = require('sys'),
     eyes = require('eyes'),
     vows = require('vows'),
     assert = require('assert'),
-    jobber = require('jobber'),
+    neuron = require('neuron'),
     helpers = require('./helpers');
     
 var worker;
 
-vows.describe('jobber/worker').addBatch({
+vows.describe('neuron/worker').addBatch({
   "When using an instance of a Worker": {
     "when passed invalid parameters": {
       "should throw an error": function () {
         // No params
         assert.throws(function () {
-          var w = new jobber.Worker();
+          var w = new neuron.Worker();
         });
         
         // No job
         assert.throws(function () {
-          var w = new jobber.Worker('someId');
+          var w = new neuron.Worker('someId');
         });
         
-        // Not an instance of jobber.Job
+        // Not an instance of neuron.Job
         assert.throws(function () {
-          var w = new jobber.Worker('someId', function () { /* Purposefully Empty */ });
+          var w = new neuron.Worker('someId', function () { /* Purposefully Empty */ });
         });
       }
     },
     "setting 'finished' to true": {
       topic: function () {
-        worker = new jobber.Worker('testId', new jobber.Job('empty', {
+        worker = new neuron.Worker('testId', new neuron.Job('empty', {
           work: function () { /* Purposefully empty */ }
         }));