[Groonga-commit] droonga/droonga.org at 7158c58 [gh-pages] Follow to changes of 1.0.0

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Feb 20 18:59:14 JST 2014


YUKI Hiroshi	2014-02-20 18:59:14 +0900 (Thu, 20 Feb 2014)

  New Revision: 7158c5856502783aabbd9daf633c4b2e82a7eb6c
  https://github.com/droonga/droonga.org/commit/7158c5856502783aabbd9daf633c4b2e82a7eb6c

  Message:
    Follow to changes of 1.0.0

  Modified files:
    _po/ja/reference/plugin/adapter/index.po
    ja/reference/plugin/adapter/index.md
    reference/plugin/adapter/index.md

  Modified: _po/ja/reference/plugin/adapter/index.po (+17 -11)
===================================================================
--- _po/ja/reference/plugin/adapter/index.po    2014-02-20 18:45:20 +0900 (37b4b3d)
+++ _po/ja/reference/plugin/adapter/index.po    2014-02-20 18:59:14 +0900 (1969625)
@@ -151,13 +151,13 @@ msgid "## Configurations {#config}"
 msgstr ""
 
 msgid ""
-"`input_message.pattern` (optional, default=`nil`)\n"
+"`input_message.pattern` ([matching pattern][], optional, default=`nil`)\n"
 ": A [matching pattern][] for incoming messages.\n"
 "  If no pattern (`nil`) is given, any message is regarded as \"matched\"."
 msgstr ""
 
 msgid ""
-"`output_message.pattern` (optional, default=`nil`)\n"
+"`output_message.pattern` ([matching pattern][], optional, default=`nil`)\n"
 ": A [matching pattern][] for outgoing messages.\n"
 "  If no pattern (`nil`) is given, any message is regarded as \"matched\"."
 msgstr ""
@@ -236,7 +236,7 @@ msgstr ""
 msgid "### `Droonga::InputMessage` {#classes-Droonga-InputMessage}"
 msgstr ""
 
-msgid "#### `#command`, `#command=(command)` {#classes-Droonga-InputMessage-command}"
+msgid "#### `#type`, `#type=(type)` {#classes-Droonga-InputMessage-type}"
 msgstr ""
 
 msgid "This returns the `\"type\"` of the incoming message."
@@ -254,19 +254,19 @@ msgstr ""
 
 msgid ""
 "    def adapt_input(input_message)\n"
-"      p input_message.command\n"
+"      p input_message.type\n"
 "      # => \"my-search\"\n"
 "      #    This message will be handled by a plugin\n"
-"      #    for the custom \"my-search\" command."
+"      #    for the custom \"my-search\" type."
 msgstr ""
 
-msgid "      input_message.command = \"search\""
+msgid "      input_message.type = \"search\""
 msgstr ""
 
 msgid ""
-"      p input_message.command\n"
+"      p input_message.type\n"
 "      # => \"search\"\n"
-"      #    The messge type (command) is changed.\n"
+"      #    The messge type (type) is changed.\n"
 "      #    This message will be handled by the \"search\" plugin,\n"
 "      #    as a regular search request.\n"
 "    end\n"
@@ -275,6 +275,12 @@ msgid ""
 "~~~"
 msgstr ""
 
+msgid ""
+"Note: On Droonga 0.9.9, this method is named as `command` but changed to `type"
+"` on Droonga 1.0.0, like above. If you write plugins for Droonga 0.9.9, you ha"
+"ve to migrate it."
+msgstr ""
+
 msgid "#### `#body`, `#body=(body)` {#classes-Droonga-InputMessage-body}"
 msgstr ""
 
@@ -314,13 +320,13 @@ msgstr ""
 
 msgid ""
 "    def adapt_input(input_message)\n"
-"      # Extract the query string from the custom command.\n"
+"      # Extract the query string from the custom type message.\n"
 "      query_string = input_message[\"body\"][\"query\"]"
 msgstr ""
 
 msgid ""
-"      # Construct internal search request for the \"search\" command.\n"
-"      input_message.command = \"search\"\n"
+"      # Construct internal search request for the \"search\" type.\n"
+"      input_message.type = \"search\"\n"
 "      input_message.body = {\n"
 "        \"queries\" => {\n"
 "          \"source\"    => \"Store\",\n"

  Modified: ja/reference/plugin/adapter/index.md (+13 -11)
===================================================================
--- ja/reference/plugin/adapter/index.md    2014-02-20 18:45:20 +0900 (9883ed0)
+++ ja/reference/plugin/adapter/index.md    2014-02-20 18:59:14 +0900 (9fb7be3)
@@ -89,11 +89,11 @@ Any error raised from the adapter is handled by the Droonga Engine itself. See a
 
 ## Configurations {#config}
 
-`input_message.pattern` (optional, default=`nil`)
+`input_message.pattern` ([matching pattern][], optional, default=`nil`)
 : A [matching pattern][] for incoming messages.
   If no pattern (`nil`) is given, any message is regarded as "matched".
 
-`output_message.pattern` (optional, default=`nil`)
+`output_message.pattern` ([matching pattern][], optional, default=`nil`)
 : A [matching pattern][] for outgoing messages.
   If no pattern (`nil`) is given, any message is regarded as "matched".
 
