2014-08-26 02:55:32 +02:00
|
|
|
module.exports = function (grunt) {
|
2014-09-04 00:15:58 +02:00
|
|
|
var jrubyPath = grunt.config.get('jrubyPath');
|
|
|
|
var jruby = jrubyPath + '/bin/jruby';
|
2014-09-08 19:52:06 +02:00
|
|
|
var cmd = grunt.config.get('src') + '/server/bin/initialize';
|
2014-09-04 00:15:58 +02:00
|
|
|
|
2014-09-16 20:17:57 +02:00
|
|
|
// config:
|
|
|
|
// wait: should task wait until the script exits before finishing
|
|
|
|
// ready: if not waiting, then how do we know the process is ready?
|
|
|
|
// quiet: ignore stdout from the process
|
|
|
|
// failOnError: the process is killed if output to stderr
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
wait: false,
|
|
|
|
ready: /kibana server started/i,
|
|
|
|
quiet: true,
|
|
|
|
failOnError: true
|
|
|
|
};
|
|
|
|
|
2014-08-26 02:55:32 +02:00
|
|
|
var config = {
|
2014-09-04 00:15:58 +02:00
|
|
|
mri_server: {
|
2014-09-16 20:17:57 +02:00
|
|
|
options: options,
|
2014-09-04 00:15:58 +02:00
|
|
|
cmd: cmd
|
|
|
|
},
|
|
|
|
jruby_server: {
|
2014-09-16 20:17:57 +02:00
|
|
|
options: options,
|
2014-09-04 00:15:58 +02:00
|
|
|
cmd: jruby,
|
|
|
|
args: [
|
|
|
|
cmd
|
|
|
|
]
|
2014-10-10 19:33:48 +02:00
|
|
|
},
|
|
|
|
built_kibana: {
|
|
|
|
options: {
|
|
|
|
wait: true,
|
|
|
|
quiet: false,
|
|
|
|
},
|
|
|
|
cmd: './target/<%= pkg.name + "-" + pkg.version %>/bin/kibana'
|
2014-08-26 02:55:32 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
return config;
|
|
|
|
};
|