Kouhei Sutou
null+****@clear*****
Tue Jan 16 08:57:08 JST 2018
Kouhei Sutou 2018-01-16 08:57:08 +0900 (Tue, 16 Jan 2018) New Revision: 8a2b5b2f8ab0b5114eee64ee2bfd03cd55ad314b https://github.com/groonga/fluent-plugin-groonga/commit/8a2b5b2f8ab0b5114eee64ee2bfd03cd55ad314b Message: It's not command_format "command" should include command name and command arguments. Only "command name" isn't command. Modified files: lib/fluent/plugin/in_groonga.rb test/test_input.rb Modified: lib/fluent/plugin/in_groonga.rb (+3 -3) =================================================================== --- lib/fluent/plugin/in_groonga.rb 2018-01-16 08:55:11 +0900 (1e43027) +++ lib/fluent/plugin/in_groonga.rb 2018-01-16 08:57:08 +0900 (a52beb8) @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2017 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2012-2018 Kouhei Sutou <kou �� clear-code.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -36,7 +36,7 @@ module Fluent end config_param :protocol, :enum, :list => [:http, :gqtp], :default => :http - config_param :command_format, :enum, :list => [:tag, :record], :default => :tag + config_param :command_name_position, :enum, :list => [:tag, :record], :default => :tag def configure(conf) super @@ -158,7 +158,7 @@ module Fluent def emit(command, params) normalized_command = command.split(".")[0] return unless emit_command?(normalized_command) - case @input_plugin.command_format + case @input_plugin.command_name_position when :tag tag = "groonga.command.#{normalized_command}" record = params Modified: test/test_input.rb (+3 -3) =================================================================== --- test/test_input.rb 2018-01-16 08:55:11 +0900 (068c907) +++ test/test_input.rb 2018-01-16 08:57:08 +0900 (6245283) @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2017 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2012-2018 Kouhei Sutou <kou �� clear-code.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -117,7 +117,7 @@ EOC @driver.events) end - def test_target_command_with_command_format_record + def test_target_command_with_command_name_position_record @real_response["Content-Type"] = "application/json" @real_response.body = JSON.generate([[0, 0.0, 0.0], true]) conf = <<EOC @@ -126,7 +126,7 @@ EOC port #{@port} real_host #{@real_host} real_port #{@real_port} - command_format record + command_name_position record EOC driver = create_driver(conf) driver.run do -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180116/0680cdb7/attachment-0001.htm