Class: LitmusPaper::CLI::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/litmus_paper/cli/server.rb

Defined Under Namespace

Classes: Options

Instance Method Summary collapse

Instance Method Details

#opt_parserObject



33
34
35
# File 'lib/litmus_paper/cli/server.rb', line 33

def opt_parser
  Options.new
end

#startObject



37
38
39
40
41
42
# File 'lib/litmus_paper/cli/server.rb', line 37

def start
  options = opt_parser.parse!(ARGV)
  unicorn_args = ['-c', options[:unicorn_config], '-l', "#{options[:Host]}:#{options[:Port]}"]
  unicorn_args << '-D' if options[:daemonize]
  Kernel.exec('unicorn', *unicorn_args)
end