Sha256: 27154c3161d40195583c160f67f0c0cc1ddb7d8a985a77b6e9574ce4d616fcd7
Contents?: true
Size: 614 Bytes
Versions: 39
Compression:
Stored size: 614 Bytes
Contents
module RackGraphql class HealthResponseBuilder def initialize(app_name:, env: {}) @app_name = app_name @request = Rack::Request.new(env) end def build [200, headers, [body]] end private attr_reader :app_name, :request def headers { 'Content-Type' => 'application/json' } end def body Oj.dump( 'status' => 'ok', 'request_ip' => request.ip, 'app_name' => app_name, 'app_env' => ENV['RACK_ENV'], 'host' => ENV['HOSTNAME'], 'revision' => ENV['REVISION'] ) end end end
Version data entries
39 entries across 39 versions & 1 rubygems