Mike Dalessio <mike@csa.net> wrote:
Show 7 quoted lines
> running the webrick server with git requires Ruby and Ruby's YAML and > Webrick libraries (both of which come standard with Ruby). nice for > single-user standalone invocations. > > the --httpd=webrick option generates a (short!) ruby script on the fly to > read httpd.conf options and invoke the web server via library call. this > script is placed in the .git/gitweb directory.
Nice. I'm in favor of adding WEBrick since it's fairly commonly installed on developer boxes and is more consistently available if available at all. Apache and lighttpd may not be compiled with some modules we need.
I'm having trouble applying this patch, however. It's whitespace-mangled and using long lines doesn't help mailers much.
Show 10 quoted lines
> Signed-off-by: Mike Dalessio <mike.dalessio@gmail.com>
> ---
> Documentation/git-instaweb.txt | 3 ++-
> git-instaweb.sh | 29 ++++++++++++++++++++++++++++-
> 2 files changed, 30 insertions(+), 2 deletions(-)
>
> +webrick_conf () {
> + # generate a standalone server script in $fqgitdir/gitweb.
> + cat > "$fqgitdir/gitweb/$httpd" <<EOF
> +#! /usr/bin/rubyCould we make the shebang dynamic? (capturing the output of `which ruby` maybe, or just breaking down and using /usr/bin/env ruby). The ruby binary seems to appear all over the place on the filesystem from my experience, especially with its popularity amongst OSX users.
-- Eric Wong