File tree 5 files changed +6
-1
lines changed
5 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ GitHost.prototype.path = function (opts) {
137
137
return this . _fill ( this . pathtemplate , opts )
138
138
}
139
139
140
- GitHost . prototype . tarball = function ( opts ) {
140
+ GitHost . prototype . tarball = function ( opts_ ) {
141
+ var opts = extend ( { } , opts_ , { noCommittish : false } )
141
142
return this . _fill ( this . tarballtemplate , opts )
142
143
}
143
144
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ test('fromUrl(bitbucket url)', function (t) {
23
23
t . is ( hostinfo . file ( 'C' ) , 'https://bitbucket.org/111/222/raw/' + ( branch || 'master' ) + '/C' , label + ' -> file' )
24
24
t . is ( hostinfo . file ( 'C/D' ) , 'https://bitbucket.org/111/222/raw/' + ( branch || 'master' ) + '/C/D' , label + ' -> file' )
25
25
t . is ( hostinfo . tarball ( ) , 'https://bitbucket.org/111/222/get/' + ( branch || 'master' ) + '.tar.gz' , label + ' -> tarball' )
26
+ t . is ( hostinfo . tarball ( { noCommittish : true } ) , 'https://bitbucket.org/111/222/get/' + ( branch || 'master' ) + '.tar.gz' , label + ' -> tarball' )
26
27
}
27
28
28
29
require ( './lib/standard-tests' ) ( verify , 'bitbucket.org' , 'bitbucket' )
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ test('fromUrl(gist url)', function (t) {
26
26
t . is ( hostinfo . file ( 'C' ) , 'https://gist.githubusercontent.com/111/' + proj + '/raw/' + ( branch ? branch + '/' : '' ) + 'C' , label + ' -> file' )
27
27
t . is ( hostinfo . file ( 'C/D' ) , 'https://gist.githubusercontent.com/111/' + proj + '/raw/' + ( branch ? branch + '/' : '' ) + 'C/D' , label + ' -> file' )
28
28
t . is ( hostinfo . tarball ( ) , 'https://codeload.github.com/gist/' + proj + '/tar.gz/' + ( branch || 'master' ) , label + ' -> tarball' )
29
+ t . is ( hostinfo . tarball ( { noCommittish : true } ) , 'https://codeload.github.com/gist/' + proj + '/tar.gz/' + ( branch || 'master' ) , label + ' -> tarball' )
29
30
}
30
31
}
31
32
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ test('fromUrl(github url)', function (t) {
31
31
t . is ( hostinfo . file ( 'C' ) , 'https://raw.githubusercontent.com/111/222/' + ( branch || 'master' ) + '/C' , label + ' -> file' )
32
32
t . is ( hostinfo . file ( 'C/D' ) , 'https://raw.githubusercontent.com/111/222/' + ( branch || 'master' ) + '/C/D' , label + ' -> file' )
33
33
t . is ( hostinfo . tarball ( ) , 'https://codeload.github.com/111/222/tar.gz/' + ( branch || 'master' ) , label + ' -> tarball' )
34
+ t . is ( hostinfo . tarball ( { noCommittish : true } ) , 'https://codeload.github.com/111/222/tar.gz/' + ( branch || 'master' ) , label + ' -> tarball' )
34
35
}
35
36
36
37
// github shorturls
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ test('fromUrl(gitlab url)', function (t) {
23
23
t . is ( hostinfo . file ( 'C' ) , 'https://gitlab.com/111/222/raw/' + ( branch || 'master' ) + '/C' , label + ' -> file' )
24
24
t . is ( hostinfo . file ( 'C/D' ) , 'https://gitlab.com/111/222/raw/' + ( branch || 'master' ) + '/C/D' , label + ' -> file' )
25
25
t . is ( hostinfo . tarball ( ) , 'https://gitlab.com/111/222/repository/archive.tar.gz?ref=' + ( branch || 'master' ) , label + ' -> tarball' )
26
+ t . is ( hostinfo . tarball ( { noCommittish : true } ) , 'https://gitlab.com/111/222/repository/archive.tar.gz?ref=' + ( branch || 'master' ) , label + ' -> tarball' )
26
27
}
27
28
28
29
require ( './lib/standard-tests' ) ( verify , 'gitlab.com' , 'gitlab' )
You can’t perform that action at this time.
0 commit comments