def call(env)
      if env[REQUEST_METHOD] == GET
        if env[PATH_INFO] == @status_path
          if @callback.respond_to?(:call)
            return @callback.call
          else
            return [200, HEADERS, [@callback.to_s]]
          end
        end
      end

      @app.call env
    end
def call(env)
      if env[REQUEST_METHOD] == GET
        if env[PATH_INFO] == @status_path
          if @callback.respond_to?(:call)
            return @callback.call
          else
            return [200, HEADERS, [@callback.to_s]]
          end
        end
      end

      @app.call env
    end
Initializes the middleware.

     # Responds with "OK" on /status
     use RequestStatus, "OK"

 You can change what URL to look for:

     use RequestStatus, "OK", "/ping"

 You can also check internal systems and return something more informative.

     use RequestStatus, lambda {
       status = MyApp.status # A Hash of some live counters or something
       [200, {"Content-Type" => "application/json"}, status.to_json]
     }

 app                  - The next Rack app in the pipeline.
 callback_or_response - Either a Proc or a Rack response.
 status_path          - Optional String path that returns the status.
                        Default: "/status"

 Returns nothing.