[logaling-commit] logaling/logaling-command [remove-dependency-on-logaling-home] Remove default value of logaling_home from Glossary

Back to archive index

null+****@clear***** null+****@clear*****
Thu Feb 16 17:00:46 JST 2012


SHIMADA Koji	2012-02-16 17:00:46 +0900 (Thu, 16 Feb 2012)

  New Revision: e279b5854c174647ecbab15528b1732a6fbf6fc0

  Log:
    Remove default value of logaling_home from Glossary

  Modified files:
    lib/logaling/glossary.rb
    spec/logaling/command_spec.rb
    spec/logaling/glossary_spec.rb
    spec/logaling/repository_spec.rb

  Modified: lib/logaling/glossary.rb (+2 -2)
===================================================================
--- lib/logaling/glossary.rb    2012-02-16 16:54:55 +0900 (997a50c)
+++ lib/logaling/glossary.rb    2012-02-16 17:00:46 +0900 (fbd9780)
@@ -61,13 +61,13 @@ module Logaling
         glossary
       end
 
-      def build_path(glossary, source_language, target_language, logaling_home=LOGALING_HOME)
+      def build_path(glossary, source_language, target_language, logaling_home)
         fname = [glossary, source_language, target_language].join(".")
         File.join(logaling_home, "projects", glossary, "glossary", "#{fname}.yml")
       end
     end
 
-    def initialize(glossary, source_language, target_language, logaling_home=LOGALING_HOME)
+    def initialize(glossary, source_language, target_language, logaling_home)
       @path = Glossary.build_path(glossary, source_language, target_language, logaling_home)
       @glossary = glossary
       @source_language = source_language

  Modified: spec/logaling/command_spec.rb (+1 -1)
===================================================================
--- spec/logaling/command_spec.rb    2012-02-16 16:54:55 +0900 (65500ad)
+++ spec/logaling/command_spec.rb    2012-02-16 17:00:46 +0900 (d576e81)
@@ -21,7 +21,7 @@ describe Logaling::Command::Application do
   let(:logaling_home) { LOGALING_HOME }
   let(:base_options) { {"glossary"=>"spec", "source-language"=>"en", "target-language"=>"ja"} }
   let(:command) { Logaling::Command::Application.new([], base_options) }
-  let(:glossary_path) { Logaling::Glossary.build_path('spec', 'en', 'ja') }
+  let(:glossary_path) { Logaling::Glossary.build_path('spec', 'en', 'ja', logaling_home) }
   let(:target_project_path) { File.join(logaling_home, "projects", "spec") }
   let(:repository) { Logaling::Repository.new(logaling_home) }
 

  Modified: spec/logaling/glossary_spec.rb (+2 -2)
===================================================================
--- spec/logaling/glossary_spec.rb    2012-02-16 16:54:55 +0900 (83675da)
+++ spec/logaling/glossary_spec.rb    2012-02-16 17:00:46 +0900 (b9c3d42)
@@ -22,8 +22,8 @@ module Logaling
   describe Glossary do
     let(:project) { "spec" }
     let(:logaling_home) { LOGALING_HOME }
-    let(:glossary) { Glossary.new(project, 'en', 'ja') }
-    let(:glossary_path) { Glossary.build_path(project, 'en', 'ja') }
+    let(:glossary) { Glossary.new(project, 'en', 'ja', logaling_home) }
+    let(:glossary_path) { Glossary.build_path(project, 'en', 'ja', logaling_home) }
     let(:repository) { Logaling::Repository.new(logaling_home) }
 
     before do

  Modified: spec/logaling/repository_spec.rb (+2 -2)
===================================================================
--- spec/logaling/repository_spec.rb    2012-02-16 16:54:55 +0900 (4c04eb8)
+++ spec/logaling/repository_spec.rb    2012-02-16 17:00:46 +0900 (f152c59)
@@ -22,8 +22,8 @@ module Logaling
   describe Repository do
     let(:project) { "spec" }
     let(:logaling_home) { LOGALING_HOME }
-    let(:glossary) { Glossary.new(project, 'en', 'ja') }
-    let(:glossary_path) { Glossary.build_path(project, 'en', 'ja') }
+    let(:glossary) { Glossary.new(project, 'en', 'ja', logaling_home) }
+    let(:glossary_path) { Glossary.build_path(project, 'en', 'ja', logaling_home) }
     let(:repository) { Logaling::Repository.new(logaling_home) }
     let(:db_home) { File.join(logaling_home, "db") }
 




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