[Groonga-commit] groonga/gcs [master] Fix minor mistakes

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Nov 12 17:55:35 JST 2012


YUKI Hiroshi	2012-11-12 17:55:35 +0900 (Mon, 12 Nov 2012)

  New Revision: aaf02b330037396ecb84c50c51df03023ed8de2d
  https://github.com/groonga/gcs/commit/aaf02b330037396ecb84c50c51df03023ed8de2d

  Log:
    Fix minor mistakes

  Modified files:
    tools/run-scenarios
    tools/scenario-runner.js

  Modified: tools/run-scenarios (+6 -4)
===================================================================
--- tools/run-scenarios    2012-11-12 17:38:28 +0900 (fd7be3c)
+++ tools/run-scenarios    2012-11-12 17:55:35 +0900 (37c4f8d)
@@ -8,7 +8,7 @@
 
 var CLI = require(__dirname + '/../lib/command-line').CommandLineInterface;
 var Client = require(__dirname + '/../lib/client').Client;
-var Runner = require(__dirname + 'scenario-runner').Runner;
+var Runner = require(__dirname + '/scenario-runner').Runner;
 var fs = require('fs');
 var path = require('path');
 
@@ -70,11 +70,13 @@ if (commandLine.options.scenario) {
 
 var options = {};
 Object.keys(commandLine.options).forEach(function(key) {
-  if (typeof commandLine.options[key] != 'function')
+  var type = typeof commandLine.options[key];
+  if (type != 'function' && type != 'object')
     options[key] = commandLine.options[key];
 });
-Object.keys(commandLine).forEach(function(key) {
-  if (typeof commandLine[key] != 'function')
+Object.keys(CLI.prototype).concat(Object.keys(commandLine)).forEach(function(key) {
+  var type = typeof commandLine[key];
+  if (type != 'function' && type != 'object')
     options[key] = commandLine[key];
 });
 

  Modified: tools/scenario-runner.js (+1 -1)
===================================================================
--- tools/scenario-runner.js    2012-11-12 17:38:28 +0900 (f410709)
+++ tools/scenario-runner.js    2012-11-12 17:55:35 +0900 (8321252)
@@ -45,7 +45,7 @@ Runner.prototype = {
         requests:   scenario,
         resultsDir: resultsDir },
       function(error) {
-        if (scenarios.length) {
+        if (params.scenarios.length) {
           self.processScenarios(params);
         } else {
           var elapsedTime = Date.now() - params.start;
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index