null+****@clear*****
null+****@clear*****
Mon Jun 18 11:34:48 JST 2012
SUZUKI Miho 2012-06-18 11:34:48 +0900 (Mon, 18 Jun 2012) New Revision: 80eae96534bcb3cc692f0da92a0de808801424cb https://github.com/logaling/logaling-command/commit/80eae96534bcb3cc692f0da92a0de808801424cb Log: Add GlossarySource#mtime Modified files: lib/logaling/glossary.rb lib/logaling/glossary_source.rb Modified: lib/logaling/glossary.rb (+1 -2) =================================================================== --- lib/logaling/glossary.rb 2012-06-18 11:28:16 +0900 (03ac1ba) +++ lib/logaling/glossary.rb 2012-06-18 11:34:48 +0900 (a32e20b) @@ -80,8 +80,7 @@ module Logaling Logaling::GlossaryDB.open(@project.glossary_db_path, "utf8") do |db| db.recreate_table glossary_sources.each do |glossary_source| - indexed_at = File.mtime(glossary_source.source_path) - unless db.glossary_source_exist?(glossary_source.source_path, indexed_at) + unless db.glossary_source_exist?(glossary_source.source_path, glossary_source.mtime) puts "now index #{@name}..." db.index_glossary_source(glossary_source) end Modified: lib/logaling/glossary_source.rb (+4 -0) =================================================================== --- lib/logaling/glossary_source.rb 2012-06-18 11:28:16 +0900 (4d9b88a) +++ lib/logaling/glossary_source.rb 2012-06-18 11:34:48 +0900 (a4723eb) @@ -124,6 +124,10 @@ module Logaling end end + def mtime + File.mtime(@source_path) + end + private def build_term(source_term, target_term, note) note ||= '' -------------- next part -------------- An HTML attachment was scrubbed... 下载