Permalink
Browse files

tweak the hubot loading bay. loadBot() loads a new adapter, robot() l…

…oads the core Robot class
  • Loading branch information...
1 parent 5294d42 commit 77eb4736b73da4b2b5c32332ddc8513870b26901 @technoweenie technoweenie committed Oct 27, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −1 bin/hubot
  2. +4 −1 index.coffee
View
@@ -81,7 +81,7 @@ else
scriptsPath = Path.resolve "./scripts"
console.log "Loading deploy-local scripts at #{scriptsPath}"
- robot = Hubot.robot adapter, scriptsPath, Options.name
+ robot = Hubot.loadBot adapter, scriptsPath, Options.name
robot.enableSlash = Options.enableSlash
scriptsPath = Path.resolve __dirname, "..", "src", "hubot", "scripts"
View
@@ -4,10 +4,13 @@
# YourBot = Hubot.robot 'campfire', 'blah', 'yourbot'
# Loads a Hubot robot
-exports.robot = (adapterName, path, botName) ->
+exports.loadBot = (adapterName, path, botName) ->
robot = require "./src/hubot/#{adapterName}"
new robot path, botName
+exports.robot = ->
+ require './src/robot'
+
# Loads the Hubot test harness.
exports.tests = ->
require './test/tests'

0 comments on commit 77eb473

Please sign in to comment.