class PactBroker::Api::Resources::CanIDeployPacticipantVersionByTagToTag

Public Instance Methods

malformed_request?() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb, line 15
def malformed_request?
  false
end
policy_name() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb, line 11
def policy_name
  :'versions::version'
end
resource_exists?() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb, line 7
def resource_exists?
  !!version
end

Private Instance Methods

options() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb, line 32
def options
  @options ||= {
                  latestby: "cvp",
                  latest: true,
                  tag: identifier_from_path[:to]
                }
end
selectors() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb, line 21
def selectors
  @selectors ||= [
                    PactBroker::Matrix::UnresolvedSelector.new(
                      pacticipant_name: pacticipant_name,
                      latest: true,
                      tag: identifier_from_path[:tag],
                    )
                  ]

end
version() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb, line 40
def version
  @version ||= version_service.find_by_pacticipant_name_and_latest_tag(identifier_from_path[:pacticipant_name], identifier_from_path[:tag])
end