Yasuhiro Horimoto
null+****@clear*****
Tue Jan 16 11:50:34 JST 2018
Yasuhiro Horimoto 2018-01-16 11:50:34 +0900 (Tue, 16 Jan 2018) New Revision: 14d1cf38eddaf8fa3e5f0f853b332adcb627775b https://github.com/groonga/fluent-plugin-groonga/commit/14d1cf38eddaf8fa3e5f0f853b332adcb627775b Merged 638bad8: Merge pull request #26 from komainu8/fluentd-v0.12 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-15 18:48:02 +0900 (9424339) +++ lib/fluent/plugin/in_groonga.rb 2018-01-16 11:50:34 +0900 (34b5b21) @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2017 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2012-2018 Yasuhiro Horimoto <horimoto �� 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 @@ -34,7 +34,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 @@ -165,7 +165,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-15 18:48:02 +0900 (0a21aaa) +++ test/test_input.rb 2018-01-16 11:50:34 +0900 (a97cda4) @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2012 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2018 Yasuhiro Horimoto <horimoto �� 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 @@ -115,7 +115,7 @@ EOC end 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 @@ -124,7 +124,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.expect_emit("groonga.command", -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180116/657666e8/attachment-0003.htm