pact-foundation/pact_broker-client

Can we add more documentation to the example ruby rakefile?

Opened this issue · 3 comments

I'm trying out Pact, and having a hard time going from the naive examples to a semi-real system with pacts shared across services using a local pact broker.

In both this repo, and in the "Publishing Pacts" doc, there's not really any explanation for what some of the configurations are. I'm particularly confused by the require 'my_consumer/version'' line. Connecting that to one of the many concrete examples would help, as would explaining why each line is required, and what purposes it serves.

Good suggestions Ben. It needs an update.

Just quickly:

require 'my_consumer/version'

Was left over from when we suggested people publish pacts with the version number of the gem. Now we recommend using the git sha. That line needs to be removed.

You'll get better docs for each field if you run bundle exec pact-broker help publish. It should be clear which CLI field maps to the Ruby field, but let me know if you can't work it out.

Here's a real world example, but it's a very complicated one, because I'm doing some fancy stuff with feature branches, so it may not actually be very helpful. https://github.com/pact-foundation/pact_broker-client/blob/master/tasks/pact.rake

Awesome, thanks @bethesque!