cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [13/32] cordova-fetch git commit: Fixed broken fetch tests
Date Tue, 06 Jun 2017 00:44:35 GMT
Fixed broken fetch tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-fetch/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-fetch/commit/adacbcbf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-fetch/tree/adacbcbf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-fetch/diff/adacbcbf

Branch: refs/heads/master
Commit: adacbcbfc53cc365d7f5b62949d824ce4226512e
Parents: 952ac2f
Author: Steve Gill <stevengill97@gmail.com>
Authored: Thu Jun 16 14:17:21 2016 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Thu Jun 16 14:17:21 2016 -0700

----------------------------------------------------------------------
 index.js           | 9 +++++----
 spec/fetch.spec.js | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-fetch/blob/adacbcbf/index.js
----------------------------------------------------------------------
diff --git a/index.js b/index.js
index 560f36b..ba95280 100644
--- a/index.js
+++ b/index.js
@@ -143,12 +143,13 @@ function trimID(target) {
 
     //If GITURL, set target to repo name
     if (isUrl(target)) {
+        //strip away .git and everything that follows       
+        var strippedTarget = target.split('.git');
         var re = /.*\/(.*)/;
         //Grabs everything in url after last `/`
-        parts = target.match(re);
-        //strip away .git and everything that follows
-        var strippedTarget = parts[1].split('.git');
-        target = strippedTarget[0];
+        parts = strippedTarget[0].match(re);
+        
+        target = parts[1];
     }
     
     //strip away everything after '@'

http://git-wip-us.apache.org/repos/asf/cordova-fetch/blob/adacbcbf/spec/fetch.spec.js
----------------------------------------------------------------------
diff --git a/spec/fetch.spec.js b/spec/fetch.spec.js
index 1407752..2a2d2c0 100644
--- a/spec/fetch.spec.js
+++ b/spec/fetch.spec.js
@@ -146,7 +146,7 @@ describe('platform fetch/uninstall test via npm & git tags with --save',
functio
             expect(err).toBeUndefined();
         })
         .fin(done);
-    }, 60000);
+    }, 70000);
 });
 
 describe('plugin fetch/uninstall test with --save', function () {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message