diff --git a/git-host-info.js b/git-host-info.js index 94cd176..d81be20 100644 --- a/git-host-info.js +++ b/git-host-info.js @@ -42,7 +42,7 @@ var gitHosts = module.exports = { 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', 'shortcuttemplate': '{type}:{project}{#committish}', 'pathtemplate': '{project}{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz', + 'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}', 'hashformat': function (fragment) { return 'file-' + formatHashFragment(fragment) } diff --git a/test/gist.js b/test/gist.js index a40cf26..468483d 100644 --- a/test/gist.js +++ b/test/gist.js @@ -25,7 +25,7 @@ test('fromUrl(gist url)', function (t) { t.is(hostinfo.file(''), 'https://gist.githubusercontent.com/111/' + proj + '/raw/' + (branch ? branch + '/' : ''), label + ' -> file') t.is(hostinfo.file('C'), 'https://gist.githubusercontent.com/111/' + proj + '/raw/' + (branch ? branch + '/' : '') + 'C', label + ' -> file') t.is(hostinfo.file('C/D'), 'https://gist.githubusercontent.com/111/' + proj + '/raw/' + (branch ? branch + '/' : '') + 'C/D', label + ' -> file') - t.is(hostinfo.tarball(), 'https://gist.github.com/111/' + proj + '/archive/' + (branch || 'master') + '.tar.gz', label + ' -> tarball') + t.is(hostinfo.tarball(), 'https://codeload.github.com/gist/' + proj + '/tar.gz/' + (branch || 'master'), label + ' -> tarball') } }