require "puma" require "puma/clocker/version" unless Puma::Server.instance_methods.include?(:handle_servers) raise "puma-clocker v#{Puma::Clocker::VERSION} is incompatible with puma v#{Puma::Const::PUMA_VERSION}. :(" end require_relative "clocker/seconds_calculator" module Puma module Clocker def handle_servers SecondsCalculator.run(ENV['STARTING_PUMA_ON'] || ENV['SPO']) super end end class Server prepend Clocker end end