[Groonga-commit] droonga/drntest at 5872e18 [master] Use constant for special path

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Dec 3 18:49:03 JST 2013


Kouhei Sutou	2013-12-03 18:49:03 +0900 (Tue, 03 Dec 2013)

  New Revision: 5872e188829befd330fbd801c0b75587884ec61a
  https://github.com/droonga/drntest/commit/5872e188829befd330fbd801c0b75587884ec61a

  Message:
    Use constant for special path

  Added files:
    lib/drntest/path.rb
  Modified files:
    lib/drntest/test-runner.rb
    lib/drntest/tester.rb

  Added: lib/drntest/path.rb (+21 -0) 100644
===================================================================
--- /dev/null
+++ lib/drntest/path.rb    2013-12-03 18:49:03 +0900 (310ebce)
@@ -0,0 +1,21 @@
+# Copyright (C) 2013  Droonga Project
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module Drntest
+  module Path
+    SUITE  = "suite"
+    CONFIG = "config"
+  end
+end

  Modified: lib/drntest/test-runner.rb (+2 -1)
===================================================================
--- lib/drntest/test-runner.rb    2013-12-03 18:29:19 +0900 (c106141)
+++ lib/drntest/test-runner.rb    2013-12-03 18:49:03 +0900 (e5c6104)
@@ -17,6 +17,7 @@ require "json"
 require "yajl"
 require "tempfile"
 require "pp"
+require "drntest/path"
 require "drntest/test-results"
 require "drntest/executor"
 require "fileutils"
@@ -44,7 +45,7 @@ module Drntest
     end
 
     def config_dir
-      (@base_path + "config") +****@owner*****
+      (@base_path + Path::CONFIG) +****@owner*****
     end
 
     def config_file

  Modified: lib/drntest/tester.rb (+2 -1)
===================================================================
--- lib/drntest/tester.rb    2013-12-03 18:29:19 +0900 (2078f01)
+++ lib/drntest/tester.rb    2013-12-03 18:49:03 +0900 (7927b4e)
@@ -17,6 +17,7 @@ require "shellwords"
 require "optparse"
 require "pathname"
 require "drntest/version"
+require "drntest/path"
 require "drntest/test-runner"
 require "drntest/test-suites-result"
 
@@ -28,7 +29,7 @@ module Drntest
         tester = new
         option_parser = create_option_parser(tester)
         targets = option_parser.parse!(argv)
-        targets << tester.base_path + "suite" if targets.empty?
+        targets << tester.base_path + Path::SUITE if targets.empty?
         tester.run(*targets)
       end
 
-------------- next part --------------
HTML����������������������������...
Download 



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