gnoso-fafactory 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|