Skip to content

Conversation

@matthewbalvanz-wf
Copy link
Contributor

  • Build process now downloads and prepares the Ruby applications like the NPM based Pact
  • Resulting *.tar.gz now includes portable Ruby versions of Mock Service and Verifier
  • The platform appropriate version is unpacked when a user installs pact-python

@mefellows @jslvtr

This work is based on the work in pact-provider-verifier-npm and pact-mock-service-npm and packages the same 4 platforms of each as part of the Python tar file. This results in a fairly big file (nearly 70MB), but the only way I've spotted without requiring the user to have Ruby is to combine the mock-service and verifier into a single install so we can cut the number of traveling Ruby installs in half. I don't think I have enough Ruby skills to know if that's possible and how it might be done yet. If you guys have ideas let me know, otherwise we might leave that as an optimization exercise in the future, but the Rust version might beat us there and we can switch to that instead.

@matthewbalvanz-wf matthewbalvanz-wf force-pushed the package-ruby-apps branch 2 times, most recently from 2622d23 to 9381f1d Compare April 10, 2017 15:07
- Build process now downloads and prepares the Ruby applications like the NPM based Pact
- Resulting *.tar.gz now includes portable Ruby versions of Mock Service and Verifier
- The platform appropriate version is unpacked when a user installs pact-python
@matthewbalvanz-wf
Copy link
Contributor Author

I've rebased this PR on master so the Travis CI configuration is included. At the moment I have it setup to only run tests and not to build the Python package as the version of Ruby installed in the Python VM is only 1.9.

In the future, we may want to investigate the options available from Travis to see if we could create a single artifact that is the tar.gz file from the build that includes the Ruby mock-service and verifier applications.

@matthewbalvanz-wf matthewbalvanz-wf added this to the 1.0.0 milestone Apr 11, 2017
@matthewbalvanz-wf matthewbalvanz-wf self-assigned this Apr 11, 2017
@jslvtr
Copy link
Contributor

jslvtr commented Apr 13, 2017

This looks awesome. I'm fairly confident Travis should be able to do what you suggest!
🚢

@mefellows
Copy link
Member

Sorry for my tardiness, i'll have some time to look through this early next week in detail I'd say. Don't wait for my nod of approval or anything, it's trending in the right direction. I can probably lend a hand to the Ruby stuff.

I don't know enough about the Pip packaging ecosystem to guide you here, I'll do some research before I make concrete suggestions. The idea of packaging both Ruby processes makes sense though. In the node versions, we package all 4 platforms but publish 4 separate (actually 5) packages, one as a meta-package and 4 platform specific packages.

This way, users don't pay the cost of having a 'universal' package, if that makes sense.

FWIW your bash fu is much nicer than the existing, well done.

@matthewbalvanz-wf
Copy link
Contributor Author

Your point about the node packaging got me thinking again. I might be able to assemble something similar in the Python world. Originally, I had discounted that idea as I thought Travis would prevent us from publishing multiple packages from the same repository, but perhaps that is just me limiting my thinking based on my usual tools as the node version accomplishes the same in its .travis.yml.

I think that would be a great improvement for users and is something I would want to complete for the 1.0.0 release. I added a card to the project board where I've been collecting my thoughts on the subject. I'm open to rolling it into this work or spinning it off to another PR though.

@mefellows
Copy link
Member

Great!

I personally am happy with smaller PRs that each contribute working software, so no objections for me to roll this in first and then improve later.

@jslvtr
Copy link
Contributor

jslvtr commented Apr 14, 2017

Definitely agree, and this will make it easier to test locally for development.

@matthewbalvanz-wf matthewbalvanz-wf merged commit fd68b41 into master Apr 22, 2017
@matthewbalvanz-wf matthewbalvanz-wf deleted the package-ruby-apps branch April 22, 2017 15:55
matthewbalvanz-wf pushed a commit that referenced this pull request Nov 20, 2017
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

Successfully merging this pull request may close these issues.

4 participants