[Groonga-commit] droonga/grn2drn at 8d277c6 [master] Use more meaningful name

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Feb 9 10:43:31 JST 2014


Kouhei Sutou	2014-02-09 10:43:31 +0900 (Sun, 09 Feb 2014)

  New Revision: 8d277c6c35044b634c742f25f635dee06d1933e3
  https://github.com/droonga/grn2drn/commit/8d277c6c35044b634c742f25f635dee06d1933e3

  Message:
    Use more meaningful name
    
    base_id ->
    id_prefix

  Modified files:
    lib/grn2drn/converter.rb
    test/test-converter.rb

  Modified: lib/grn2drn/converter.rb (+3 -3)
===================================================================
--- lib/grn2drn/converter.rb    2014-02-09 10:42:21 +0900 (16b179b)
+++ lib/grn2drn/converter.rb    2014-02-09 10:43:31 +0900 (65cb9bf)
@@ -70,11 +70,11 @@ module Grn2Drn
 
     private
     def create_message(type, body)
-      base_id = @options[:base_id]
-      if base_id.nil?
+      id_prefix = @options[:id_prefix]
+      if id_prefix.nil?
         id = new_unique_id
       else
-        id = "#{base_id}:#{@count}"
+        id = "#{id_prefix}:#{@count}"
         @count += 1
       end
 

  Modified: test/test-converter.rb (+1 -1)
===================================================================
--- test/test-converter.rb    2014-02-09 10:42:21 +0900 (265ea0d)
+++ test/test-converter.rb    2014-02-09 10:43:31 +0900 (4f69f6f)
@@ -19,7 +19,7 @@ class ConverterTest < Test::Unit::TestCase
   private
   def converter
     options = {
-      :base_id => "test",
+      :id_prefix => "test",
       :date => date,
       :reply_to => reply_to,
       :dataset => dataset,
-------------- next part --------------
HTML����������������������������...
Download 



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