Skip to content

The Pact Broker provides a repository for pacts created using the pact gem.

Notifications You must be signed in to change notification settings

neilcampbell/pact_broker

 
 

Repository files navigation

Pact Broker

The Pact Broker provides a repository for pacts created using the pact gem. It solves the problem of how to share pacts between consumer and provider projects.

The Pact Broker:

  • Enables pacts to be shared between consumer and provider projects.
  • Displays autogenerated documentation for each pact.
  • Enables a pact to be tagged (ie. "prod") so a provider can verify itself against a fixed version of a pact to ensure backwards compatibility.
  • Provides webhooks to trigger a provider build when a consumer publishes a change to a pact.
  • Displays dynamically generated network diagrams.

See the Pact Broker Client for documentation on how to publish a pact to the Pact Broker, and configure the URLs in the provider project.

Documentation

See the wiki for documentation.

Usage

  • Create a database using a product that is supported by the Sequel gem (listed on this page http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html). At time of writing, Sequel has adapters for: ADO, Amalgalite, CUBRID, DataObjects, DB2, DBI, Firebird, IBM_DB, Informix, JDBC, MySQL, Mysql2, ODBC, OpenBase, Oracle, PostgreSQL, SQLAnywhere, SQLite3, Swift, and TinyTDS.
  • Note: It is recommended to use PostgreSQL as it will support JSON search features that are planned in a future release.
  • Install ruby 1.9.3 or later
  • Copy the example directory to your workstation.
  • Modify the config.ru and Gemfile as desired (eg. choose database driver gem, set your database credentials)
  • Run bundle
  • Run bundle exec rackup
  • Open http://localhost:9292 and you should see the HAL browser.

For production usage, use a web application server like Phusion Passenger to serve the Pact Broker application.

About

The Pact Broker provides a repository for pacts created using the pact gem.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 57.2%
  • Ruby 41.5%
  • CSS 1.3%