Skip to content

Commit

Permalink
Merge pull request #5592 from BigFunger/plugin-installer-remove-githu…
Browse files Browse the repository at this point in the history
…b-support

[plugin installer] removed github support
  • Loading branch information
BigFunger committed Dec 22, 2015
2 parents cfb7e13 + a22d61f commit 499b0c1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
Binary file not shown.
6 changes: 2 additions & 4 deletions src/cli/plugin/__tests__/setting_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ describe('kibana cli', function () {

var settings = parser.parse();

expect(settings.urls).to.have.property('length', 2);
expect(settings.urls).to.have.property('length', 1);
expect(settings.urls).to.contain('https://download.elastic.co/kibana/test-plugin/test-plugin-latest.tar.gz');
expect(settings.urls).to.contain('https://github.com/kibana/test-plugin/archive/master.tar.gz');
});

it('should populate the urls collection properly version specified', function () {
Expand All @@ -216,9 +215,8 @@ describe('kibana cli', function () {

var settings = parser.parse();

expect(settings.urls).to.have.property('length', 2);
expect(settings.urls).to.have.property('length', 1);
expect(settings.urls).to.contain('https://download.elastic.co/kibana/test-plugin/test-plugin-v1.1.1.tar.gz');
expect(settings.urls).to.contain('https://github.com/kibana/test-plugin/archive/v1.1.1.tar.gz');
});

it('should populate the pluginPath', function () {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/plugin/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ export default function pluginCli(program) {
`
Common examples:
-i username/sample
attempts to download the latest version from the following urls:
attempts to download the latest version from the following url:
https://download.elastic.co/username/sample/sample-latest.tar.gz
https://github.com/username/sample/archive/master.tar.gz
-i username/sample/v1.1.1
attempts to download version v1.1.1 from the following urls:
attempts to download version v1.1.1 from the following url:
https://download.elastic.co/username/sample/sample-v1.1.1.tar.gz
https://github.com/username/sample/archive/v1.1.1.tar.gz
-i sample -u http://www.example.com/other_name.tar.gz
attempts to download from the specified url,
Expand Down
8 changes: 0 additions & 8 deletions src/cli/plugin/setting_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ export default function createSettingParser(options) {
return 'https://download.elastic.co/' + settings.organization + '/' + settings.package + '/' + filename;
}

function generateGithubUrl(settings) {
const version = (settings.version) || 'master';
const filename = version + '.tar.gz';

return 'https://github.com/' + settings.organization + '/' + settings.package + '/archive/' + filename;
}

function parse() {
let parts;
let settings = {
Expand Down Expand Up @@ -78,7 +71,6 @@ export default function createSettingParser(options) {
settings.version = parts.shift();

settings.urls.push(generateDownloadUrl(settings));
settings.urls.push(generateGithubUrl(settings));
}
}

Expand Down

0 comments on commit 499b0c1

Please sign in to comment.