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

Update nokogiri and uri #2

Merged
merged 6 commits into from Sep 8, 2021
Merged

Update nokogiri and uri #2

merged 6 commits into from Sep 8, 2021

Conversation

liseki
Copy link

@liseki liseki commented Aug 26, 2021

rails 6.1.4.1 comes with nokogiri 1.12.3 thus requiring an update here. This change brakes one old behaviour: when a namespace is not explicitly specified, rendering no longer searches for a namespace on the ancestors tree (see sparklemotion/nokogiri@1f483f0 and https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md#fixed-4). To keep the old behaviour we now have to explicitly set the namespace for inner nodes when using the XML builder.

While at this, I have also removed the obsolete URI.escape and URI.unescape calls. Since the underlying parser used for these calls is still available via URI::DEFAULT_PARSER I have continued to use uri library for the time begin.

Also note that I updated ox to ohler55/master since Tim's original patch in branch add-raw was eventually merged there (see ohler55/ox#117).

Lastly, some specs are just broken before this change. I tried to wrangle with them for a little while to no avail. We'll properly test this upstream.

Nokogiri was updated to 1.12 to match what we have in production and ox
was updated to ohler55/master since Tim's original patch in branch
add-raw was eventually merged there (see
ohler55/ox#117).
URI delegates these calls to the DEFAULT_PARSER which has not been
removed, and is likely to remain, so we can continue to use it for the
time being.
This updates the Mongo API and fixes specs to get a green test suite.
However the MongoResource model is not production-ready as it has been
currently designed. It does not take advantage of chunks in the GridFS
to load file ranges and all file operations load the entire file into
memory.
@liseki
Copy link
Author

liseki commented Sep 7, 2021

This PR is ready for review now. Further to the fixes in my previous comment, I have also made the test suite green. This should help should we need to make further changes later.

Also note, as I mentioned in the commit message, the MongoResource, although passing specs was and is not production ready (or rather not optmised). It does not use chunks in GridFS to serve file ranges and files are read entirely into memory during processing. The Mongo specs were run with MongoDB Community Edition version 5.0.2.

@liseki liseki merged commit 333603e into master Sep 8, 2021
@TomNaessens TomNaessens mentioned this pull request Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant