Module: Terminus
- Extended by:
- Forwardable
- Defined in:
- lib/terminus.rb,
lib/terminus/host.rb,
lib/terminus/node.rb,
lib/terminus/proxy.rb,
lib/terminus/server.rb,
lib/terminus/browser.rb,
lib/terminus/timeouts.rb,
lib/terminus/controller.rb,
lib/terminus/application.rb,
lib/terminus/proxy/rewrite.rb,
lib/terminus/proxy/external.rb,
lib/terminus/proxy/driver_body.rb
Defined Under Namespace
Modules: Timeouts
Classes: Application, Browser, Controller, Host, Node, Proxy, Server
Constant Summary
collapse
- FAYE_MOUNT =
'/messaging'
- DEFAULT_HOST =
'localhost'
- DEFAULT_PORT =
7004
- LOCALHOST =
/^(localhost|0\.0\.0\.0|127\.0\.0\.1)$/
- RETRY_LIMIT =
3
- ROOT =
File.expand_path(File.dirname(__FILE__))
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.debug ⇒ Object
Returns the value of attribute debug.
35
36
37
|
# File 'lib/terminus.rb', line 35
def debug
@debug
end
|
Class Method Details
.create(options = {}) ⇒ Object
37
38
39
|
# File 'lib/terminus.rb', line 37
def create(options = {})
Server.new(options)
end
|
.driver_script(host = DEFAULT_HOST) ⇒ Object
.endpoint(host = DEFAULT_HOST) ⇒ Object
45
46
47
|
# File 'lib/terminus.rb', line 45
def endpoint(host = DEFAULT_HOST)
"http://#{host}:#{port}#{FAYE_MOUNT}"
end
|
.ensure_reactor_running ⇒ Object
49
50
51
52
|
# File 'lib/terminus.rb', line 49
def ensure_reactor_running
Thread.new { EM.run unless EM.reactor_running? }
while not EM.reactor_running?; end
end
|
.port ⇒ Object
54
55
56
|
# File 'lib/terminus.rb', line 54
def port
@port || DEFAULT_PORT
end
|
.port=(port) ⇒ Object
58
59
60
|
# File 'lib/terminus.rb', line 58
def port=(port)
@port = port.to_i
end
|