class PactBroker::Api::Resources::LatestVersion
Public Instance Methods
Source
# File lib/pact_broker/api/resources/latest_version.rb, line 11 def allowed_methods ["GET", "OPTIONS"] end
Source
# File lib/pact_broker/api/resources/latest_version.rb, line 7 def content_types_accepted [] end
Private Instance Methods
Source
# File lib/pact_broker/api/resources/latest_version.rb, line 17 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]) elsif identifier_from_path[:branch_name] @version ||= version_service.find_latest_by_pacticipant_name_and_branch_name(identifier_from_path[:pacticipant_name], identifier_from_path[:branch_name]) else @version ||= version_service.find_latest_by_pacticpant_name(identifier_from_path) end end