On Tue, 2010-02-23 at 13:30 +0100, Michal Fojtik wrote:
On 22/02/10 15:17 -0800, lutter@redhat.com wrote:
These three patches fix a few crucial things:
1/3 runs the server in development mode by default for better stacktraces 2/3 fixes another Sinatra 0.9.4 incompatibility 3/3 makes requests with extensions (/api/flavors.xml) work under Sinatra 0.9.4
These patches looks great. ACK
Btw. do we will offer possibility to run Sinatra in production mode in future ? (Maybe as command line parameter as Rails do this).
Good catch .. I thought that happened already from the RACK_ENV environment variable; but thin helpfully overrides it. I just added this patch, too, and pushed the whole series:
From d798c901316216ca0eba9f428d61af75905381ff Mon Sep 17 00:00:00 2001
From: David Lutterkort lutter@redhat.com Date: Tue, 23 Feb 2010 11:07:19 -0800 Subject: [PATCH core 4/4] * bin/deltacloudd: allow setting environment with RACK_ENV
--- server/bin/deltacloudd | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd index 5d5a861..ecdda74 100755 --- a/server/bin/deltacloudd +++ b/server/bin/deltacloudd @@ -58,10 +58,12 @@ if [ -z "$rerun" ]; then exit 1 fi
+[ -z "$RACK_ENV" ] && RACK_ENV=development + export API_DRIVER export API_HOST export API_PORT
echo "Starting Deltacloud API :: '$API_DRIVER' driver :: http://$API_HOST:$API_PORT/api"
-rerun "thin start --debug --port=$API_PORT --address=$API_HOST -c '$topdir/libexec' -R config.ru" +rerun "thin start --debug --port=$API_PORT --address=$API_HOST -e $RACK_ENV -c '$topdir/libexec' -R config.ru"