diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-20 20:34:59 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-21 04:23:39 -0800 |
commit | 7c396fbd05d01ee5cb1c92def09049db3a3cec9f (patch) | |
tree | 03e08f146565035d1604d58c06524132e312b11a /bin/unicorn-hello-world | |
parent | 38141ffdd3bda01dabfdd8ff8f065c783053c86a (diff) | |
download | unicorn-7c396fbd05d01ee5cb1c92def09049db3a3cec9f.tar.gz |
This adds a bunch of execution tests that require the "unicorn" binary to be in PATH as well as rack being directly "require"-able ("rubygems" will not be loaded for you). The tester is responsible for setting up PATH and RUBYLIB appropriately.
Diffstat (limited to 'bin/unicorn-hello-world')
-rwxr-xr-x | bin/unicorn-hello-world | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/bin/unicorn-hello-world b/bin/unicorn-hello-world deleted file mode 100755 index e368344..0000000 --- a/bin/unicorn-hello-world +++ /dev/null @@ -1,27 +0,0 @@ -#!/home/ew/bin/ruby -# Simple "Hello World" application for Unicorn - -# Exec ourselves with unicorn. A shebang (e.g. "#!/usr/bin/unicorn") -# won't work since unicorn itself is a Ruby script with a shebang, but -# this does: -exec('unicorn', $0) if $0 == __FILE__ - -# Rack-compatible "Hello World" application -class HelloWorld - MSG = "Hello world!\n" - - def call(env) - [ 200, - { "Content-Type" => "text/plain", - "Content-Length" => MSG.size}, - [ MSG ] - ] - end -end - -# make sure this hash is the last statement, as this is eval-ed by unicorn -{ - # :listeners => %w(0.0.0.0:8080 127.0.0.1:7701 /tmp/test.sock), - # :hot_config_file => "/tmp/hot_config", - :app => HelloWorld.new, -} |