[logaling-commit] logaling/logaling-command [master] Remove indexed_at argument from GlossaryDB#index_glossary

Back to archive index

null+****@clear***** null+****@clear*****
Wed Jun 13 15:43:46 JST 2012


SUZUKI Miho	2012-06-13 15:43:46 +0900 (Wed, 13 Jun 2012)

  New Revision: f21d2811e798130658258110080deeeec7069fd1
  https://github.com/logaling/logaling-command/commit/f21d2811e798130658258110080deeeec7069fd1

  Merged 7228757: Merge pull request #60 from logaling/refactor-structure

  Log:
    Remove indexed_at argument from GlossaryDB#index_glossary

  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-13 15:39:09 +0900 (000b6c4)
+++ lib/logaling/glossary.rb    2012-06-13 15:43:46 +0900 (dd3dd77)
@@ -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(@name, glossary_source, @source_language, @target_language, indexed_at)
+            db.index_glossary(@name, glossary_source, @source_language, @target_language)
           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-13 15:39:09 +0900 (63c7e52)
+++ lib/logaling/glossary_db.rb    2012-06-13 15:43:46 +0900 (7a0b14d)
@@ -67,12 +67,12 @@ module Logaling
       delete_glossary_source(glossary_source)
     end
 
-    def index_glossary(glossary_name, glossary_source, source_language, target_language, indexed_at)
+    def index_glossary(glossary_name, glossary_source, source_language, target_language)
       delete_terms if offline_index?
 
       deindex_glossary(glossary_name, glossary_source)
 
-      add_glossary_source(glossary_source, indexed_at)
+      add_glossary_source(glossary_source, File.mtime(glossary_source))
       add_glossary(glossary_name)
       GlossarySource.load(glossary_source).each do |term|
         source_term = term['source_term']

  Modified: lib/logaling/repository.rb (+1 -1)
===================================================================
--- lib/logaling/repository.rb    2012-06-13 15:39:09 +0900 (9ff9816)
+++ lib/logaling/repository.rb    2012-06-13 15:43:46 +0900 (6d69108)
@@ -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(glossary_name, glossary_source, source_language, target_language, indexed_at)
+            db.index_glossary(glossary_name, glossary_source, source_language, target_language)
           end
         end
         (db.get_all_glossary_source - all_glossaries).each do |glossary_source|
-------------- next part --------------
An HTML attachment was scrubbed...
다운로드 



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