Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pact v4 specification implementation for Pact Ruby #267

Closed
ThomasKoppensteiner opened this issue Jun 8, 2022 · 3 comments
Closed

Pact v4 specification implementation for Pact Ruby #267

ThomasKoppensteiner opened this issue Jun 8, 2022 · 3 comments

Comments

@ThomasKoppensteiner
Copy link

Please implement the pact v4 specification for Ruby (MRI and JRuby).

This ticket is a starting point. Please feel free to convert it to a GitHub project or a milestone.

@mscottford
Copy link

If this isn't the best place for me to ask my questions about implementing v3/v4 then please direct me to somewhere more appropriate.

Is the sample Ruby spec in the pact-reference repository a viable starting point for someone looking to experiment with creating an implementation of v3 and v4 in Ruby? I'm specifically thinking about the pact_mockserver_mk2 gem which doesn't appear to be published to RubyGems, but is used by the example consumer spec.

It does look like this example was authored quite a while ago, and it hasn't seen many changes since. There's also at least one test that appears to just be a stub and probably should be removed.

I'm interested in Ruby support Pact v3 and v4, because I've been using the Aruba gem to write Cucumber/Gherkin behavior tests for a series of command line executables that interact with some APIs that I also control. I want to be able to use the consumer tests to validate that the API behaves correctly. My research has not uncovered another tool that facilitates testing command line applications via Cucumber/Gherkin at the same level of quality that Aruba does, so using one of the implementations that already supports v3/v4 does not appear to be an option for me.

To that end, I'm interested in helping bring support for v3/v4 to Ruby. I've seen mentions in other issues that there are others who are also working on this effort. What's the best way for me to get involved?

/cc This question also applies to #266, so I'm linking to that issue from here. I suspect that adopting pact-ffi would result in both versions getting added without too much additional effort.

@YOU54F
Copy link
Member

YOU54F commented Jul 31, 2024

Is the sample Ruby spec in the pact-reference repository a viable starting point for someone looking to experiment with creating an implementation of v3 and v4 in Ruby? I'm specifically thinking about the pact_mockserver_mk2 gem which doesn't appear to be published to RubyGems, but is used by the example consumer spec.

No unfortunately, it is built with helix, which was archived

https://github.com/pact-foundation/pact-reference/blob/efc54d263e7ea53c9511cf389870e790c0158bc3/ruby/pact_mockserver_mk2/pact_mockserver_mk2.gemspec

I suspect that adopting pact-ffi would result in both versions getting added without too much additional effort.

Correct, I've already built a library wrapper example for the pact_ffi library, along with some examples

https://github.com/YOU54F/pact-ruby-ffi

we do have a cucumber based pact-compatibility-suite for validating client implementations.

I would assume the best path forward is trying to integrate the pact_ffi functions via the pact-ruby-ffi wrapper for at least V2.

API's could then be proposed for V3/V4.

One consideration may be to consolidate the ruby project into a single gem, as currently the makeup of the pact-ruby project consists of several independent gems. As the pact_ffi shared library contains all the functionality provided by each indy gem

https://docs.pact.io/diagrams/ecosystem#ruby-goldberg-machine

@YOU54F
Copy link
Member

YOU54F commented Aug 12, 2024

closing in favour of #319, as it will be easier for me to track

thanks for raising

@YOU54F YOU54F closed this as completed Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants