Kouhei Sutou
null+****@clear*****
Thu Jan 30 17:42:07 JST 2014
Kouhei Sutou 2014-01-30 17:42:07 +0900 (Thu, 30 Jan 2014) New Revision: 75102ef164aed72a6b5f575334c1956495815b6d https://github.com/droonga/fluent-plugin-droonga/commit/75102ef164aed72a6b5f575334c1956495815b6d Message: input-adapter: use "input_adapter" values in catalog.json "options.plugins" in catalog.json is still used when "input_adapter.plugins" isn't specified for backward compatibility. Modified files: lib/droonga/dispatcher.rb lib/droonga/input_adapter.rb Modified: lib/droonga/dispatcher.rb (+1 -1) =================================================================== --- lib/droonga/dispatcher.rb 2014-01-30 17:34:36 +0900 (1b36884) +++ lib/droonga/dispatcher.rb 2014-01-30 17:42:07 +0900 (c696d4f) @@ -55,7 +55,7 @@ module Droonga @current_id = 0 @local = Regexp.new("^#{@name}") @input_adapter = - InputAdapter.new(self, :plugins => Droonga.catalog.option("plugins")) + InputAdapter.new(self, Droonga.catalog.input_adapter_options) @output_adapter = OutputAdapter.new(self, :plugins => Droonga.catalog.option("plugins")) @farm = Farm.new(name, @loop, :dispatcher => self) Modified: lib/droonga/input_adapter.rb (+5 -3) =================================================================== --- lib/droonga/input_adapter.rb 2014-01-30 17:34:36 +0900 (66cce1e) +++ lib/droonga/input_adapter.rb 2014-01-30 17:42:07 +0900 (59a875b) @@ -1,4 +1,4 @@ -# Copyright (C) 2013 Droonga Project +# Copyright (C) 2013-2014 Droonga Project # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -15,15 +15,17 @@ require "droonga/pluggable" require "droonga/input_adapter_plugin" +require "droonga/input_adapter_options" require "droonga/input_message" module Droonga class InputAdapter include Pluggable - def initialize(dispatcher, options={}) + def initialize(dispatcher, options=nil) @dispatcher = dispatcher - load_plugins(options[:plugins] || []) + @options = options || InputAdapterOptions.new({}) + load_plugins(@options.plugins) end def adapt(message) -------------- next part -------------- HTML����������������������������...Download