 # Configuration:
 #   HUBOT_RUNDECK_URL - root URL for Rundeck, not including api path
 #   HUBOT_RUNDECK_TOKEN
-#   HUBOT_RUNDECK_ROOM - default room for notifications from webhooks
 #   HUBOT_RUNDECK_PROJECT
 #
 # Commands:

        @logger.debug body
        parser.parseString body, (e, result) ->
          cb result

  notify: (req) ->
    parser = new Parser()
    parser.parseString req, (err, result) ->
      if err?
        @logger.error JSON.stringify(err)
      else
        @logger.debug inspect(result, false, null)
        status = result.notification['$'].status
        job = result.notification.executions[0].execution.job
        @robot.messageRoom @room, "#{job} - #{status}"

class Job
  constructor: (data) ->


    @cache = {}
    @cache['jobs'] = {}
    @brain = @robot.brain.data

    robot.brain.on 'loaded', =>
