summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@nokia.com>2009-03-26 15:29:48 +0100
committerJohan Sørensen <johan@johansorensen.com>2009-04-22 15:17:54 +0200
commit577b527f71cdded0c1ea5037e709734ea77e5b2f (patch)
treedf0450d315e1a819b008b9ae5f925040cbf8f9e1
parent8dd46a5de7cf4b66b68a5df204b8980c13b69da9 (diff)
downloadgitorious-mainline-outdated-577b527f71cdded0c1ea5037e709734ea77e5b2f.zip
gitorious-mainline-outdated-577b527f71cdded0c1ea5037e709734ea77e5b2f.tar.gz
gitorious-mainline-outdated-577b527f71cdded0c1ea5037e709734ea77e5b2f.tar.bz2
Allow script/gitorious to be run under a custom Rails environment
-rwxr-xr-xscript/gitorious4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/gitorious b/script/gitorious
index ddfe414..9fef0da 100755
--- a/script/gitorious
+++ b/script/gitorious
@@ -11,7 +11,9 @@ else
conf_file = File.join(BASE_DIR, "config/gitorious.yml")
end
-GitoriousConfig = YAML::load_file(conf_file)['production']
+RAILS_ENV = ENV['RAILS_ENV'] ||= 'production'
+
+GitoriousConfig = YAML::load_file(conf_file)[RAILS_ENV]
ENV["PATH"] = "/usr/local/bin/:/opt/local/bin:#{ENV["PATH"]}"