[Groonga-commit] droonga/droonga.org at 32fba15 [gh-pages] Rename "Ad" to "Sponsored"

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Thu Feb 20 11:20:48 JST 2014


YUKI Hiroshi	2014-02-20 11:20:48 +0900 (Thu, 20 Feb 2014)

  New Revision: 32fba15f018f81ecb76fda11ee3d01777204b71c
  https://github.com/droonga/droonga.org/commit/32fba15f018f81ecb76fda11ee3d01777204b71c

  Message:
    Rename "Ad" to "Sponsored"

  Modified files:
    reference/plugin/adapter/index.md

  Modified: reference/plugin/adapter/index.md (+6 -6)
===================================================================
--- reference/plugin/adapter/index.md    2014-02-20 11:18:41 +0900 (060f066)
+++ reference/plugin/adapter/index.md    2014-02-20 11:20:48 +0900 (4e6c75b)
@@ -234,7 +234,7 @@ module Droonga::Plugins::ErrorConcealer
 
     def adapt_output(output_message)
       unless output_message.status_code == StatusCode::InternalServerError
-        output_message.status_code = StatusCode::OK
+        output_message.status_code = Droonga::StatusCode::OK
         output_message.body = {}
         output_message.errors = nil
         # Now any internal server error is ignored and clients
@@ -281,21 +281,21 @@ This returns the `"body"` of the outgoing message.
 You can override it by assigning a new value, partially or fully. For example:
 
 ~~~ruby
-module Droonga::Plugins::AdInserter
+module Droonga::Plugins::SponsoredSearch
   class Adapter < Droonga::Adapter
     input_message.pattern = ["type", :equal, "search"]
 
     def adapt_output(output_message)
       output_message.body.each do |name, result|
         next unless result["records"]
-        result["records"].unshift(ad_entry)
+        result["records"].unshift(sponsored_entry)
       end
-      # Now all search results include advertising.
+      # Now all search results include sponsored entry.
     end
 
-    def ad_entry
+    def sponsored_entry
       {
-        "title"=> "Buy Now!!",
+        "title"=> "SALE!",
         "url"=>   "http://..."
       }
     end
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る