Sha256: 9924749b3623ef78512bc328cd34ccac201c829e830fa51d0161d883469e6d5c

Contents?: true

Size: 1.13 KB

Versions: 8

Compression:

Stored size: 1.13 KB

Contents

require "pact_broker/api/resources/matrix"

module PactBroker
  module Api
    module Resources
      class CanIDeployPacticipantVersionByTagToTag < Matrix
        def resource_exists?
          !!version
        end

        def policy_name
          :'versions::version'
        end

        def malformed_request?
          false
        end

        private

        def selectors
          @selectors ||= [
                            PactBroker::Matrix::UnresolvedSelector.new(
                              pacticipant_name: pacticipant_name,
                              latest: true,
                              tag: identifier_from_path[:tag],
                            )
                          ]

        end

        def options
          @options ||= {
                          latestby: "cvp",
                          latest: true,
                          tag: identifier_from_path[:to]
                        }
        end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pact_broker-2.112.0 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb
pact_broker-2.111.0 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb
pact_broker-2.109.1 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb
pact_broker-2.109.0 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb
pact_broker-2.108.0 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb
pact_broker-2.107.1 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb
pact_broker-2.107.0 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_by_tag_to_tag.rb