From 28f30f8b7308b7765457457f28a8ae352937cbb5 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Tue, 28 Jun 2016 09:39:15 -0500 Subject: [PATCH] [folder structure] installedPlugins -> plugins --- .gitignore | 2 +- CONTRIBUTING.md | 2 +- {installedPlugins => plugins}/.data/.empty | 0 plugins/.empty | 0 src/cli/serve/serve.js | 2 +- src/cli_plugin/install/__tests__/settings.js | 6 +++--- src/cli_plugin/install/index.js | 2 +- src/cli_plugin/list/__tests__/settings.js | 6 +++--- src/cli_plugin/list/index.js | 2 +- src/cli_plugin/remove/__tests__/settings.js | 6 +++--- src/cli_plugin/remove/index.js | 2 +- src/server/path/index.js | 2 +- tasks/build/index.js | 2 +- tasks/build/installed_plugins.js | 6 +++--- tasks/build/os_packages.js | 4 ++-- tasks/config/packages.js | 2 +- tasks/reject_rej_files.js | 2 +- 17 files changed, 24 insertions(+), 24 deletions(-) rename {installedPlugins => plugins}/.data/.empty (100%) create mode 100644 plugins/.empty diff --git a/.gitignore b/.gitignore index 4f697649a07d8..fc6cd83eacf44 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ target /esvm .htpasswd .eslintcache -installedPlugins +plugins disabledPlugins webpackstats.json config/kibana.dev.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c7ae1a6a5663..a87a854684c91 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,7 +142,7 @@ for development and fixing individual tests. This should work super if you're using the [Kibana plugin generator](https://github.com/elastic/generator-kibana-plugin). If you're not using the generator, well, you're on your own. We suggest you look at how the generator works. `npm run test:dev -- --kbnServer.testsBundle.pluginId=some_special_plugin --kbnServer.plugin-path=../some_special_plugin` -Run the tests for just your particular plugin. Assuming you plugin lives outside of the `installedPlugins directory`, which it should. +Run the tests for just your particular plugin. Assuming you plugin lives outside of the `plugins directory`, which it should. #### Running browser automation tests: diff --git a/installedPlugins/.data/.empty b/plugins/.data/.empty similarity index 100% rename from installedPlugins/.data/.empty rename to plugins/.data/.empty diff --git a/plugins/.empty b/plugins/.empty new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/src/cli/serve/serve.js b/src/cli/serve/serve.js index a104eb5eb94f1..bbf1ca5f3f515 100644 --- a/src/cli/serve/serve.js +++ b/src/cli/serve/serve.js @@ -92,7 +92,7 @@ module.exports = function (program) { 'times to specify multiple directories', pluginDirCollector, [ - fromRoot('installedPlugins'), + fromRoot('plugins'), fromRoot('src/plugins') ] ) diff --git a/src/cli_plugin/install/__tests__/settings.js b/src/cli_plugin/install/__tests__/settings.js index 0dc90ec989f94..b72d96c986c15 100644 --- a/src/cli_plugin/install/__tests__/settings.js +++ b/src/cli_plugin/install/__tests__/settings.js @@ -70,7 +70,7 @@ describe('kibana cli', function () { let options = {}; const kbnPackage = { version: 1234 }; beforeEach(function () { - options = { pluginDir: fromRoot('installedPlugins') }; + options = { pluginDir: fromRoot('plugins') }; }); describe('timeout option', function () { @@ -143,10 +143,10 @@ describe('kibana cli', function () { describe('pluginDir option', function () { - it('should default to installedPlugins', function () { + it('should default to plugins', function () { const settings = parse(command, options, kbnPackage); - expect(settings.pluginDir).to.be(fromRoot('installedPlugins')); + expect(settings.pluginDir).to.be(fromRoot('plugins')); }); it('should set settings.config property', function () { diff --git a/src/cli_plugin/install/index.js b/src/cli_plugin/install/index.js index 74f19bef53729..78547d1db006b 100644 --- a/src/cli_plugin/install/index.js +++ b/src/cli_plugin/install/index.js @@ -39,7 +39,7 @@ export default function pluginInstall(program) { .option( '-d, --plugin-dir ', 'path to the directory where plugins are stored', - fromRoot('installedPlugins') + fromRoot('plugins') ) .description('install a plugin', `Common examples: diff --git a/src/cli_plugin/list/__tests__/settings.js b/src/cli_plugin/list/__tests__/settings.js index 8e08e5b17ad5e..ebfb245dc8c29 100644 --- a/src/cli_plugin/list/__tests__/settings.js +++ b/src/cli_plugin/list/__tests__/settings.js @@ -15,15 +15,15 @@ describe('kibana cli', function () { let command; const options = {}; beforeEach(function () { - command = { pluginDir: fromRoot('installedPlugins') }; + command = { pluginDir: fromRoot('plugins') }; }); describe('pluginDir option', function () { - it('should default to installedPlugins', function () { + it('should default to plugins', function () { const settings = parse(command, options); - expect(settings.pluginDir).to.be(fromRoot('installedPlugins')); + expect(settings.pluginDir).to.be(fromRoot('plugins')); }); it('should set settings.config property', function () { diff --git a/src/cli_plugin/list/index.js b/src/cli_plugin/list/index.js index e7d8320c65e35..102eec3f1825c 100644 --- a/src/cli_plugin/list/index.js +++ b/src/cli_plugin/list/index.js @@ -23,7 +23,7 @@ export default function pluginList(program) { .option( '-d, --plugin-dir ', 'path to the directory where plugins are stored', - fromRoot('installedPlugins') + fromRoot('plugins') ) .description('list installed plugins') .action(processCommand); diff --git a/src/cli_plugin/remove/__tests__/settings.js b/src/cli_plugin/remove/__tests__/settings.js index b87600d959680..f29aa9d6e33c6 100644 --- a/src/cli_plugin/remove/__tests__/settings.js +++ b/src/cli_plugin/remove/__tests__/settings.js @@ -16,7 +16,7 @@ describe('kibana cli', function () { let options = {}; const kbnPackage = { version: 1234 }; beforeEach(function () { - options = { pluginDir: fromRoot('installedPlugins') }; + options = { pluginDir: fromRoot('plugins') }; }); describe('quiet option', function () { @@ -72,10 +72,10 @@ describe('kibana cli', function () { describe('pluginDir option', function () { - it('should default to installedPlugins', function () { + it('should default to plugins', function () { const settings = parse(command, options, kbnPackage); - expect(settings.pluginDir).to.be(fromRoot('installedPlugins')); + expect(settings.pluginDir).to.be(fromRoot('plugins')); }); it('should set settings.config property', function () { diff --git a/src/cli_plugin/remove/index.js b/src/cli_plugin/remove/index.js index 3ea83a1b7200f..9cc99fc534004 100644 --- a/src/cli_plugin/remove/index.js +++ b/src/cli_plugin/remove/index.js @@ -31,7 +31,7 @@ export default function pluginRemove(program) { .option( '-d, --plugin-dir ', 'path to the directory where plugins are stored', - fromRoot('installedPlugins') + fromRoot('plugins') ) .description('remove a plugin', `common examples: diff --git a/src/server/path/index.js b/src/server/path/index.js index e0bd49097c08f..c13d7029253c1 100644 --- a/src/server/path/index.js +++ b/src/server/path/index.js @@ -10,7 +10,7 @@ const CONFIG_PATHS = [ const DATA_PATHS = [ process.env.DATA_PATH, - fromRoot('installedPlugins/.data'), + fromRoot('plugins/.data'), '/var/lib/kibana' ].filter(Boolean); diff --git a/tasks/build/index.js b/tasks/build/index.js index d66f627293b6e..da6a846b782a8 100644 --- a/tasks/build/index.js +++ b/tasks/build/index.js @@ -9,7 +9,7 @@ module.exports = function (grunt) { 'copy:devSource', 'babel:build', '_build:babelOptions', - '_build:installedPlugins', + '_build:plugins', '_build:packageJson', '_build:readme', '_build:babelCache', diff --git a/tasks/build/installed_plugins.js b/tasks/build/installed_plugins.js index 5d2fcc4d4ed37..08199e4ce5f37 100644 --- a/tasks/build/installed_plugins.js +++ b/tasks/build/installed_plugins.js @@ -1,6 +1,6 @@ module.exports = function (grunt) { - grunt.registerTask('_build:installedPlugins', function () { - grunt.file.mkdir('build/kibana/installedPlugins'); - grunt.file.mkdir('build/kibana/installedPlugins/.data'); + grunt.registerTask('_build:plugins', function () { + grunt.file.mkdir('build/kibana/plugins'); + grunt.file.mkdir('build/kibana/plugins/.data'); }); }; diff --git a/tasks/build/os_packages.js b/tasks/build/os_packages.js index 647db0546f545..f94723c0ff0d0 100644 --- a/tasks/build/os_packages.js +++ b/tasks/build/os_packages.js @@ -45,7 +45,7 @@ export default (grunt) => { //config folder is moved to path.conf, exclude {path.home}/config //uses relative path to --prefix, strip the leading / '--exclude', `${packages.path.home.slice(1)}/config`, - '--exclude', `${packages.path.home.slice(1)}/installedPlugins/.data` + '--exclude', `${packages.path.home.slice(1)}/plugins/.data` ]; const debOptions = [ '-t', 'deb', @@ -60,7 +60,7 @@ export default (grunt) => { const args = [ `${buildDir}/=${packages.path.home}/`, `${buildDir}/config/=${packages.path.conf}/`, - `${buildDir}/installedPlugins/.data/=${packages.path.data}/`, + `${buildDir}/plugins/.data/=${packages.path.data}/`, `${servicesByName.sysv.outputDir}/etc/=/etc/`, `${servicesByName.systemd.outputDir}/lib/=/lib/` ]; diff --git a/tasks/config/packages.js b/tasks/config/packages.js index f6876bfee685c..4c9eae7118e25 100644 --- a/tasks/config/packages.js +++ b/tasks/config/packages.js @@ -16,7 +16,7 @@ export default (grunt) => { const FOLDER_HOME = '/usr/share/kibana'; const FOLDER_DATA = '/var/lib/kibana'; const FOLDER_LOGS = '/var/log/kibana'; - const FOLDER_PLUGINS = `${FOLDER_HOME}/installedPlugins`; + const FOLDER_PLUGINS = `${FOLDER_HOME}/plugins`; const FILE_KIBANA_CONF = `${FOLDER_CONFIG}/kibana.yml`; const FILE_KIBANA_BINARY = `${FOLDER_HOME}/bin/kibana`; diff --git a/tasks/reject_rej_files.js b/tasks/reject_rej_files.js index 33c8c3273fa51..d0e1de6e8b465 100644 --- a/tasks/reject_rej_files.js +++ b/tasks/reject_rej_files.js @@ -10,7 +10,7 @@ export default grunt => { grunt.registerTask('rejectRejFiles', 'Reject any git-apply .rej files', () => { const ignoredTopLevelDirs = [ 'esvm', - 'installedPlugins', + 'plugins', 'node_modules', 'optimize' ];