[Groonga-commit] ranguba/groonga-client-model at 4c8e978 [master] Redundant needless report

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Mar 3 09:22:38 JST 2017


Kouhei Sutou	2017-03-03 09:22:38 +0900 (Fri, 03 Mar 2017)

  New Revision: 4c8e9787770ce7eea22b5a772cb4637e8f375db3
  https://github.com/ranguba/groonga-client-model/commit/4c8e9787770ce7eea22b5a772cb4637e8f375db3

  Message:
    Redundant needless report

  Modified files:
    lib/groonga_client_model/migration.rb
    test/unit/test_migration.rb

  Modified: lib/groonga_client_model/migration.rb (+3 -1)
===================================================================
--- lib/groonga_client_model/migration.rb    2017-03-03 09:19:43 +0900 (a008256)
+++ lib/groonga_client_model/migration.rb    2017-03-03 09:22:38 +0900 (8d9355c)
@@ -59,7 +59,9 @@ module GroongaClientModel
         key_type ||= "ShortText"
       end
       key_type = normalize_type(key_type)
-      report(__method__, [name, type: type, key_type: key_type]) do
+      options = {type: type}
+      options[:key_type] = key_type if key_type
+      report(__method__, [name, options]) do
         @client.request(:table_create).
           parameter(:name, name).
           flags_parameter(:flags, [type]).

  Modified: test/unit/test_migration.rb (+4 -4)
===================================================================
--- test/unit/test_migration.rb    2017-03-03 09:19:43 +0900 (2ff37e8)
+++ test/unit/test_migration.rb    2017-03-03 09:22:38 +0900 (b0df361)
@@ -68,7 +68,7 @@ class TestMigration < Test::Unit::TestCase
   sub_test_case("#create_table") do
     test("default") do
       expected_up_report = <<-REPORT
--- create_table(:posts, {:type=>"TABLE_NO_KEY", :key_type=>nil})
+-- create_table(:posts, {:type=>"TABLE_NO_KEY"})
    -> 0.0s
       REPORT
       expected_down_report = <<-REPORT
@@ -114,7 +114,7 @@ table_create terms TABLE_PAT_KEY ShortText
       sub_test_case("#short_text") do
         test("default") do
           expected_up_report = <<-REPORT
--- create_table(:posts, {:type=>"TABLE_NO_KEY", :key_type=>nil})
+-- create_table(:posts, {:type=>"TABLE_NO_KEY"})
    -> 0.0s
 -- add_column(:posts, :title, {:flags=>["COLUMN_SCALAR"], :value_type=>"ShortText"})
    -> 0.0s
@@ -142,7 +142,7 @@ column_create posts title COLUMN_SCALAR ShortText
       sub_test_case("#text") do
         test("default") do
           expected_up_report = <<-REPORT
--- create_table(:posts, {:type=>"TABLE_NO_KEY", :key_type=>nil})
+-- create_table(:posts, {:type=>"TABLE_NO_KEY"})
    -> 0.0s
 -- add_column(:posts, :content, {:flags=>["COLUMN_SCALAR"], :value_type=>"Text"})
    -> 0.0s
@@ -170,7 +170,7 @@ column_create posts content COLUMN_SCALAR Text
       sub_test_case("#long_text") do
         test("default") do
           expected_up_report = <<-REPORT
--- create_table(:posts, {:type=>"TABLE_NO_KEY", :key_type=>nil})
+-- create_table(:posts, {:type=>"TABLE_NO_KEY"})
    -> 0.0s
 -- add_column(:posts, :content, {:flags=>["COLUMN_SCALAR"], :value_type=>"LongText"})
    -> 0.0s
-------------- next part --------------
HTML����������������������������...
Download 



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