Sha256: 1a412a17e3d1b86f0bf9b6e4d108d0e6aa0c22a0d7b8dbf174a7ee7cdcc5651e

Contents?: true

Size: 654 Bytes

Versions: 5

Compression:

Stored size: 654 Bytes

Contents

require 'pact_broker/api/resources/version'

module PactBroker
  module Api
    module Resources
      class LatestVersion < Version
        def content_types_accepted
          []
        end

        def allowed_methods
          ["GET", "OPTIONS"]
        end

        private

        def version
          if identifier_from_path[:tag]
            @version ||= version_service.find_by_pacticipant_name_and_latest_tag(identifier_from_path[:pacticipant_name], identifier_from_path[:tag])
          else
            @version ||= version_service.find_latest_by_pacticpant_name(identifier_from_path)
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/api/resources/latest_version.rb
pact_broker-2.79.0 lib/pact_broker/api/resources/latest_version.rb
pact_broker-2.78.1 lib/pact_broker/api/resources/latest_version.rb
pact_broker-2.78.0 lib/pact_broker/api/resources/latest_version.rb
pact_broker-2.77.0 lib/pact_broker/api/resources/latest_version.rb