Sha256: 4709dfdca04009233e163078e1be5114dcec0af23e067f4cd86e1ebb77dcfc73
Contents?: true
Size: 891 Bytes
Versions: 9
Compression:
Stored size: 891 Bytes
Contents
module Padrino module Cli module Adapter class << self # Start for the given options a rackup handler def start(options) Padrino.run!(options.symbolize_keys) end # Method that stop (if exist) a running Padrino.application def stop(options) options.symbolize_keys! if File.exist?(options[:pid]) pid = File.read(options[:pid]).to_i puts "=> Sending INT to process with pid #{pid}" begin Process.kill(2, pid) rescue Errno::ESRCH, RangeError => error puts error.message exit rescue Errno::EPERM => error puts error.message abort end else puts "=> #{options[:pid]} not found!" abort end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems