github/hubot — pull request #135 by tombell (2011-11-01 19:44:11+00:00)
Title: Multiple Adapter Support

Ok, correct branch this time. I extracted `Robot.Adapter` so adapters can extend this class instead of `Robot` itself. The `Robot` instance will call the `run()` function for each adapter when its own `run()` is called in `bin/hubot`.

The command line parses `-a adapter1,adapter2,...` and passes that as an array to the `Robot` constructor which will loop through each and attempt to require the adapter and add it to the `@adapters` array.

It is during this load you could effectively load external adapters by trying to `require "adapter"` which would have been installed via `npm`, and if that fails try loading a local adapter.

The multiple adapter support feels still a bit "hacked" together, so extra eyes looking at the code could help suggest alternative ways for parts.