mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 10:33:22 +00:00
Merge pull request #1192 from jashaj/master
Limit splitting plugin name for git with authentication
This commit is contained in:
@@ -20,7 +20,7 @@ function normalizePluginsList(plugins) {
|
||||
plugins = _.map(plugins, function(plugin) {
|
||||
if (plugin.name) return plugin;
|
||||
|
||||
var parts = plugin.split('@');
|
||||
var parts = plugin.split('@', 1);
|
||||
var name = parts[0];
|
||||
var version = parts[1];
|
||||
return {
|
||||
|
||||
@@ -81,6 +81,21 @@ describe('Plugins', function() {
|
||||
})
|
||||
.should.be.fulfilledWith(1);
|
||||
});
|
||||
it('should correctly install dependencies from GitHub via ssh', function() {
|
||||
return mock.setupBook({
|
||||
'book.json': {
|
||||
plugins: ['ga@git@github.com:GitbookIO/plugin-ga.git#master']
|
||||
}
|
||||
})
|
||||
.then(function(book) {
|
||||
return book.prepareConfig()
|
||||
.then(function() {
|
||||
var plugins = new PluginsManager(book);
|
||||
return plugins.install();
|
||||
});
|
||||
})
|
||||
.should.be.fulfilledWith(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Loading', function() {
|
||||
|
||||
Reference in New Issue
Block a user