<commit_before># Pact::Provider::Proxy

Allows pact verification against a running provider at a configurable base URL (normal pact verification is run against a code base using Rack::Test::Methods - no process is actually spawned).

This allows testing against providers where you have access to a running instance of a provider, but you do not have access to its code base, or where the provider is not a ruby application.

## Installation

Add this line to your application's Gemfile:

    gem 'pact-provider-proxy'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install pact-provider-proxy

## Usage

Usually, you would configure and run pact:verify in the provider code base.
If you are using pact-provider-proxy to run your pact verify task, it is probably because you don't have access to the code base of the provider project, or it is not a ruby project, so it may make sense to include this task in your consumer project.

Specifying a pact_helper is optional, and is only required if you are using provider states or you need to configure Pact. Note that the pact_helper for the `ProxyVerificationTask` will not be automatically loaded like it is for the regular `pact:verify` - you must specify the path yourself if you need one (see the example below). The configuration options for the provider code will be different from the consumer code, so you cannot reuse the pact_helper from your consumer tests.

```ruby
require 'pact/provider/proxy/tasks'

Pact::ProxyVerificationTask.new :monolith do | task |
 task.pact_url './spec/pacts/my-consumer_my-monolith.json', :pact_helper => './spec/support/monolith_pact_helper'<commit_msg>docs(README): Added travis badge to README<commit_after># Pact::Provider::Proxy

[![Build Status](https://travis-ci.org/pact-foundation/pact-provider-proxy.svg?branch=master)](https://travis-ci.org/pact-foundation/pact-provider-proxy)

Allows pact verification against a running provider at a configurable base URL (normal pact verification is run against a code base using Rack::Test::Methods - no process is actually spawned).

This allows testing against providers where you have access to a running instance of a provider, but you do not have access to its code base, or where the provider is not a ruby application.

## Installation

Add this line to your application's Gemfile:

    gem 'pact-provider-proxy'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install pact-provider-proxy

## Usage

Usually, you would configure and run pact:verify in the provider code base.
If you are using pact-provider-proxy to run your pact verify task, it is probably because you don't have access to the code base of the provider project, or it is not a ruby project, so it may make sense to include this task in your consumer project.

Specifying a pact_helper is optional, and is only required if you are using provider states or you need to configure Pact. Note that the pact_helper for the `ProxyVerificationTask` will not be automatically loaded like it is for the regular `pact:verify` - you must specify the path yourself if you need one (see the example below). The configuration options for the provider code will be different from the consumer code, so you cannot reuse the pact_helper from your consumer tests.

```ruby
require 'pact/provider/proxy/tasks'

Pact::ProxyVerificationTask.new :monolith do | task |
 task.pact_url './spec/pacts/my-consumer_my-monolith.json', :pact_helper => './spec/support/monolith_pact_helper'
{'fraction_non_alphanumeric': 0.06221590909090909, 'fraction_numerical': 0.0, 'mean_word_length': 4.57120253164557, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1607431', 'n_tokens_mistral': 948, 'n_tokens_neox': 896, 'n_words': 480}