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

fine tune packaging #2143

Merged
merged 7 commits into from
Dec 23, 2020
Merged

fine tune packaging #2143

merged 7 commits into from
Dec 23, 2020

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

There are a few open issues and pull requests about the packaging and installation of Nokogiri which this PR is trying to address:

More specifically, the code that's been doing the gem packaging is ad-hoc, brittle, and not very discoverable, and has little-to-no test coverage. This PR embarks on cleaning up some of that code, and erecting tests around the files that are packaged and installed, so that I have the confidence to refactor and update this code going forward.

I want to give a shoutout to @stevecheckoway whose original PR at #1788 inspired this approach, though unfortunately I didn't use most of that PR because the precompiled native gems, added since that PR, complicated things.

Have you included adequate test coverage?

Ayuh. Notably two new scripts have been added and will be run in CI:

  • scripts/test-gem-file-contents which makes assertions on the contents of the tarball and the packaged gemspec
  • scripts/test-gem-installation which asserts on the filesystem left behind by the gem installation process

Does this change affect the behavior of either the C or the Java implementations?

This affects only installation-time, the functional behavior of Nokogiri is not changed.

to the more precise compile-against-libxml2-source
avoiding the (buggy) default behavior of rake-compiler-dock when no
platform is set for jruby.
This commit introduces complete test coverage for:

- the contents of every flavor of gem file
- the filesystem after every flavor of gem installation

The key outcome of this change is to allow nokogumbo to compile
against the same headers used by Nokogiri, #1788

A secondary outcome is much improved confidence and understanding of
how we're packaging the gems and what we're putting on disk during
installation.

Closes #1788
Closes #2076
Closes #2078
using test-gem-file-contents and test-gem-installation
@codeclimate
Copy link

codeclimate bot commented Dec 23, 2020

Code Climate has analyzed commit 107cebc and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 0.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 94.2% (0.0% change).

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant