Class: Gemkeeper::RackupProcess
- Inherits:
-
Object
- Object
- Gemkeeper::RackupProcess
- Defined in:
- lib/gemkeeper/rackup_process.rb
Overview
Builds config.ru, spawns the rackup/puma process, and waits for HTTP readiness.
Instance Method Summary collapse
-
#initialize(config) ⇒ RackupProcess
constructor
A new instance of RackupProcess.
- #start ⇒ Object
- #start_foreground ⇒ Object
Constructor Details
#initialize(config) ⇒ RackupProcess
Returns a new instance of RackupProcess.
10 11 12 |
# File 'lib/gemkeeper/rackup_process.rb', line 10 def initialize(config) @config = config end |
Instance Method Details
#start ⇒ Object
14 15 16 17 18 |
# File 'lib/gemkeeper/rackup_process.rb', line 14 def start generate_config_ru Dir.chdir(@config.cache_dir) { launch_daemon } wait_for_server end |
#start_foreground ⇒ Object
20 21 22 23 24 25 |
# File 'lib/gemkeeper/rackup_process.rb', line 20 def start_foreground generate_config_ru Dir.chdir(@config.cache_dir) do system(*build_rackup_cmd) || raise(ServerError, "rackup exited with status #{$CHILD_STATUS.exitstatus}") end end |