class Upman::Extensions::Ping::Servlet

Public Instance Methods

do_GET(request, response) click to toggle source

rubocop:disable Naming/MethodName

Calls superclass method Upman::Server::BaseServlet#do_GET
# File lib/upman/extensions/ping.rb, line 13
def do_GET(request, response)
  # rubocop:enable Naming/MethodName

  super(request, response)

  unless is_authenticated(request)
    response = not_authorized(response, "Request declined")
    return response
  end

  response = ok(response, perform_action)
end
perform_action() click to toggle source
# File lib/upman/extensions/ping.rb, line 26
def perform_action
   "{\"pong\": true, \"message\": \"upman-#{::Upman::Version::VERSION} - Daemon is running\"}"
 end