Sha256: f3b496790bcb7ba898bfb33b4c05a8ba112569573fa6301496a9d5195837dd50

Contents?: true

Size: 695 Bytes

Versions: 43

Compression:

Stored size: 695 Bytes

Contents

require 'rack/utils'
require 'pact_broker/matrix/unresolved_selector'

module PactBroker
  module Matrix
    class ParseCanIDeployQuery
      def self.call params
        selector = PactBroker::Matrix::UnresolvedSelector.new
        options = {
          latestby: 'cvp',
          latest: true
        }

        if params[:pacticipant].is_a?(String)
          selector.pacticipant_name = params[:pacticipant]
        end

        if params[:version].is_a?(String)
          selector.pacticipant_version_number = params[:version]
        end

        if params[:to].is_a?(String)
          options[:tag] = params[:to]
        end

        return [selector], options
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.79.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.78.1 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.78.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.77.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.76.2 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.76.1 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.76.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.75.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.74.1 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.74.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.73.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.72.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.71.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.70.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.69.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.68.1 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.68.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.67.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.66.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb