Re: [PATCH] instaweb: support for Ruby's WEBrick server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Dalessio <mike@xxxxxxx> wrote:
> 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.

> Signed-off-by: Mike Dalessio <mike.dalessio@xxxxxxxxx>
> ---
>  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/ruby

Could 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux