[Pkg-javascript-commits] [node-coveralls] 11/332: allow lib path to be passed as an arg.

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 9 13:53:33 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 f27d2ec87c5ce5606cc01839ad056b5b1a4ae7a2
Author: cainus <gregg at caines.ca>
Date:   Thu Mar 28 00:26:55 2013 -0700

    allow lib path to be passed as an arg.
---
 bin/coveralls.js              | 6 +++++-
 lib/convertLcovToCoveralls.js | 7 ++++++-
 package.json                  | 2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/bin/coveralls.js b/bin/coveralls.js
index 7769a0f..1558290 100644
--- a/bin/coveralls.js
+++ b/bin/coveralls.js
@@ -17,7 +17,9 @@ process.stdin.on('end', function() {
 
 var inputToCoveralls = function(input){
 	console.log(input);
-	var postData = convertLcovToCoveralls(input);
+	var libDir = process.argv[2] || 'lib';
+
+	var postData = convertLcovToCoveralls(input, libDir);
   sendToCoveralls(postData, function(err, response, body){
     if (err){
       throw err;
@@ -30,3 +32,5 @@ var inputToCoveralls = function(input){
   });
 
 };
+
+
diff --git a/lib/convertLcovToCoveralls.js b/lib/convertLcovToCoveralls.js
index cd3ee6d..dfc467c 100644
--- a/lib/convertLcovToCoveralls.js
+++ b/lib/convertLcovToCoveralls.js
@@ -21,10 +21,15 @@ var convertLcovFileObject = function(file, filepath){
 };
 
 var convertLcovToCoveralls = function(input, filepath){
-  filepath = filepath || 'lib';
+  console.log("in: ", filepath);
   if (filepath[0] !== '/'){
     filepath = process.cwd() + '/' + filepath;
   }
+  console.log("now: ", filepath);
+	if (filepath[filepath.length - 1] !== '/'){
+		filepath = filepath + '/';
+	}
+  console.log("abs: ", filepath);
   var parsed = lcovParse(input);
 	var postJson = {
     service_job_id : TRAVIS_JOB_ID,
diff --git a/package.json b/package.json
index cb37c26..01fcaed 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": "2.0.0",
+      "version": "2.0.1",
       "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