 # jenkins build <job> with <params> - builds the specified Jenkins job with parameters as key=value&key2=value2
 # jenkins list - lists Jenkins jobs
 #
-module.exports = (robot) ->
-  robot.respond /jenkins build ([\w\.\-_]+)( with (.+))?/i, (msg) ->
 
+jenkinsBuild = (msg) ->
     url = process.env.HUBOT_JENKINS_URL
     job = msg.match[1]
     params = msg.match[3]

            msg.send response
          catch error
            msg.send error

        else
          msg.send "Jenkins says: #{body}"

jenkinsList = (msg) ->
    url = process.env.HUBOT_JENKINS_URL
    job = msg.match[1]
    req = msg.http("#{url}/api/json")
