Class: FIS::Auth::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/fis/auth/runner.rb

Overview

Manages the local Sinatra/Thin server in a forked process

Instance Method Summary collapse

Instance Method Details

#startObject



7
8
9
10
11
12
13
14
# File 'lib/fis/auth/runner.rb', line 7

def start
  @pid = fork do
    Thin::Logging.silent = true
    Server.start!
  end

  Process.detach(@pid)
end

#stopObject



16
17
18
# File 'lib/fis/auth/runner.rb', line 16

def stop
  Process.kill('SIGINT', @pid) if @pid
end