Description:
fix import dir bug
git-svn-id: http://theory.cpe.ku.ac.th/grader/cli/trunk/scripts@14 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r2:f854d6ed3319 - - 3 files changed: 3 inserted, 3 deleted
@@ -1,6 +1,6 | |||||
|
1 |
|
1 | ||
|
2 | # Rails app directory |
|
2 | # Rails app directory |
|
3 | RAILS_APP_DIR = "/home/jittat/web_grader" |
|
3 | RAILS_APP_DIR = "/home/jittat/web_grader" |
|
4 |
|
4 | ||
|
5 | # load the required environment file |
|
5 | # load the required environment file |
|
6 | - require "env_#{GRADER_ENV}.rb" |
|
6 | + require File.dirname(__FILE__) + "/env_#{GRADER_ENV}.rb" |
@@ -83,13 +83,13 | |||||
|
83 |
|
83 | ||
|
84 | # reading environment |
|
84 | # reading environment |
|
85 | GRADER_ENV = 'exam' |
|
85 | GRADER_ENV = 'exam' |
|
86 | if ARGV.length > 1 |
|
86 | if ARGV.length > 1 |
|
87 | GRADER_ENV = ARGV[1] |
|
87 | GRADER_ENV = ARGV[1] |
|
88 | end |
|
88 | end |
|
89 | - require "environment.rb" |
|
89 | + require File.dirname(__FILE__) + "/environment.rb" |
|
90 |
|
90 | ||
|
91 | #main program |
|
91 | #main program |
|
92 |
|
92 | ||
|
93 | talk 'Reading rails environment' |
|
93 | talk 'Reading rails environment' |
|
94 |
|
94 | ||
|
95 | RAILS_ENV = 'development' |
|
95 | RAILS_ENV = 'development' |
@@ -32,13 +32,13 | |||||
|
32 | i += 1 |
|
32 | i += 1 |
|
33 | end |
|
33 | end |
|
34 | i += 1 |
|
34 | i += 1 |
|
35 | end |
|
35 | end |
|
36 | end |
|
36 | end |
|
37 |
|
37 | ||
|
38 | - GRADER_DIR = "/home/jittat/grader/grader_ng" |
|
38 | + GRADER_DIR = File.dirname(__FILE__) |
|
39 |
|
39 | ||
|
40 | # print usage |
|
40 | # print usage |
|
41 | if ARGV.length < 3 |
|
41 | if ARGV.length < 3 |
|
42 | puts "using: import_task problem importing_testcase_dir number_of_testcase [options]" |
|
42 | puts "using: import_task problem importing_testcase_dir number_of_testcase [options]" |
|
43 | exit(127) |
|
43 | exit(127) |
|
44 | end |
|
44 | end |
You need to be logged in to leave comments.
Login now