Add CONFIGURATION section to Gitalist POD.
Dan Brook [Sun, 6 Mar 2011 15:32:00 +0000 (15:32 +0000)]
Also tidied up existing gitalist.conf and other bits and pieces.

README
gitalist.conf
lib/Gitalist.pm
lib/Gitalist/Controller/Fragment/Ref.pm
lib/Gitalist/Controller/Root.pm

diff --git a/README b/README
index 94f2992..61bb97c 100644 (file)
--- a/README
+++ b/README
@@ -137,6 +137,39 @@ RUNNING
 
         http://example.gitalist.com
 
+CONFIGURATION
+    The Gitalist config is loaded with Catalyst::Plugin::ConfigLoader and
+    the available config options are:
+
+  Model::CollectionOfRepos
+    git Path to the "git" binary.
+
+    repo_dir
+        A directory containing the directories to show.
+
+        If no repositories are found in this directory then Gitalist will
+        search recursively in that directory for repositories.
+
+    search_recursively
+        A boolean indicating whether to always search recursively for
+        repositories within "repo_dir".
+
+    whitelist
+        Path a file containing a list of repositories that can be shown.
+        Each line in the file will represent the name of a repo to show e.g
+
+          Gitalist
+          some-bare-repo.git
+
+        This is compatible with "gitweb"'s "projects.list".
+
+    export_ok
+        If provided every must contain a file of the same name to be
+        visible. This is similar to "gitweb"'s functionality.
+
+  paging
+    log The number of commits to show in the
+
   FASTCGI
     Running Gitalist in FastCGI mode requires a webserver with FastCGI
     support (such as apache with <mod_fcgi> or <mod_fcgid>). Below is a
index d2e747c..a238ab0 100644 (file)
@@ -8,22 +8,12 @@ name Gitalist
 
 sitename "A Gitalist"
 
-# $feature{'blame'}{'default'} = [1];
-<feature>
-  <blame>
-    default = 1
-  </blame>
-</feature>
-
-# fs traversing limit for getting project list
-# the number is relative to the projectroot
-project_maxdepth 2007
-
 <paging>
   log = 50
   summary = 17
 </paging>
 
+# Support gitweb patches action.
 <patches>
   max = 16
 </patches>
index 43924c7..b149782 100644 (file)
@@ -206,6 +206,58 @@ This example can be seen live here:
 
     http://example.gitalist.com
 
+=head1 CONFIGURATION
+
+The Gitalist config is loaded with L<Catalyst::Plugin::ConfigLoader>
+and the available config options are:
+
+=head2 Model::CollectionOfRepos
+
+=over
+
+=item git
+
+Path to the C<git> binary.
+
+=item repo_dir
+
+A directory containing the directories to show.
+
+If no repositories are found in this directory then Gitalist will
+search recursively in that directory for repositories.
+
+=item search_recursively
+
+A boolean indicating whether to always search recursively for
+repositories within C<repo_dir>.
+
+=item whitelist
+
+Path a file containing a list of repositories that can be shown. Each
+line in the file will represent the name of a repo to show e.g
+
+  Gitalist
+  some-bare-repo.git
+
+This is compatible with C<gitweb>'s C<projects.list>.
+
+=item export_ok
+
+If provided every must contain a file of the same name to be
+visible. This is similar to C<gitweb>'s functionality.
+
+=back
+
+=head2 paging
+
+=over
+
+=item log
+
+The number of commits to show in the 
+
+=back
+
 =head2 FASTCGI
 
 Running Gitalist in FastCGI mode requires a webserver with FastCGI
@@ -250,7 +302,6 @@ Also, note that Apache will refuse C<%2F> in Gitalist URLs
 unless configured otherwise. Make sure C<AllowEncodedSlashes On>
 is in your F<httpd.conf> file in order for this to run smoothly.
 
-
 =head1 CONTRIBUTING
 
 Patches are welcome, please feel free to fork on github and send pull requests, send patches
index 6345746..15cd8ff 100644 (file)
@@ -62,7 +62,7 @@ after blame => sub {
     my($self, $c) = @_;
 
     my $repository = $c->stash->{Repository};
-                                                      # WTF?
+
     my $blame = $c->stash->{Commit}->blame($c->stash->{filename}, $c->stash->{Commit}->sha1);
     $c->stash(
         blame    => $blame,
@@ -94,7 +94,7 @@ after history => sub {
 
     my %logargs = (
        sha1   => $c->stash->{Commit}->sha1,
-       count  => 25, #Gitalist->config->{paging}{log} || 25,
+       count  => Gitalist->config->{paging}{log} || 25,
        ($filename ? (file => $filename) : ())
     );
 
index 14ef8ee..d598c1f 100644 (file)
@@ -48,7 +48,7 @@ sub base : Chained('/root') PathPart('') CaptureArgs(0) {
     abridged_description => sub {
         join(' ', grep { defined } (split / /, shift)[0..10]);
     },
-    uri_for_gravatar => sub { # FIXME - Cache these?
+    uri_for_gravatar => sub {
         my $email = shift;
         my $size = shift;
         my $uri = 'http://www.gravatar.com/avatar/' . md5_hex($email);