From 57c9f70fb3c14ed94f4fb2445a8a4168f8c5253b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 16 Mar 2011 16:38:46 -0700 Subject: [PATCH] update examples for Rack/Zbatery --- config.ru | 2 -- examples/{config.ru => middleware.ru} | 2 +- examples/watcher.ru | 4 ++++ examples/watcher_demo.ru | 9 +++++++++ examples/{zbatery.config.rb => zbatery.conf.rb} | 2 ++ 5 files changed, 16 insertions(+), 3 deletions(-) delete mode 100644 config.ru rename examples/{config.ru => middleware.ru} (57%) create mode 100644 examples/watcher.ru create mode 100644 examples/watcher_demo.ru rename examples/{zbatery.config.rb => zbatery.conf.rb} (73%) diff --git a/config.ru b/config.ru deleted file mode 100644 index b8f6160..0000000 --- a/config.ru +++ /dev/null @@ -1,2 +0,0 @@ -require "raindrops" -run Raindrops::Watcher.new diff --git a/examples/config.ru b/examples/middleware.ru similarity index 57% rename from examples/config.ru rename to examples/middleware.ru index c31b983..642016b 100644 --- a/examples/config.ru +++ b/examples/middleware.ru @@ -1,4 +1,4 @@ -# sample stand-alone rackup application +# sample stand-alone rackup application for Raindrops::Middleware require 'rack/lobster' require 'raindrops' use Raindrops::Middleware diff --git a/examples/watcher.ru b/examples/watcher.ru new file mode 100644 index 0000000..a3e7fdb --- /dev/null +++ b/examples/watcher.ru @@ -0,0 +1,4 @@ +# Sample standalone Rack application, recommended use is with Zbatery +# See zbatery.conf.rb +require "raindrops" +run Raindrops::Watcher.new diff --git a/examples/watcher_demo.ru b/examples/watcher_demo.ru new file mode 100644 index 0000000..2d74b09 --- /dev/null +++ b/examples/watcher_demo.ru @@ -0,0 +1,9 @@ +# This is the exact config that powers http://raindrops-demo.bogomips.org/ +# This is used with zbatery.conf.rb +# +# zbatery -c zbatery.conf.ru watcher_demo.ru -E none +require "raindrops" +require "clogger" # http://clogger.rubyforge.org/ +use Clogger, :format => Clogger::Format::Rack_1_0, :logger => $stdout +use Raindrops::Middleware +run Raindrops::Watcher.new :listeners => %w(0.0.0.0:80 /tmp/.raindrops) diff --git a/examples/zbatery.config.rb b/examples/zbatery.conf.rb similarity index 73% rename from examples/zbatery.config.rb rename to examples/zbatery.conf.rb index 38aa4b6..7feee32 100644 --- a/examples/zbatery.config.rb +++ b/examples/zbatery.conf.rb @@ -4,3 +4,5 @@ Rainbows! do use :ThreadSpawn end +stderr_path "/var/log/rainbows/stderr.log" +stdout_path "/var/log/rainbows/stdout.log" -- 2.11.4.GIT