lib/grntest/tester.rb in grntest-1.4.8 vs lib/grntest/tester.rb in grntest-1.4.9

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com> +# Copyright (C) 2012-2021 Sutou Kouhei <kou@clear-code.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. @@ -54,10 +54,16 @@ "Use COMMAND as groonga_suggest_create_dataset command", "(#{tester.groonga_suggest_create_dataset})") do |command| tester.groonga_suggest_create_dataset = normalize_command(command) end + parser.on("--groonga-synonym-generate=COMMAND", + "Use COMMAND as groonga_synonym_generate command", + "(#{tester.groonga_synonym_generate})") do |command| + tester.groonga_synonym_generate = normalize_command(command) + end + available_interfaces = ["stdio", "http"] available_interface_labels = available_interfaces.join(", ") parser.on("--interface=INTERFACE", available_interfaces, "Use INTERFACE for communicating Groonga", "[#{available_interface_labels}]", @@ -301,11 +307,14 @@ name end end end - attr_accessor :groonga, :groonga_httpd, :groonga_suggest_create_dataset + attr_accessor :groonga + attr_accessor :groonga_httpd + attr_accessor :groonga_suggest_create_dataset + attr_accessor :groonga_synonym_generate attr_accessor :interface attr_writer :use_http_post attr_writer :use_http_chunked attr_accessor :input_type attr_accessor :output_type @@ -331,9 +340,13 @@ @groonga = "groonga" @groonga_httpd = "groonga-httpd" @groonga_suggest_create_dataset = "groonga-suggest-create-dataset" unless command_exist?(@groonga_suggest_create_dataset) @groonga_suggest_create_dataset = nil + end + @groonga_synonym_generate = "groonga-synonym-generate" + unless command_exist?(@groonga_synonym_generate) + @groonga_synonym_generate = nil end @interface = "stdio" @use_http_post = false @use_http_chunked = false @input_type = "json"