Sha256: 971eaf2264686bbd5c91afbccb422623b472cf0b91ace5ec7c481dc688f80830

Contents?: true

Size: 631 Bytes

Versions: 3

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

require_relative "pact_config/grpc"

module Sbmt
  module Pact
    module Provider
      module PactConfig
        def self.new(transport_type, provider_name:, opts: {})
          case transport_type
          when :http
            Http.new(provider_name: provider_name, opts: opts)
          when :grpc
            Grpc.new(provider_name: provider_name, opts: opts)
          when :async
            Async.new(provider_name: provider_name, opts: opts)
          else
            raise ArgumentError, "unknown transport_type: #{transport_type}"
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sbmt-pact-0.12.2 lib/sbmt/pact/provider/pact_config.rb
sbmt-pact-0.12.1 lib/sbmt/pact/provider/pact_config.rb
sbmt-pact-0.12.0 lib/sbmt/pact/provider/pact_config.rb