Module: Culerity

Defined in:
lib/culerity.rb,
lib/culerity/celerity_server.rb,
lib/culerity/remote_object_proxy.rb,
lib/culerity/remote_browser_proxy.rb

Defined Under Namespace

Modules: ServerCommands Classes: CelerityServer, CulerityException, RemoteBrowserProxy, RemoteObjectProxy

Class Method Summary collapse

Class Method Details

.run_railsObject



35
36
37
38
39
40
41
42
43
# File 'lib/culerity.rb', line 35

def self.run_rails
  unless File.exists?("tmp/culerity_rails_server.pid")
    puts "WARNING: Speed up execution by running 'rake culerity:rails:start'"
    port        = 3001
    environment = 'culerity_development'
    puts "Launched rails on :#{port}..."
    return IO.popen("script/server -e #{environment} -p #{port}", 'r+')
  end
end

.run_serverObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/culerity.rb', line 17

def self.run_server
  IO.popen("jruby #{__FILE__}", 'r+').extend(ServerCommands)

  # open the two pipes that were created below
  # while(!File.exists?("tmp/culerity_in.pipe")) 
  #   sleep(1)
  # end
  # pipe_in = open("tmp/culerity_in.pipe", "w+")
  # pipe_out = open("tmp/culerity_out.pipe", "r+")
  
  
  
  # store celerity pid in tmp/culerity_celerity.pid
  # store server pid in tmp/culerity_rails_server.pid
  
  # open named pipes to communicate with celerity_server + return them
end