mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
added some comments, little bit of syntax cleanup
This commit is contained in:
parent
420694789c
commit
962119b51a
3 changed files with 12 additions and 3 deletions
|
@ -2,12 +2,15 @@ var request = require('request');
|
|||
module.exports = function (grunt) {
|
||||
grunt.registerTask('ruby_server', function () {
|
||||
var done = this.async();
|
||||
request.get('http://localhost:5601/config', function (err, resp, body) {
|
||||
|
||||
request.get('http://localhost:5601/config', function (err, resp, body) {
|
||||
// err is a failed response, no server is running
|
||||
if (err) {
|
||||
// run mri_server by default
|
||||
var tasks = ['run:mri_server'];
|
||||
grunt.config.set('ruby_server', 'mri_server');
|
||||
|
||||
// if jruby flag is set, use jruby
|
||||
if (grunt.option('use-jruby')) {
|
||||
tasks = [
|
||||
'download_jruby',
|
||||
|
@ -17,7 +20,10 @@ module.exports = function (grunt) {
|
|||
];
|
||||
grunt.config.set('ruby_server', 'jruby_server');
|
||||
}
|
||||
|
||||
grunt.task.run(tasks);
|
||||
|
||||
// response means server is already running
|
||||
} else {
|
||||
grunt.log.error('Another ruby server is running on localhost:5601.');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue