class PactBroker::Api::Resources::CanIDeployPacticipantVersion

Public Instance Methods

policy_name() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb, line 13
def policy_name
  :'matrix::can_i_deploy'
end
resource_exists?() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb, line 9
def resource_exists?
  !!version
end

Private Instance Methods

options() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb, line 31
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.rb, line 19
def selectors
  @selectors ||= begin
    [
      PactBroker::Matrix::UnresolvedSelector.new(
        pacticipant_name: pacticipant_name,
        latest: true,
        tag: identifier_from_path[:tag]
      )
    ]
  end
end
version() click to toggle source
# File lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb, line 39
def version
  @version ||= version_service.find_by_pacticipant_name_and_latest_tag(identifier_from_path[:pacticipant_name], identifier_from_path[:tag])
end