Skip to content

YOU54F/pact-ruby-ffi

Repository files navigation

PactFfi

Ruby spike gem, to show interactions with the Pact Rust FFI methods.

Available on RubyGems - https://rubygems.org/gems/pact-ffi

Installation

Add this line to your application's Gemfile:

gem 'pact-ffi'

And then execute:

bundle

Or install it yourself as:

gem install pact-ffi

Usage

Simple

require 'pact/ffi'

puts PactFfi.pactffi_version

Supported Platforms

  • Ruby
    • This gem is compatible with all the rubies, and various platforms, it comes pre-packaged with the pact_ffi binary for each platform.
OS Ruby Architecture Supported Ruby Platform
OSX 2.6 - 3.2 x86_64 x86_64-darwin
OSX 2.6 - 3.2 aarch64 (arm) arm64-darwin
Linux 2.6 - 3.2 x86_64 x86_64-linux
Linux 2.6 - 3.2 aarch64 (arm) aarch64-linux
Windows 2.6 - 3.2 x86_64 x64-mingw-ucrt

You can checkout the ci tests, to see all the architectures, platforms and examples tested

note - Alpine is currently not supported, but is on the list

  • FFI libraries for your current platform - run ./script/download-libs.sh to download

  • If testing the protobuf plugin

    • 2.7 for protobuf/grpc example
      • See https://grpc.io/docs/languages/ruby/quickstart/ for steps
      • See examples/proto-ruby/README.md for notes
      • ruby-grpc is not currently, on m1 hardware for the pact-protobuf-plugin example
      • Have the pact-protobuf plugin available
        • Run pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/latest

Development

  • run bin/setup or bundle install to install dependencies
  • run ./script/download-libs.sh to download FFI libraries for your current platform
  • run rake spec to run tests

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pact-ffi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the PactFfi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published