diff --git a/lib/index.js b/lib/index.js index 60d9dfe..d6cd253 100644 --- a/lib/index.js +++ b/lib/index.js @@ -37,7 +37,8 @@ var flatten = function(options) { if (json.repository) { if (typeof json.repository === 'object' && typeof json.repository.url === 'string') { - moduleInfo.repository = json.repository.url.replace('git://github.com', 'https://github.com').replace('.git', ''); + moduleInfo.repository = json.repository.url.replace('git+ssh://git@', 'git://').replace('.git', ''); + moduleInfo.repository = moduleInfo.repository.replace('git://github.com', 'https://github.com').replace('.git', ''); moduleInfo.repository = moduleInfo.repository.replace('git@github.com:', 'https://github.com/').replace('.git', ''); } } diff --git a/tests/test.js b/tests/test.js index 5f26ba6..851cea0 100644 --- a/tests/test.js +++ b/tests/test.js @@ -27,12 +27,12 @@ var tests = { }, 'and give us results': function (d) { assert.isTrue(Object.keys(d).length > 70); - assert.equal(d['abbrev@1.0.5'].licenses, 'MIT'); + assert.equal(d['abbrev@1.0.7'].licenses, 'ISC'); }, 'and convert to CSV': function(d) { var str = checker.asCSV(d); assert.equal('"module name","license","repository"', str.split('\n')[0]); - assert.equal('"abbrev@1.0.5","MIT","http://github.com/isaacs/abbrev-js"', str.split('\n')[1]); + assert.equal('"abbrev@1.0.7","ISC","https://github.com/isaacs/abbrev-js"', str.split('\n')[1]); }, 'should parse local without unknown': { topic: function () {