in lib/puma/launcher.rb [153:188]
def run
previous_env =
if defined?(Bundler)
env = Bundler::ORIGINAL_ENV.dup
bundle = "-rbundler/setup"
env["RUBYOPT"] = [env["RUBYOPT"], bundle].join(" ").lstrip unless env["RUBYOPT"].to_s.include?(bundle)
env
else
ENV.to_h
end
@config.clamp
@config.plugins.fire_starts self
setup_signals
set_process_title
@runner.run
case @status
when :halt
log "* Stopping immediately!"
when :run, :stop
graceful_stop
when :restart
log "* Restarting..."
ENV.replace(previous_env)
@runner.before_restart
restart!
when :exit
end
@binder.close_unix_paths
end