* Re: [PATCH] instaweb: support for Ruby's WEBrick server [not found] <618c07250709161935g333f0536q31b453bd58f2d75d@mail.gmail.com> @ 2007-09-17 11:55 ` Eric Wong 2007-09-17 12:02 ` Thomas Adam 0 siblings, 1 reply; 4+ messages in thread From: Eric Wong @ 2007-09-17 11:55 UTC (permalink / raw) To: Mike Dalessio; +Cc: git Mike Dalessio <mike@csa.net> 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@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/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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] instaweb: support for Ruby's WEBrick server 2007-09-17 11:55 ` [PATCH] instaweb: support for Ruby's WEBrick server Eric Wong @ 2007-09-17 12:02 ` Thomas Adam 2007-09-17 12:25 ` Florian Weimer 0 siblings, 1 reply; 4+ messages in thread From: Thomas Adam @ 2007-09-17 12:02 UTC (permalink / raw) To: Eric Wong; +Cc: Mike Dalessio, git On 17/09/2007, Eric Wong <normalperson@yhbt.net> wrote: > 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. This is what /usr/bin/env is useful for, but it's not that portable. -- Thomas Adam ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] instaweb: support for Ruby's WEBrick server 2007-09-17 12:02 ` Thomas Adam @ 2007-09-17 12:25 ` Florian Weimer 2007-09-17 13:55 ` Mike Dalessio 0 siblings, 1 reply; 4+ messages in thread From: Florian Weimer @ 2007-09-17 12:25 UTC (permalink / raw) To: Thomas Adam; +Cc: Eric Wong, Mike Dalessio, git * Thomas Adam: > This is what /usr/bin/env is useful for, but it's not that portable. Yeah, it's /bin/env exclusively on some systems. 8-( -- Florian Weimer <fweimer@bfk.de> BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstraße 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] instaweb: support for Ruby's WEBrick server 2007-09-17 12:25 ` Florian Weimer @ 2007-09-17 13:55 ` Mike Dalessio 0 siblings, 0 replies; 4+ messages in thread From: Mike Dalessio @ 2007-09-17 13:55 UTC (permalink / raw) To: Florian Weimer; +Cc: Thomas Adam, Eric Wong, git I could generate a second /bin/sh script to run "ruby .../webrick.rb" This would assume that 'ruby' was in the user's $PATH, but that seems like a reasonable expectation. The drawback is that we'd be generating TWO scripts, one ruby script to invoke the server, and one shell script to run the ruby script. This seems a little ... circuitous. Another idea is to hack the $httpd variable to contain a command string like "ruby .../webrick.rb", with the drawback then being a lack of obviousness, since the convention is that the variable contains the same command as the --httpd argument, and is named the same as the <webserver>_conf() functions. On 9/17/07, Florian Weimer <fweimer@bfk.de> wrote: > * Thomas Adam: > > > This is what /usr/bin/env is useful for, but it's not that portable. > > Yeah, it's /bin/env exclusively on some systems. 8-( > > -- > Florian Weimer <fweimer@bfk.de> > BFK edv-consulting GmbH http://www.bfk.de/ > Kriegsstraße 100 tel: +49-721-96201-1 > D-76133 Karlsruhe fax: +49-721-96201-99 > -- mike dalessio mike@csa.net ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-17 13:55 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <618c07250709161935g333f0536q31b453bd58f2d75d@mail.gmail.com> 2007-09-17 11:55 ` [PATCH] instaweb: support for Ruby's WEBrick server Eric Wong 2007-09-17 12:02 ` Thomas Adam 2007-09-17 12:25 ` Florian Weimer 2007-09-17 13:55 ` Mike Dalessio
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).