summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/plugins/create.md2
-rw-r--r--test/plugins.js16
2 files changed, 17 insertions, 1 deletions
diff --git a/docs/plugins/create.md b/docs/plugins/create.md
index 787b191..3a5e346 100644
--- a/docs/plugins/create.md
+++ b/docs/plugins/create.md
@@ -57,7 +57,7 @@ Private plugins can be hosted on GitHub and included using `git` urls:
```
{
"plugins": [
- "git+https://github.com/MyCompany/mygitbookplugin.git#1.0.0"
+ "myplugin@git+https://github.com/MyCompany/mygitbookplugin.git#1.0.0"
]
}
```
diff --git a/test/plugins.js b/test/plugins.js
index b85e507..5d10031 100644
--- a/test/plugins.js
+++ b/test/plugins.js
@@ -61,6 +61,22 @@ describe('Plugins', function() {
})
.should.be.fulfilledWith(1);
});
+
+ it('should correctly install dependencies from GitHub', function() {
+ return mock.setupBook({
+ 'book.json': {
+ plugins: ['ga@git+https://github.com/GitbookIO/plugin-ga#master']
+ }
+ })
+ .then(function(book) {
+ return book.prepareConfig()
+ .then(function() {
+ var plugins = new PluginsManager(book);
+ return plugins.install();
+ });
+ })
+ .should.be.fulfilledWith(1);
+ });
});
describe('Loading', function() {