Sha256: 903949c319faa101fa99737b6e3e01e3fcf170cbb5c31ba5fe7b103537d27dfb

Contents?: true

Size: 826 Bytes

Versions: 10

Compression:

Stored size: 826 Bytes

Contents

require 'pact_broker/client/pacticipants'
require 'pact_broker/client/versions'
require 'pact_broker/client/pacts'


module PactBroker


  module Client

    DEFAULT_PACT_BROKER_BASE_URL = 'http://pact-broker'

    class PactBrokerClient

      DEFAULT_OPTIONS = {base_url: DEFAULT_PACT_BROKER_BASE_URL}

      attr_reader :base_url, :client_options

      def initialize options = {}
        merged_options = DEFAULT_OPTIONS.merge(options)
        @base_url = merged_options[:base_url]
        @client_options = merged_options[:client_options] || {}
      end

      def pacticipants
        PactBroker::Client::Pacticipants.new base_url: base_url, client_options: client_options
      end

      def pacts
        PactBroker::Client::Pacts.new base_url: base_url, client_options: client_options
      end

    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pact_broker-client-1.6.0 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.5.0 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.4.0 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.3.0 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.2.0 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.1.0 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.0.3 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.0.2 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.0.1 lib/pact_broker/client/pact_broker_client.rb
pact_broker-client-1.0.0 lib/pact_broker/client/pact_broker_client.rb