[Groonga-commit] droonga/drntest at 8112aa7 [master] Use config specifig catalog.json if it exists

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jun 3 12:05:33 JST 2015


YUKI Hiroshi	2015-06-03 12:05:33 +0900 (Wed, 03 Jun 2015)

  New Revision: 8112aa70c39796c84d98cf361759888dc5751c7a
  https://github.com/droonga/drntest/commit/8112aa70c39796c84d98cf361759888dc5751c7a

  Message:
    Use config specifig catalog.json if it exists

  Modified files:
    lib/drntest/engine.rb

  Modified: lib/drntest/engine.rb (+10 -1)
===================================================================
--- lib/drntest/engine.rb    2015-06-03 12:02:07 +0900 (25084a3)
+++ lib/drntest/engine.rb    2015-06-03 12:05:33 +0900 (61f9cb2)
@@ -44,7 +44,7 @@ module Drntest
       when 1
         extract_connection_info_catalog_v1(catalog_json)
       when 2
-        custom_catalog_json_file = target_path.sub_ext(".catalog.json")
+        custom_catalog_json_file = custom_catalog_json(target_path)
         if custom_catalog_json_file.exist?
           custom_catalog_json = JSON.parse(custom_catalog_json_file.read)
           merge_catalog_v2!(catalog_json, custom_catalog_json)
@@ -54,6 +54,15 @@ module Drntest
       catalog_json
     end
 
+    def custom_catalog_json(target_path)
+      catalog_json_for_config = target_path.sub_ext(".catalog.json.#{@config.engine_config}")
+      if catalog_json_for_config.exist?
+        catalog_json_for_config
+      else
+        target_path.sub_ext(".catalog.json")
+      end
+    end
+
     def extract_connection_info_catalog_v1(catalog_json)
       zone = catalog_json["zones"].first
       /\A([^:]+):(\d+)\/(.+)\z/ =~ zone
-------------- next part --------------
HTML����������������������������...
Descargar 



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