Showing 5 changed files with 8 additions and 14 deletions
+2 -3
lib/Gitprep.pm
... ...
@@ -134,7 +134,7 @@ sub startup {
134 134
   }
135 135
   
136 136
   # Repository home
137
-  my $rep_home = $ENV{GITPREP_REP_HOME} || $self->home->rel_file('data/rep');
137
+  my $rep_home = "$data_dir/rep";
138 138
   unless (-d $rep_home) {
139 139
     mkdir $rep_home
140 140
       or croak "Can't create directory $rep_home: $!";
... ...
@@ -158,8 +158,7 @@ sub startup {
158 158
   $self->git($git);
159 159
   
160 160
   # DBI
161
-  my $db_file = $ENV{GITPREP_DB_FILE}
162
-    || $self->home->rel_file('data/gitprep.db');
161
+  my $db_file = "$data_dir/gitprep.db";
163 162
   my $dbi = DBIx::Custom->connect(
164 163
     dsn => "dbi:SQLite:database=$db_file",
165 164
     connector => 1,
-5
xt/basic.t
... ...
@@ -11,14 +11,9 @@ use Test::Mojo;
11 11
 # Data directory
12 12
 my $data_dir =  $ENV{GITPREP_DATA_DIR} = "$FindBin::Bin/basic";
13 13
 
14
-# Test DB
15
-$ENV{GITPREP_DB_FILE} = "$FindBin::Bin/basic/gitprep.db";
16
-
17
-# Test Repository home
18 14
 # You must clone "gitprep_t"
19 15
 # cd basic/rep/kimoto
20 16
 # git clone --bare https://github.com/yuki-kimoto/gitprep_t.git
21
-$ENV{GITPREP_REP_HOME} = "$FindBin::Bin/basic/rep";
22 17
 
23 18
 $ENV{GITPREP_NO_MYCONFIG} = 1;
24 19
 
+2 -2
xt/import_rep.t
... ...
@@ -15,10 +15,10 @@ use Test::Mojo;
15 15
 my $data_dir =  $ENV{GITPREP_DATA_DIR} = "$FindBin::Bin/import_rep";
16 16
 
17 17
 # Test DB
18
-my $db_file = $ENV{GITPREP_DB_FILE} = "$FindBin::Bin/import_rep/gitprep.db";
18
+my $db_file = "$data_dir/gitprep.db";
19 19
 
20 20
 # Test Repository home
21
-my $rep_home = $ENV{GITPREP_REP_HOME} = "$FindBin::Bin/import_rep/rep";
21
+my $rep_home = "$data_dir/rep";
22 22
 
23 23
 $ENV{GITPREP_NO_MYCONFIG} = 1;
24 24
 
+2 -2
xt/smart_http.t
... ...
@@ -16,10 +16,10 @@ use Test::Mojo;
16 16
 my $data_dir =  $ENV{GITPREP_DATA_DIR} = "$FindBin::Bin/smart_http";
17 17
 
18 18
 # Test DB
19
-my $db_file = $ENV{GITPREP_DB_FILE} = "$FindBin::Bin/smart_http/gitprep.db";
19
+my $db_file = "$data_dir/gitprep.db";
20 20
 
21 21
 # Test Repository home
22
-my $rep_home = $ENV{GITPREP_REP_HOME} = "$FindBin::Bin/smart_http/rep";
22
+my $rep_home = "$data_dir/rep";
23 23
 
24 24
 $ENV{GITPREP_NO_MYCONFIG} = 1;
25 25
 
+2 -2
xt/user.t
... ...
@@ -15,10 +15,10 @@ use Test::Mojo;
15 15
 my $data_dir =  $ENV{GITPREP_DATA_DIR} = "$FindBin::Bin/user";
16 16
 
17 17
 # Test DB
18
-my $db_file = $ENV{GITPREP_DB_FILE} = "$FindBin::Bin/user/gitprep.db";
18
+my $db_file = "$data_dir/gitprep.db";
19 19
 
20 20
 # Test Repository home
21
-my $rep_home = $ENV{GITPREP_REP_HOME} = "$FindBin::Bin/user/rep";
21
+my $rep_home = "$data_dir/rep";
22 22
 
23 23
 $ENV{GITPREP_NO_MYCONFIG} = 1;
24 24