pact-foundation / pact-ruby-standalone

A standalone pact command line executable using the ruby pact implementation and Travelling Ruby
https://pact.io
MIT License
42 stars 33 forks source link

single file executables #118

Closed YOU54F closed 7 months ago

YOU54F commented 1 year ago

Hey hey,

Currently we use traveling-ruby to package up our ruby tools into a zipped folder for distribution.

There are few projects which are designed to also support packaging ruby, but using alternate methods, provide a ruby runtime, but as a single executable, that is unpacked into a temp dir when run.

I've been playing out with a few of them and using the work/knowledge I've gained from traveling-ruby to get them up to date and working to help the Ruby community out, and possibly make things simpler for our users when they are starting.

Also I got annoyed at no docker in non linux CI workflows, and kept hammering PactFlow during integration tests, so a nice self contained broker, you can start up on the command line, without Docker was one of my side aims

Windows

Create self extracting pact executables, with native extensions for windows

MacOS / Linux

rb2exe - this uses traveling-ruby and packages into a single file

YOU54F commented 1 year ago

Awwww yeaaaah 🚀 ruby packer packing ruby in alpine. It be a chonkie boi tho

Screenshot 2023-08-16 at 22 57 21
bethesque commented 1 year ago

These are beautiful, but given we're trying to remove the ruby-standalone and use the rust impl instead, what is our usecase for these different packages?

YOU54F commented 1 year ago

Soooo, there are a few reasons why I wandered down this rabbit hole. Given that we are moving (or have moved) away from the Ruby ecosystem as the heart of Pact, it would be nice to have a nice little farewell party for all things Ruby

Pact Broker in a box - For use in testing environments that don't have Docker

Gift back to the Ruby Community

Better windows support

Pact in a box - consolidated tooling

Phased replacement of ruby cli tooling

All the cool kids love Alpine

YOU54F commented 1 year ago

Also just to add, as an additional aside. The Pact Broker uses a large amount of native gems, of which I hadn't really tested with Traveling-Ruby and it was a big selling point of the packaging system.

It irked me a little bit that that I hadn't been able to cover/test that case, so I decided to ensure that it could build and package native gems, and what better way than to test something that I know and love, our Pact Broker!