[logaling-commit] logaling/logaling-command [change-glossarysourcepath-fullpath-to-relativepath] Rename Repository#make_full_path to Repository#expand_path

Back to archive index

SHIMADA Koji null+****@clear*****
Wed Nov 21 13:49:52 JST 2012


SHIMADA Koji	2012-11-21 13:49:52 +0900 (Wed, 21 Nov 2012)

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

  Log:
    Rename Repository#make_full_path to Repository#expand_path

  Modified files:
    lib/logaling/command/application.rb
    lib/logaling/glossary_sources/base.rb
    lib/logaling/project.rb
    lib/logaling/repository.rb

  Modified: lib/logaling/command/application.rb (+1 -1)
===================================================================
--- lib/logaling/command/application.rb    2012-11-21 11:52:25 +0900 (e8a28b8)
+++ lib/logaling/command/application.rb    2012-11-21 13:49:52 +0900 (46f6ddb)
@@ -90,7 +90,7 @@ module Logaling::Command
       else
         raise Logaling::CommandFailed, "[TARGET-LANGUAGE] is required when you use '--personal'" unless target_language
         personal_project =****@repos*****_personal_project(project_name, source_language, target_language)
-        say "Successfully created #{@repository.make_full_path(personal_project.path)}"
+        say "Successfully created #{@repository.expand_path(personal_project.path)}"
       end
     rescue Logaling::CommandFailed => e
       say e.message

  Modified: lib/logaling/glossary_sources/base.rb (+1 -1)
===================================================================
--- lib/logaling/glossary_sources/base.rb    2012-11-21 11:52:25 +0900 (38801b2)
+++ lib/logaling/glossary_sources/base.rb    2012-11-21 13:49:52 +0900 (df86d50)
@@ -39,7 +39,7 @@ module Logaling
       end
 
       def source_path_full
-        @glossary.project.repository.make_full_path(@source_path)
+        @glossary.project.repository.expand_path(@source_path)
       end
     end
   end

  Modified: lib/logaling/project.rb (+4 -4)
===================================================================
--- lib/logaling/project.rb    2012-11-21 11:52:25 +0900 (99aa8d4)
+++ lib/logaling/project.rb    2012-11-21 13:49:52 +0900 (74ab220)
@@ -58,7 +58,7 @@ module Logaling
     end
 
     def glossary_source_path
-      basepath =****@repos*****_full_path(@path)
+      basepath =****@repos*****_path(@path)
       File.join(basepath, "glossary")
     end
 
@@ -123,7 +123,7 @@ module Logaling
     end
 
     def glossary_source_path
-      @repository.make_full_path(@path)
+      @repository.expand_path(@path)
     end
 
     def imported?
@@ -154,7 +154,7 @@ module Logaling
         project_name = [glossary_name, source_language, target_language, 'yml'].join('.')
         project_path = File.join(relative_root_path, project_name)
         project = PersonalProject.new(project_path, repository)
-        FileUtils.rm_rf(repository.make_full_path(project_path), :secure => true)
+        FileUtils.rm_rf(repository.expand_path(project_path), :secure => true)
         project
       end
     end
@@ -169,7 +169,7 @@ module Logaling
     end
 
     def glossary_source_path
-      @repository.make_full_path(@path)
+      @repository.expand_path(@path)
     end
 
     def initialize_glossary(source_language, target_language)

  Modified: lib/logaling/repository.rb (+2 -2)
===================================================================
--- lib/logaling/repository.rb    2012-11-21 11:52:25 +0900 (bf02ff5)
+++ lib/logaling/repository.rb    2012-11-21 13:49:52 +0900 (d695f43)
@@ -43,7 +43,7 @@ module Logaling
 
     def unregister(project)
       raise Logaling::ProjectNotFound unless project
-      FileUtils.rm_rf(make_full_path(project.path), :secure => true)
+      FileUtils.rm_rf(expand_path(project.path), :secure => true)
       index
     end
 
@@ -168,7 +168,7 @@ module Logaling
       File.join(@logaling_home, "db")
     end
 
-    def make_full_path(relative_path)
+    def expand_path(relative_path)
       File.expand_path(File.join(@logaling_home, relative_path))
     end
 
-------------- next part --------------
An HTML attachment was scrubbed...
Descargar 



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