[Groonga-commit] droonga/fluent-plugin-droonga at 2a56dc7 [master] Validate farms

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Feb 12 15:59:12 JST 2014


YUKI Hiroshi	2014-02-12 15:59:12 +0900 (Wed, 12 Feb 2014)

  New Revision: 2a56dc7436c5861f8a690e9cecb6e9bb920fcc9c
  https://github.com/droonga/fluent-plugin-droonga/commit/2a56dc7436c5861f8a690e9cecb6e9bb920fcc9c

  Message:
    Validate farms

  Modified files:
    lib/droonga/catalog/base.rb

  Modified: lib/droonga/catalog/base.rb (+9 -0)
===================================================================
--- lib/droonga/catalog/base.rb    2014-02-12 16:01:15 +0900 (179356d)
+++ lib/droonga/catalog/base.rb    2014-02-12 15:59:12 +0900 (fcb0dbb)
@@ -214,6 +214,15 @@ module Droonga
 
         raise MissingRequiredParameter.new("farms", @path) unless farms
         validate_parameter_type(farms, "farms", Hash)
+
+        farms.each do |key, value|
+          validate_farm(value, "farms.#{key}")
+        end
+      end
+
+      def validate_farm(farm, name)
+        validate_parameter_type(farm, name, Hash)
+        validate_parameter_type(farm["device"], "#{name}.device", String)
       end
 
       def validate_datasets
-------------- next part --------------
HTML����������������������������...
Download 



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