Sha256: 3200a08e146035c8c78e376b3755feba3604d526f64a026e4a7642814e0da65a

Contents?: true

Size: 525 Bytes

Versions: 36

Compression:

Stored size: 525 Bytes

Contents

require 'webmachine'

module PactBroker
  module Diagnostic
    module Resources
      class Heartbeat < Webmachine::Resource

        def allowed_methods
          ["GET"]
        end

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

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

      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
pact_broker-2.0.3 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.2 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.8 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.7 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.6 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.18.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.5 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.18.0.beta.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.17.2 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.17.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.4 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.3 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.2 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-2.0.0.beta.1 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.17.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.16.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.15.0 lib/pact_broker/diagnostic/resources/heartbeat.rb
pact_broker-1.14.0 lib/pact_broker/diagnostic/resources/heartbeat.rb