Sha256: 8816342a4114d9564efcd8dd6c05251d61af15b96c6c3d6433d4fbc16d9cee2c

Contents?: true

Size: 563 Bytes

Versions: 112

Compression:

Stored size: 563 Bytes

Contents

require 'pact_broker/diagnostic/resources/base_resource'

module PactBroker
  module Diagnostic
    module Resources
      class Heartbeat < BaseResource

        def allowed_methods
          ["GET"]
        end

        def content_types_provided
          [["application/hal+json", :to_json]]
        end

        def to_json
          @@json ||= {
            "ok" => true,
            "_links" => {
              "self" => {
                "href" => request.uri.to_s
              }
            }
          }.to_json
        end
      end
    end
  end
end

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.79.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.78.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.78.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.77.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.76.2 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.76.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.76.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.75.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.74.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.74.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.73.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.72.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.71.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.70.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.69.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.68.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.68.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.67.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.66.0 lib/pact_broker/diagnostic/resources/heartbeat.rb