fafactory 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/fafactory +7 -1
- metadata +1 -1
data/bin/fafactory
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
1
3
|
# Starts the rails apps configured in config/fafactory.yml in test mode on
|
2
4
|
# the given ports
|
5
|
+
require 'fileutils'
|
3
6
|
|
4
7
|
def log(msg)
|
5
8
|
puts "* [Fafactory] #{msg}"
|
@@ -15,7 +18,10 @@ config.each do |service, settings|
|
|
15
18
|
exec_args << "--environment=test"
|
16
19
|
|
17
20
|
log "Starting application at #{settings["path"]}..."
|
18
|
-
fork
|
21
|
+
fork do
|
22
|
+
FileUtils.cd settings["path"]
|
23
|
+
exec "script/server", *exec_args
|
24
|
+
end
|
19
25
|
end
|
20
26
|
|
21
27
|
Signal.trap("TERM") do
|