[Groonga-commit] droonga/fluent-plugin-droonga at ab97e4e [master] Don't use "responsible" as the term for "can sent as a response"

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 26 15:10:00 JST 2013


YUKI Hiroshi	2013-12-26 15:10:00 +0900 (Thu, 26 Dec 2013)

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

  Message:
    Don't use "responsible" as the term for "can sent as a response"

  Modified files:
    lib/droonga/dispatcher.rb
    lib/droonga/handler_plugin.rb
    lib/droonga/plugin/handler/add.rb
  Renamed files:
    lib/droonga/message_processing_error.rb
      (from lib/droonga/responsible_error.rb)

  Modified: lib/droonga/dispatcher.rb (+3 -6)
===================================================================
--- lib/droonga/dispatcher.rb    2013-12-26 14:55:28 +0900 (0131e9c)
+++ lib/droonga/dispatcher.rb    2013-12-26 15:10:00 +0900 (98167f5)
@@ -26,16 +26,13 @@ require "droonga/collector"
 require "droonga/farm"
 require "droonga/session"
 require "droonga/replier"
-require "droonga/responsible_error"
+require "droonga/message_processing_error"
 
 module Droonga
   class Dispatcher
     attr_reader :name
 
-    class InvalidRequest < ResponsibleClientError
-    end
-
-    class MissingDataset < InvalidRequest
+    class MissingDataset < BadRequest
       def initialize
         super("\"dataset\" must be specified.")
       end
@@ -86,7 +83,7 @@ module Droonga
         begin
           assert_valid_message
           process_input_message(message)
-        rescue ResponsibleError => error
+        rescue MessageProcessingError => error
           response = @output_adapter.adapt(@message.merge("statusCode" => error.status_code,
                                                           "body" => error.response_body))
           @replier.reply(response)

  Modified: lib/droonga/handler_plugin.rb (+2 -2)
===================================================================
--- lib/droonga/handler_plugin.rb    2013-12-26 14:55:28 +0900 (c3861fe)
+++ lib/droonga/handler_plugin.rb    2013-12-26 15:10:00 +0900 (5eae2c7)
@@ -16,7 +16,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 require "droonga/plugin"
-require "droonga/responsible_error"
+require "droonga/message_processing_error"
 
 module Droonga
   class HandlerPlugin < Plugin
@@ -36,7 +36,7 @@ module Droonga
     def run_command(command, message, messenger)
       begin
         super
-      rescue ResponsibleError => error
+      rescue MessageProcessingError => error
         messenger.error(error.status_code, error.response_body)
       end
     end

  Renamed: lib/droonga/message_processing_error.rb (+2 -2) 92%
===================================================================
--- lib/droonga/responsible_error.rb    2013-12-26 14:55:28 +0900 (7fa5665)
+++ lib/droonga/message_processing_error.rb    2013-12-26 15:10:00 +0900 (748b1a7)
@@ -14,7 +14,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 module Droonga
-  class ResponsibleError < StandardError
+  class MessageProcessingError < StandardError
     attr_reader :message, :detail
  
     def initialize(message, detail=nil)
@@ -40,7 +40,7 @@ module Droonga
     end
   end
 
-  class ResponsibleClientError < ResponsibleError
+  class BadRequest < MessageProcessingError
     def status_code
       400
     end

  Modified: lib/droonga/plugin/handler/add.rb (+4 -7)
===================================================================
--- lib/droonga/plugin/handler/add.rb    2013-12-26 14:55:28 +0900 (ab94ca0)
+++ lib/droonga/plugin/handler/add.rb    2013-12-26 15:10:00 +0900 (78fcd82)
@@ -18,29 +18,26 @@
 require "groonga"
 
 require "droonga/handler_plugin"
-require "droonga/responsible_error"
+require "droonga/message_processing_error"
 
 module Droonga
   class AddHandler < Droonga::HandlerPlugin
     repository.register("add", self)
 
-    class InvalidRequest < ResponsibleClientError
-    end
-
-    class MissingTable < InvalidRequest
+    class MissingTable < BadRequest
       def initialize
         super("\"table\" must be specified.")
       end
     end
 
-    class MissingPrimaryKey < InvalidRequest
+    class MissingPrimaryKey < BadRequest
       def initialize(table_name)
         super("\"key\" must be specified. " +
                 "The table #{table_name.inspect} requires a primary key for a new record.")
       end
     end
 
-    class UnknownTable < InvalidRequest
+    class UnknownTable < BadRequest
       def initialize(table_name)
         super("The table #{table_name.inspect} does not exist in the dataset.")
       end
-------------- next part --------------
HTML����������������������������...
Descargar 



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