[groonga-commit:2852] ranguba/ranguba [scoring] rename SearchParam to SearchRequest

null+ranguba at clear-code.com null+ranguba at clear-code.com
Tue Dec 21 12:16:52 EST 2010


SHIMODA Hiroshi	2010-10-29 02:57:57 +0000 (Fri, 29 Oct 2010)

  New Revision: b732e0206928195dc6beb9b99bddb47817927881

  Log:
    rename SearchParam to SearchRequest

  Renamed files:
    app/models/search_request.rb
      (from app/models/search_param.rb)
    test/unit/search_request_test.rb
      (from test/unit/search_param_test.rb)

  Renamed: app/models/search_request.rb (+1 -1) 98%
===================================================================
--- app/models/search_param.rb    2010-10-28 11:01:25 +0000 (1d2ea5b)
+++ app/models/search_request.rb    2010-10-29 02:57:57 +0000 (e0566e0)
@@ -1,4 +1,4 @@
-class SearchParam
+class SearchRequest
   include ActiveModel::Validations
   include ActiveModel::Conversion
   extend ActiveModel::Naming

  Renamed: test/unit/search_request_test.rb (+8 -8) 92%
===================================================================
--- test/unit/search_param_test.rb    2010-10-28 11:01:25 +0000 (970b15f)
+++ test/unit/search_request_test.rb    2010-10-29 02:57:57 +0000 (f916874)
@@ -2,10 +2,10 @@
 
 require 'test_helper'
 
-class SearchParamTest < ActiveSupport::TestCase
+class SearchRequestTest < ActiveSupport::TestCase
 
   def setup
-    @param = SearchParam.new
+    @param = SearchRequest.new
   end
 
   def test_new
@@ -17,26 +17,26 @@ class SearchParamTest < ActiveSupport::TestCase
   end
 
   def test_new_with_params
-    @param = SearchParam.new({})
+    @param = SearchRequest.new({})
     assert_valid
     
-    @param = SearchParam.new(:query => "string")
+    @param = SearchRequest.new(:query => "string")
     assert_valid(:to_s => "query/string",
                  :query => "string")
 
-    @param = SearchParam.new(:query => "string",
+    @param = SearchRequest.new(:query => "string",
                              :category => "cat")
     assert_valid(:to_s => "query/string/category/cat",
                  :query => "string",
                  :category => "cat")
 
-    @param = SearchParam.new(:query => "string",
+    @param = SearchRequest.new(:query => "string",
                              :type => "html")
     assert_valid(:to_s => "query/string/type/html",
                  :query => "string",
                  :type => "html")
 
-    @param = SearchParam.new(:query => "string",
+    @param = SearchRequest.new(:query => "string",
                              :category => "cat",
                              :type => "html")
     assert_valid(:to_s => "query/string/category/cat/type/html",
@@ -117,7 +117,7 @@ class SearchParamTest < ActiveSupport::TestCase
   end
 
   def test_clear
-    @param = SearchParam.new
+    @param = SearchRequest.new
     @param.parse("unknown/value")
     assert_invalid(:to_s => "unknown/value")
 



More information about the groonga-commit mailing list