Comparing version 1.1.1 to 1.1.2
@@ -64,30 +64,11 @@ #!/usr/bin/env node | ||
var makeLocalWebServer = function(cb){ | ||
var srv = http.createServer(function (req, res) { | ||
console.log(req.headers); | ||
console.log(req.url); | ||
console.log(req.method); | ||
req.pipe(process.stdout); | ||
req.on('end', function(){ | ||
res.writeHead(200, {'Content-Type': 'text/plain'}); | ||
res.end(); | ||
srv.close(); | ||
}); | ||
}).listen(9090, cb); | ||
}; | ||
var sendToCoveralls = function(postJson){ | ||
var str = JSON.stringify(postJson); | ||
var done = function(error, response, body) { | ||
console.log("done"); | ||
if (error){ | ||
throw error; | ||
} | ||
console.log("response body: ", body); | ||
}; | ||
var url = 'https://coveralls.io/api/v1/jobs'; | ||
//url = 'http://localhost:9090/'; | ||
request({url : url, method : 'POST', form : { json : str}}, function(err, response, body){ | ||
console.log(arguments); | ||
if (err){ | ||
throw err; | ||
} | ||
console.log(response.statusCode); | ||
console.log(body); | ||
}); | ||
@@ -100,12 +81,7 @@ }; | ||
var data = JSON.parse(inJson); | ||
//data = { files : []}; //TODO remove this | ||
console.log("successfully read json from json-cov"); | ||
console.log("successfully read json from json-cov."); | ||
postJson = convertJsonCovToCoveralls(data); | ||
console.log(JSON.stringify(postJson)); | ||
console.log("successfully converted input json to coveralls format: ", postJson); | ||
//makeLocalWebServer(function(){ | ||
sendToCoveralls(postJson); | ||
//}); | ||
console.log("successfully converted input json to coveralls format."); | ||
sendToCoveralls(postJson); | ||
}; | ||
@@ -112,0 +88,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"keywords" : ["coverage", "coveralls"], | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"bugs": { | ||
@@ -8,0 +8,0 @@ "url": "https://github.com/cainus/node-coveralls/issues" |
158539
5698