[logaling-commit] logaling/logaling-command [refactor-structure] Remove glossary argument from GlossaryDB#glossary_index

Back to archive index

null+****@clear***** null+****@clear*****
Wed Jun 13 15:39:09 JST 2012


SUZUKI Miho	2012-06-13 15:39:09 +0900 (Wed, 13 Jun 2012)

  New Revision: dcd62e8d559eeb1677a055f2f45b1436c361944d

  Log:
    Remove glossary argument from GlossaryDB#glossary_index

  Modified files:
    lib/logaling/glossary.rb
    lib/logaling/glossary_db.rb
    lib/logaling/repository.rb

  Modified: lib/logaling/glossary.rb (+1 -1)
===================================================================
--- lib/logaling/glossary.rb    2012-06-11 18:38:22 +0900 (296f306)
+++ lib/logaling/glossary.rb    2012-06-13 15:39:09 +0900 (000b6c4)
@@ -45,7 +45,7 @@ module Logaling
           indexed_at = File.mtime(glossary_source)
           unless db.glossary_source_exist?(glossary_source, indexed_at)
             puts "now index #{@name}..."
-            db.index_glossary(GlossarySource.load(glossary_source), @name, glossary_source, @source_language, @target_language, indexed_at)
+            db.index_glossary(@name, glossary_source, @source_language, @target_language, indexed_at)
           end
         end
         glossary_string = [@name, @source_language, @target_language].join('.')

  Modified: lib/logaling/glossary_db.rb (+2 -2)
===================================================================
--- lib/logaling/glossary_db.rb    2012-06-11 18:38:22 +0900 (4fa3953)
+++ lib/logaling/glossary_db.rb    2012-06-13 15:39:09 +0900 (63c7e52)
@@ -67,14 +67,14 @@ module Logaling
       delete_glossary_source(glossary_source)
     end
 
-    def index_glossary(glossary, glossary_name, glossary_source, source_language, target_language, indexed_at)
+    def index_glossary(glossary_name, glossary_source, source_language, target_language, indexed_at)
       delete_terms if offline_index?
 
       deindex_glossary(glossary_name, glossary_source)
 
       add_glossary_source(glossary_source, indexed_at)
       add_glossary(glossary_name)
-      glossary.each do |term|
+      GlossarySource.load(glossary_source).each do |term|
         source_term = term['source_term']
         target_term = term['target_term']
         note = term['note']

  Modified: lib/logaling/repository.rb (+1 -1)
===================================================================
--- lib/logaling/repository.rb    2012-06-11 18:38:22 +0900 (3b86fdc)
+++ lib/logaling/repository.rb    2012-06-13 15:39:09 +0900 (9ff9816)
@@ -98,7 +98,7 @@ module Logaling
           unless db.glossary_source_exist?(glossary_source, indexed_at)
             glossary_name, source_language, target_language = get_glossary(glossary_source)
             puts "now index #{glossary_name}..."
-            db.index_glossary(GlossarySource.load(glossary_source), glossary_name, glossary_source, source_language, target_language, indexed_at)
+            db.index_glossary(glossary_name, glossary_source, source_language, target_language, indexed_at)
           end
         end
         (db.get_all_glossary_source - all_glossaries).each do |glossary_source|




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