Sha256: 619ee29d741cb2c4fa919e09b36eede2761817f0fb544fdf62ce5771b1610423

Contents?: true

Size: 610 Bytes

Versions: 14

Compression:

Stored size: 610 Bytes

Contents

require 'rack/utils'

module PactBroker
  module Matrix
    class ParseCanIDeployQuery
      def self.call params
        selector = {}
        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

14 entries across 14 versions & 1 rubygems

Version Path
pact_broker-2.50.1 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.50.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.49.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.48.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.47.1 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.47.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.46.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.45.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.44.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.43.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.42.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.41.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.40.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb
pact_broker-2.39.0 lib/pact_broker/matrix/parse_can_i_deploy_query.rb