Module: Culerity
- Defined in:
- lib/culerity.rb,
lib/culerity/jruby_runner.rb,
lib/culerity/celerity_server.rb,
lib/culerity/persistent_delivery.rb,
lib/culerity/remote_object_proxy.rb,
lib/culerity/remote_browser_proxy.rb
Defined Under Namespace
Modules: PersistentDelivery, ServerCommands
Classes: CelerityServer, CulerityException, JRubyRunner, RemoteBrowserProxy, RemoteObjectProxy
Class Method Summary
collapse
Class Method Details
.run_rails(options = {}) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/culerity.rb', line 28
def self.run_rails(options = {})
if defined?(Rails) && !File.exists?("tmp/culerity_rails_server.pid")
puts "WARNING: Speed up execution by running 'rake culerity:rails:start'"
port = options[:port] || 3001
environment = options[:environment] || 'culerity'
rails_server = fork do
$stdin.reopen "/dev/null"
$stdout.reopen "/dev/null"
$stderr.reopen "/dev/null"
Dir.chdir(Rails.root) do
exec "script/server -e #{environment} -p #{port}"
end
end
sleep 5
rails_server
end
end
|