3 BEGIN { require 5.008006; }
4 use Catalyst::Runtime 5.80;
5 use namespace::autoclean;
17 our $VERSION = '0.002001_01';
18 $VERSION = eval $VERSION;
22 default_view => 'Default',
23 default_model => 'CollectionOfRepos',
24 use_request_uri_for_path => 1,
25 disable_component_resolution_regex_fallback => 1,
30 after prepare_path => sub {
32 if ($ctx->req->param('a')) {
33 $ctx->request->uri->path('/legacy' . $ctx->request->uri->path);
37 around uri_for => sub {
38 my ($orig, $c) = (shift, shift);
39 my $uri = $c->$orig(@_);
40 $$uri =~ tr[&][;] if defined $uri;
44 around uri_for_action => sub {
45 my ($orig, $c) = (shift, shift);
46 my $uri = $c->$orig(@_);
47 $$uri =~ s[/fragment\b][] if defined $uri;
52 my ($self, @args) = @_;
53 my $uri = $self->request->uri_with(@args);
55 $uri =~ s[/fragment\b][];
65 Gitalist - A modern git web viewer
69 script/gitalist_server.pl --repo_dir /home/me/code/git
73 As Gitalist follows the usual Perl module format the usual approach
74 for installation should work e.g.
85 You can also check gitalist out from git and run it, in this case you'll additionally
86 need the author modules, but no configuration will be needed as it will default to looking
87 for repositories the directory above the checkout.
91 Gitalist is a web frontend for git repositories based on gitweb.cgi
92 and backed by Catalyst.
96 This project started off as an attempt to port gitweb.cgi to a
97 Catalyst app in a piecemeal fashion. As it turns out, thanks largely
98 to Florian Ragwitz's earlier effort, it was easier to use gitweb.cgi
99 as a template for building a new Catalyst application.
101 =head1 GETTING GITALIST
103 You can install Gitalist from CPAN in the usual way:
107 Alternatively, you can get Gitalist using git.
109 The canonical repository for the master branch is:
111 git://git.shadowcat.co.uk/catagits/Gitalist.git
113 Gitalist is also mirrored to github, and a number of people have active forks
114 with branches and/or new features in the master branch.
118 As of C<0.002001> Gitalist can now be bootstrapped to run out of its
119 own directory by installing its prerequisites locally with the help of
120 L<local::lib>. So instead of installing the prerequisites to the
121 system path with CPAN they are installed under the Gitalist directory.
123 To do this clone Gitalist from the Shadowcat repository mentioned
124 above or grab a download from CPAN or broquaint's github repository:
126 http://github.com/broquaint/Gitalist/downloads
128 With the source acquired and unpacked run the following from within the
131 perl script/bootstrap
133 This will install the necessary modules for the build process which in
134 turn installs the prerequisites locally.
136 =head1 INITIAL CONFIGURATION
138 Gitalist is configured using L<Catalyst::Plugin::Configloader>. The supplied sample
139 configuration is in L<Config::General> format, however it is possible to configure
140 Gitalist using other config file formats (such as YAML) if you prefer.
142 =head2 WHEN CHECKING GITALIST OUT OF GIT
144 Gitalist from git includes a minimal C<gitalist_local.conf>, which sets the repository
145 directory to one directory higher than the Gitalist repository.
147 This means that if you check Gitalist out next to your other git checkouts, then starting
148 the demo server needs no parameters at all:
150 Gitalist [master]$ ./script/gitalist_server.pl
151 You can connect to your server at http://localhost:3000
153 =head2 FOR CPAN INSTALLS
155 Gitalist can be supplied with a config file by setting the C<< GITALIST_CONFIG >>
156 environment variable to point to a configuration file.
158 If you install Gitalist from CPAN, a default configuration is installed along with gitalist,
159 which is complete except for a repository directory. You can get a copy of this configuration
162 cp `perl -Ilib -MGitalist -e'print Gitalist->path_to("gitalist.conf")'` gitalist.conf
164 You can then edit this confg, adding a repo_dir path and customising other settings as desired.
166 You can then start the Gitalist demo server by setting C<< GITALIST_CONFIG >>. For example:
168 GITALIST_CONFIG=/usr/local/etc/gitalist.conf gitalist_server.pl
170 Alternatively, if you only want to set a repository directory and are otherwise happy with
171 the default configuration, then you can set the C<< GITALIST_REPO_DIR >> environment
172 variable, or pass the C<< --repo_dir >> flag to any of the scripts.
174 GITALIST_REPO_DIR=/home/myuser/code/git gitalist_server.pl
175 gitalist_server.pl --repo_dir home/myuser/code/git
177 The C<< GITALIST_REPO_DIR >> environment variable will override the repository directory set
178 in configuration, and will itself be overridden by he C<< --repo_dir >> flag.
182 Once you have followed the instructions above to install and configure Gitalist, you may want
183 to run it in a more production facing environment than using the single threaded developement
186 The recommended deployment method for Gitalist is FastCGI, although Gitalist can also be run
187 under mod_perl or as pure perl with L<Catalyst::Engine::PreFork>.
189 Assuming that you have installed Gitalist's dependencies into a L<local::lib>, and you
190 are running from a git checkout, adding a trivial FCGI script as C<script/gitalist.fcgi>
191 (this file is specifically in C<.gitignore> so you can have your own copy):
194 exec /home/t0m/public_html/Gitalist/script/gitalist_fastcgi.pl
196 This example can be seen live here:
198 http://example.gitalist.com
202 Patches are welcome, please feel free to fork on github and send pull requests, send patches
203 from git format-patch to the bug tracker, or host your own copy of gitalist somewhere and
204 ask us to pull from it.
208 Gitalist has an active irc community in C<#gitalist> on irc.perl.org, please feel free to stop
209 by and ask questions, report bugs or installation issues or generally for a chat about where
210 we plan to go with the project.
214 L<Gitalist::Controller::Root>
216 L<Gitalist::Git::Repository>
220 =head1 AUTHORS AND COPYRIGHT
222 Catalyst application:
223 (C) 2009 Venda Ltd and Dan Brook <broq@cpan.org>
224 (C) 2009, Tom Doran <bobtfish@bobtfish.net>
225 (C) 2009, Zac Stevens <zts@cryptocracy.com>
227 Original gitweb.cgi from which this was derived:
228 (C) 2005-2006, Kay Sievers <kay.sievers@vrfy.org>
229 (C) 2005, Christian Gierke
231 Model based on http://github.com/rafl/gitweb
232 (C) 2008, Florian Ragwitz
236 Licensed under GNU GPL v2