class Puma::ControlCLI
def prepare_configuration
def prepare_configuration if @state unless File.exist? @state raise "State file not found: #{@state}" end sf = Puma::StateFile.new sf.load @state @control_url = sf.control_url @control_auth_token = sf.control_auth_token @pid = sf.pid elsif @pidfile # get pid from pid_file File.open(@pidfile) { |f| @pid = f.read.to_i } end end