@@ -143,7 +143,7 @@ end
 
 ### `Droonga::InputMessage` {#classes-Droonga-InputMessage}
 
-#### `#command`, `#command=(command)` {#classes-Droonga-InputMessage-command}
+#### `#type`, `#type=(type)` {#classes-Droonga-InputMessage-type}
 
 This returns the `"type"` of the incoming message.
 
@@ -155,16 +155,16 @@ module Droonga::Plugins::MySearch
     input_message.pattern = ["type", :equal, "my-search"]
 
     def adapt_input(input_message)
-      p input_message.command
+      p input_message.type
       # => "my-search"
       #    This message will be handled by a plugin
-      #    for the custom "my-search" command.
+      #    for the custom "my-search" type.
 
-      input_message.command = "search"
+      input_message.type = "search"
 
-      p input_message.command
+      p input_message.type
       # => "search"
-      #    The messge type (command) is changed.
+      #    The messge type (type) is changed.
       #    This message will be handled by the "search" plugin,
       #    as a regular search request.
     end
@@ -172,6 +172,8 @@ module Droonga::Plugins::MySearch
 end
 ~~~
 
+Note: On Droonga 0.9.9, this method is named as `command` but changed to `type` on Droonga 1.0.0, like above. If you write plugins for Droonga 0.9.9, you have to migrate it.
+
 #### `#body`, `#body=(body)` {#classes-Droonga-InputMessage-body}
 
 This returns the `"body"` of the incoming message.
@@ -205,11 +207,11 @@ module Droonga::Plugins::MySearch
     input_message.pattern = ["type", :equal, "my-search"]
 
     def adapt_input(input_message)
-      # Extract the query string from the custom command.
+      # Extract the query string from the custom type message.
       query_string = input_message["body"]["query"]
 
-      # Construct internal search request for the "search" command.
-      input_message.command = "search"
+      # Construct internal search request for the "search" type.
+      input_message.type = "search"
       input_message.body = {
         "queries" => {
           "source"    => "Store",

  Modified: reference/plugin/adapter/index.md (+13 -11)
===================================================================
--- reference/plugin/adapter/index.md    2014-02-20 18:45:20 +0900 (6114580)
+++ reference/plugin/adapter/index.md    2014-02-20 18:59:14 +0900 (9bdfd8d)
@@ -80,11 +80,11 @@ Any error raised from the adapter is handled by the Droonga Engine itself. See a
 
 ## Configurations {#config}
 
-`input_message.pattern` (optional, default=`nil`)
+`input_message.pattern` ([matching pattern][], optional, default=`nil`)
 : A [matching pattern][] for incoming messages.
   If no pattern (`nil`) is given, any message is regarded as "matched".
 
-`output_message.pattern` (optional, default=`nil`)
+`output_message.pattern` ([matching pattern][], optional, default=`nil`)
 : A [matching pattern][] for outgoing messages.
   If no pattern (`nil`) is given, any message is regarded as "matched".
 
@@ -134,7 +134,7 @@ end
 
 ### `Droonga::InputMessage` {#classes-Droonga-InputMessage}
 
-#### `#command`, `#command=(command)` {#classes-Droonga-InputMessage-command}
+#### `#type`, `#type=(type)` {#classes-Droonga-InputMessage-type}
 
 This returns the `"type"` of the incoming message.
 
@@ -146,16 +146,16 @@ module Droonga::Plugins::MySearch
     input_message.pattern = ["type", :equal, "my-search"]
 
     def adapt_input(input_message)
-      p input_message.command
+      p input_message.type
       # => "my-search"
       #    This message will be handled by a plugin
-      #    for the custom "my-search" command.
+      #    for the custom "my-search" type.
 
-      input_message.command = "search"
+      input_message.type = "search"
 
-      p input_message.command
+      p input_message.type
       # => "search"
-      #    The messge type (command) is changed.
+      #    The messge type (type) is changed.
       #    This message will be handled by the "search" plugin,
       #    as a regular search request.
     end
@@ -163,6 +163,8 @@ module Droonga::Plugins::MySearch
 end
 ~~~
 
+Note: On Droonga 0.9.9, this method is named as `command` but changed to `type` on Droonga 1.0.0, like above. If you write plugins for Droonga 0.9.9, you have to migrate it.
+
 #### `#body`, `#body=(body)` {#classes-Droonga-InputMessage-body}
 
 This returns the `"body"` of the incoming message.
@@ -196,11 +198,11 @@ module Droonga::Plugins::MySearch
     input_message.pattern = ["type", :equal, "my-search"]
 
     def adapt_input(input_message)
-      # Extract the query string from the custom command.
+      # Extract the query string from the custom type message.
       query_string = input_message["body"]["query"]
 
-      # Construct internal search request for the "search" command.
-      input_message.command = "search"
+      # Construct internal search request for the "search" type.
+      input_message.type = "search"
       input_message.body = {
         "queries" => {
           "source"    => "Store",
-------------- next part --------------
HTML����������������������������...
Download 



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