lib/roda/plugins/heartbeat.rb in roda-2.29.0 vs lib/roda/plugins/heartbeat.rb in roda-3.0.0

- old
+ new

@@ -10,20 +10,15 @@ # # plugin :heartbeat # # You can also specify a custom heartbeat path: # - # plugin :heartbeat, :path=>'/status' + # plugin :heartbeat, path: '/status' module Heartbeat HEARTBEAT_RESPONSE = [200, {'Content-Type'=>'text/plain'}.freeze, ['OK'.freeze].freeze].freeze - OPTS = {}.freeze - RodaPlugins.deprecate_constant(self, :OPTS) - PATH_INFO = 'PATH_INFO'.freeze - RodaPlugins.deprecate_constant(self, :PATH_INFO) - # Set the heartbeat path to the given path. - def self.configure(app, opts=RodaPlugins::OPTS) + def self.configure(app, opts=OPTS) app.opts[:heartbeat_path] = (opts[:path] || app.opts[:heartbeat_path] || "/heartbeat").dup.freeze end module InstanceMethods # If the request is for a heartbeat path, return the heartbeat response.