SHIMADA Koji
null+****@clear*****
Wed Nov 21 14:31:34 JST 2012
SHIMADA Koji 2012-11-21 14:31:34 +0900 (Wed, 21 Nov 2012) New Revision: 5ef40dd09da075547e83d1c1c7d62b9c8ee80247 https://github.com/logaling/logaling-command/commit/5ef40dd09da075547e83d1c1c7d62b9c8ee80247 Log: Use Project#relative_path Modified files: lib/logaling/glossary.rb lib/logaling/project.rb Modified: lib/logaling/glossary.rb (+3 -2) =================================================================== --- lib/logaling/glossary.rb 2012-11-21 14:18:18 +0900 (f92a11a) +++ lib/logaling/glossary.rb 2012-11-21 14:31:34 +0900 (1958350) @@ -136,8 +136,9 @@ module Logaling file_name = [self.to_s, type].join('.') File.join(@project.glossary_source_path, file_name) end - Dir.glob(glob_condition).map do |source_path_full| - source_path =****@proje*****_relative_path(source_path_full) + Dir.glob(glob_condition).map do |source_path| + file_name = File.basename(source_path) + source_path =****@proje*****_path(file_name) GlossarySource.create(source_path, self) end end Modified: lib/logaling/project.rb (+1 -0) =================================================================== --- lib/logaling/project.rb 2012-11-21 14:18:18 +0900 (264430b) +++ lib/logaling/project.rb 2012-11-21 14:31:34 +0900 (faae344) @@ -63,6 +63,7 @@ module Logaling end alias_method :source_directory_path, :glossary_source_path + # relative_path_from_logaling_home みたいな名前でGlossarySourceにある方が良いかも... def relative_path(glossary_source_file_name) source_path = File.join(source_directory_path, glossary_source_file_name) @repository.make_relative_path(source_path) -------------- next part -------------- An HTML attachment was scrubbed... Télécharger