     (error, response, body) ->
       callback error, project, auth, client, body
 
-updateFile = (project, auth, client, body, callback) ->
+exports.updateFile = (project, auth, client, body, callback) ->
   console.dir body
   file = null
   for file in body.files

          # google authorization redirect
          uri = url.parse request.url, true
          if uri.pathname == '/favicon.ico'
            console.log "http rejected #{uri.pathname}"
            response.writeHead 404, {"Content-Type": "text/plain"}
            response.write "404 - no favicon\n"
            response.end
            return
          console.log "http path #{uri.pathname}"
          code = uri.query.code
          response.writeHead 200, {"Content-Type": "text/plain"}
          response.write "Erp derp\n"

          server.close
          codeToToken auth, code, (error, auth) ->
            data = JSON.stringify auth.credentials
            console.log "caching credentials #{authCacheFile} #{data}." if exports.trace
            fs.writeFile authCacheFile, data, (error) ->
                console.log "cached credentials." if exports.trace
            callback error, auth
        .listen 0, '127.0.0.1', () ->
          address = server.address()
