question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow relative paths in pact publish task

See original GitHub issue

Currently, when passing pactUrls to the publish task, the urls need to be absolute. It would be nice to pass in a relative path.

See https://github.com/pact-foundation/pact-js/issues/31 + https://github.com/pact-foundation/pact-node/commit/a5afdb17e2c3ca8acf6c6a2051e7575cc4bcb4b2#commitcomment-21360868 for background.

I suspect part of the complication is relativity to the underlying Ruby process, so we would need to convert to an absolute path under the hood anyway.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bethesquecommented, Oct 10, 2017

The paths need to be relative to the directory you run the executable from - that might have been the issue. So you need to invoke the verifier using the relative path from the project root if possible.

Btw, there’s an issue to change the paths from options to space separated arguments, so we don’t have to do the comma separating thing.

1reaction
mboudreaucommented, Oct 4, 2017

@mefellows I’m looking into this one and thinking of adding something in the pact-util file that checks for paths/urls and then normalizes/resolves them if they’re valid.

Currently though, we’re a bit “laissez-faire” with the path validation as we do some minute checks on it, but nothing too concrete. I do agree that we need to have the ability to check relative vs absolute paths, however, should we also accept path shortcuts like ~/?

Also, when it comes to URLs, should we accept any protocols, or is it locked down to http(s)?

Trying to figure out the best way to do this as to implement it properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow relative paths in pact publish task · Issue #33 - GitHub
Currently, when passing pactUrls to the publish task, the urls need to be absolute. It would be nice to pass in a relative...
Read more >
Pact Maven plugin | Pact Docs
This is a Maven plugin for verifying pacts against a running provider, publishing pacts generated by consumer tests,
Read more >
Untitled
The Gradle plugin creates a task `pactVerify` to your build which will verify all configured pacts against your provider. ## To Use It...
Read more >
Using pact broker with a path - Stack Overflow
When I enable PreEmptive Authentication i can see that ot give a Warning like [WARNING] Using preemptive basic authentication with the pact ......
Read more >
“How-to” Guides - Spring Cloud
Flow: Consumer Contract approach with Pact Broker | Consumer Side; 7.8. ... We are working on allowing more ways of describing the contracts....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found