[logaling-commit] logaling/logaling-command [master] Extract variable and method name

Back to archive index

SUZUKI Miho null+****@clear*****
Mon Aug 13 13:01:03 JST 2012


SUZUKI Miho	2012-08-13 13:01:03 +0900 (Mon, 13 Aug 2012)

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

  Merged 3c178f5: Merge pull request #74 from logaling/loga-new-no-project

  Log:
    Extract variable and method name

  Modified files:
    lib/logaling/command/application.rb
    lib/logaling/repository.rb

  Modified: lib/logaling/command/application.rb (+2 -2)
===================================================================
--- lib/logaling/command/application.rb    2012-08-13 12:53:05 +0900 (b88d8d3)
+++ lib/logaling/command/application.rb    2012-08-13 13:01:03 +0900 (3dc4ed6)
@@ -86,8 +86,8 @@ module Logaling::Command
         end
       else
         raise Logaling::CommandFailed, "[TARGET-LANGUAGE] is required when you use '--personal'" unless target_language
-        personal_glossary =****@repos*****_personal_glossary(project_name, source_language, target_language)
-        say "Successfully created #{personal_glossary.path}"
+        personal_project =****@repos*****_personal_project(project_name, source_language, target_language)
+        say "Successfully created #{personal_project.path}"
       end
     rescue Logaling::CommandFailed => e
       say e.message

  Modified: lib/logaling/repository.rb (+6 -6)
===================================================================
--- lib/logaling/repository.rb    2012-08-13 12:53:05 +0900 (0fa4673)
+++ lib/logaling/repository.rb    2012-08-13 13:01:03 +0900 (1bd3068)
@@ -44,11 +44,11 @@ module Logaling
       FileUtils.rm_rf(project.path, :secure => true)
     end
 
-    def create_personal_glossary(glossary_name, source_language, target_language)
-      if glossary_exists?(glossary_name, source_language, target_language)
-        raise Logaling::GlossaryAlreadyRegistered, "The glossary '#{glossary_name}' already exists."
+    def create_personal_project(project_name, source_language, target_language)
+      if glossary_exists?(project_name, source_language, target_language)
+        raise Logaling::GlossaryAlreadyRegistered, "The glossary '#{project_name}' already exists."
       end
-      PersonalProject.create(personal_glossary_root_path, glossary_name, source_language, target_language)
+      PersonalProject.create(personal_glossary_root_path, project_name, source_language, target_language)
     end
 
     def import(glossary_source)
@@ -160,8 +160,8 @@ module Logaling
       Dir[File.join(cache_path, "*")]
     end
 
-    def glossary_exists?(glossary_name, source_language, target_language)
-      project = find_project(glossary_name)
+    def glossary_exists?(project_name, source_language, target_language)
+      project = find_project(project_name)
       if project && project.has_glossary?(source_language, target_language)
         true
       else
-------------- next part --------------
An HTML attachment was scrubbed...
다운로드 



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