[Groonga-commit] droonga/drntest at 88986c1 [master] Normalize inReplyTo field in response

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jan 20 18:45:43 JST 2014


Kouhei Sutou	2014-01-20 18:45:43 +0900 (Mon, 20 Jan 2014)

  New Revision: 88986c1041de61599fb5a6d42a7c07f2d6163012
  https://github.com/droonga/drntest/commit/88986c1041de61599fb5a6d42a7c07f2d6163012

  Message:
    Normalize inReplyTo field in response

  Modified files:
    lib/drntest/response-normalizer.rb

  Modified: lib/drntest/response-normalizer.rb (+10 -2)
===================================================================
--- lib/drntest/response-normalizer.rb    2014-01-20 18:39:39 +0900 (696c335)
+++ lib/drntest/response-normalizer.rb    2014-01-20 18:45:43 +0900 (6afc603)
@@ -37,7 +37,9 @@ module Drntest
 
     def normalize_body!(normalized_response)
       return unless groonga_command?
-      normalize_groonga_command_response!(normalized_response[2])
+      droonga_message = normalized_response[2]
+      normalize_droonga_message!(droonga_message)
+      normalize_groonga_command_response!(droonga_message["body"])
     end
 
     GROONGA_COMMANDS = [
@@ -49,8 +51,14 @@ module Drntest
       GROONGA_COMMANDS.include?(@request["type"])
     end
 
+    def normalize_droonga_message!(message)
+      normalized_in_reply_to = "request-id"
+      in_reply_to = message["inReplyTo"]
+      message["inReplyTo"] = normalized_in_reply_to if in_reply_to
+    end
+
     def normalize_groonga_command_response!(response)
-      normalize_groonga_command_header!(response["body"][0])
+      normalize_groonga_command_header!(response[0])
     end
 
     def normalize_groonga_command_header!(header)
-------------- next part --------------
HTML����������������������������...
Download 



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