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.36.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.36.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.35.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.34.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.33.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.32.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.31.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.30.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.29.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.27.6 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.27.5 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.27.4 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.27.3 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.27.2 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.27.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.26.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.26.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.25.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.24.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.23.4 lib/pact_broker/diagnostic/resources/heartbeat.rb