pact-foundation / pact_broker-client

A Ruby and CLI client for the Pact Broker. Publish and retrieve pacts and verification results.
MIT License
69 stars 47 forks source link

feat: colour first url in magenta for ease of reading #133

Closed YOU54F closed 1 year ago

YOU54F commented 1 year ago

Automagically colour urls in log output

building on #118 it was identified that the colour contrast for the provider link was too dark and difficult to read on dark terminals.

Messaging - User facing

Most times, your user may know what they need to do next, after interacting with the Pact Broker Client and a Pact Broker, however this is not always the case.

Authors should note that we use a mixture of text and colour, to convey

We have tried to stick to these guidelines for user facing messages.

So take for example publishing a pact.

Previous

Screenshot 2023-05-04 at 17 39 02

New

Screenshot 2023-05-04 at 17 37 58

Points of notice

Utilises the colorized_message functionality and uses the style of messaging sent from the pact broker, so this change also refactors the coloured messaging for the provider next steps, to make it a little bit more maintainable for the next developer.

Tested manually, should require a unit test

Condition will accept where there are more than one uri, but will only colour the first, I tried it in a loop, with an indexed array but no bueno