Class: HttpStub::Server::Daemon

Inherits:
HttpServerManager::Server
  • Object
show all
Defined in:
lib/http_stub/server/daemon.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Daemon

Returns a new instance of Daemon.


18
19
20
21
# File 'lib/http_stub/server/daemon.rb', line 18

def initialize(args)
  default_args = { host: "localhost", port: args[:configurator].state.port, ping_uri: "/http_stub/status" }
  super(default_args.merge(args))
end

Class Method Details

.log_dir=(dir) ⇒ Object


12
13
14
# File 'lib/http_stub/server/daemon.rb', line 12

def log_dir=(dir)
  HttpServerManager.log_dir = dir
end

.pid_dir=(dir) ⇒ Object


8
9
10
# File 'lib/http_stub/server/daemon.rb', line 8

def pid_dir=(dir)
  HttpServerManager.pid_dir = dir
end

Instance Method Details

#start_commandObject


23
24
25
# File 'lib/http_stub/server/daemon.rb', line 23

def start_command
  "rake #{@name}:start:foreground"
end