Join Slack
Powered by
Am I correct? - Pact Ruby Standalone support Pact ...
# libpact_ffi-users
t
Tien Vo
12/15/2022, 2:57 PM
Am I correct? • Pact Ruby Standalone support Pact Specification 2.x • Pact Rust FFI support Pact Specification 2.x, 3.x, 4.x
✅ 1
y
Yousaf Nabi (pactflow.io)
12/15/2022, 3:27 PM
AFAIK • Pact Ruby Standalone support Pact Specification 1, 1.1, 2.x • Pact Rust FFI support Pact Specification 1, 1.1, 2.x, 3.x, 4.x ◦ or at least you can specify them all.
https://github.com/pact-foundation/pact-reference/blob/dbe569502561c7d300e2bc428e3553617d4a838b/rust/pact_ffi/src/models/pact_specification.rs#L[…]6
what that actually means to full end to end support of mix and matching. I would assume that theoretically means anyone on a ruby core backed language cannot verify 3.x/4.x pacts and may have limited support for message pacts
👍 1
Yousaf Nabi (pactflow.io)
12/15/2022, 3:31 PM
some languages have the ability to generate 3.x message pacts, like pact-python which still uses the ruby core
https://github.com/pact-foundation/pact-python/blob/d87d54bce2ed2f74b0a2bb46314b18541bdb598a/pact/message_pact.py#L42
https://github.com/pact-foundation/pact-message-ruby
There is an open ticket on
https://github.com/pact-foundation/pact-message-ruby/issues/6
for support in that gem for v3 message support. It might be better to use the ffi via ruby
https://github.com/YOU54F/pact-ruby-ffi/blob/main/lib/pact_ruby_ffi.rb
✅ 1
Yousaf Nabi (pactflow.io)
12/15/2022, 3:42 PM
btw thank you for the awesome PHP examples in pact-reference They inspired me •
https://github.com/pact-foundation/pact-reference/blob/master/php/src/consumer-2.php
chef kiss
•
https://github.com/YOU54F/pact-python-ffi/blob/main/pact_message_v3.py
•
https://github.com/YOU54F/pact-ruby-ffi/blob/main/spec/pactffi_create_message_pact_spec.rb
Plugin examples •
https://github.com/pact-foundation/pact-reference/blob/php_plugins/php/src/consumer-plugin.php
•
https://github.com/YOU54F/pact-python-ffi/blob/main/pact_plugin_grpc_v4.py
•
https://github.com/YOU54F/pact-ruby-ffi/blob/main/examples/area_calculator/spec/pactffi_create_plugin_pact_spec.rb
•
https://github.com/YOU54F/pact-bun/blob/main/src/grpc.consumer.raw.test.ts
•
https://github.com/YOU54F/hello_ffi/blob/main/deno/hello_pact_grpc.ts
•
https://github.com/YOU54F/hello_ffi/blob/main/swift/hello_grpc.swift
•
https://github.com/YOU54F/hello_ffi/blob/main/perl/hello_grpc.pl
•
https://github.com/YOU54F/hello_ffi/blob/main/lua/hello_grpc.lua
Other language examples based on based on this Ruby example (which is where I started originally in FFI land -
https://github.com/pact-foundation/pact-reference/blob/master/ruby/example_consumer_spec/spec/simple_consumer_spec.rb
) •
https://github.com/YOU54F/hello_ffi/blob/main/zig/hello_pact_mock_server.zig
•
https://github.com/YOU54F/hello_ffi/blob/main/raku/hello_pact_mock_server.raku
❤️ 2
Yousaf Nabi (pactflow.io)
12/15/2022, 3:43 PM
its been a fun little advent of code style polyglot puzzle game for me
🧩 1
Open in Slack
Previous
Next