|
From: <jh...@us...> - 2012-04-28 01:31:26
|
Revision: 333
http://etch.svn.sourceforge.net/etch/?rev=333&view=rev
Author: jheiss
Date: 2012-04-28 01:31:19 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Run unicorn based on whether the user has enabled it in their Gemfile
rather than based on a hard-coded constant in the test suite.
Modified Paths:
--------------
trunk/test/etchtest.rb
Modified: trunk/test/etchtest.rb
===================================================================
--- trunk/test/etchtest.rb 2012-04-28 01:26:02 UTC (rev 332)
+++ trunk/test/etchtest.rb 2012-04-28 01:31:19 UTC (rev 333)
@@ -97,7 +97,6 @@
File.symlink(newrepo, server[:repo])
end
- UNICORN = false
def start_server(repo='no_repo_yet')
# We want the running server's notion of the server base to be a symlink
# that we can easily change later in swap_repository.
@@ -130,10 +129,10 @@
raise "Etch server failed to start"
end
else
- if UNICORN
- exec("cd #{SERVERDIR} && #{RUBY} `which unicorn_rails` -p #{port}")
+ if `cd #{SERVERDIR} && #{RUBY} \`which bundle\` list`.include?('unicorn')
+ exec("cd #{SERVERDIR} && #{RUBY} `which bundle` exec unicorn -p #{port}")
else
- exec("cd #{SERVERDIR} && #{RUBY} `which rails` server -p #{port}")
+ exec("cd #{SERVERDIR} && #{RUBY} `which bundle` exec rails server -p #{port}")
end
end
{:port => port, :pid => pid, :repo => serverbase}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|