A basic --repo_dir now works again
[catagits/Gitalist.git] / lib / Gitalist / Model / CollectionOfRepos.pm
index 090cb8c..9f37fc5 100644 (file)
@@ -67,13 +67,6 @@ has whitelist => (
     predicate => '_has_whitelist',
 );
 
-has repo_dir => (
-    is         => 'ro',
-    isa        => DirOrUndef,
-    coerce     => 1,
-    predicate => '_has_repo_dir',
-);
-
 # Simple directory of repositories (for list)
 has repos_dir => (
     is => 'ro',
@@ -92,9 +85,7 @@ has repos => (
 
 sub _build_repos_dir {
     my $self = shift;
-    my $opts = $self->_application->run_options || {};
-    return $self->_has_repo_dir && $self->repo_dir
-        || $opts->{repos_dir} || $ENV{GITALIST_REPO_DIR} || undef;
+    return $ENV{GITALIST_REPO_DIR};
 }
 
 sub build_per_context_instance {
@@ -115,6 +106,8 @@ sub build_per_context_instance {
 
     my $class = $self->class;
 
+    $ctx->log->debug("Building $class with " . join(", ", map { $_ . " => " . (defined($args{$_}) ? "'" . $args{$_}  . "'" : 'undef') } keys %args))
+        if $ctx->debug;
     my $model = $class->new(%args);
 
     $ctx->log->debug("Using class '$class' " . $model->debug_string) if $ctx->debug;