[Pkg-javascript-commits] [node-coveralls] 06/332: cleaned up some output, removed dead code.

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 9 13:53:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-coveralls.

commit 52ec837581ad2a7f2c1cccc11a01b2a03fa1777f
Author: cainus <gregg at caines.ca>
Date:   Sat Mar 23 18:34:49 2013 -0700

    cleaned up some output, removed dead code.
---
 bin/coveralls.js | 40 ++++++++--------------------------------
 package.json     |  2 +-
 2 files changed, 9 insertions(+), 33 deletions(-)

diff --git a/bin/coveralls.js b/bin/coveralls.js
index ddd1832..37ea880 100644
--- a/bin/coveralls.js
+++ b/bin/coveralls.js
@@ -61,34 +61,15 @@ var convertJsonCovToCoveralls = function(data){
 	return postJson;
 };
 
-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);
   });
 };
 
@@ -96,16 +77,11 @@ var sendToCoveralls = function(postJson){
 var reportToCoveralls = function(inJson){
 	inJson = trimToJson(inJson);
 	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);
 };
 
 
diff --git a/package.json b/package.json
index 8606ced..8d1679d 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
       "name": "coveralls",
       "description" : "takes json-cov output into stdin and POSTs to coveralls.io",
       "keywords" : ["coverage", "coveralls"], 
-      "version": "1.1.1",
+      "version": "1.1.2",
       "bugs": {
        "url": "https://github.com/cainus/node-coveralls/issues"
       },

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-coveralls.git



More information about the Pkg-javascript-commits mailing list