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

Canonicalize preloads to save memory and fix broken preload #7

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

jhawthorn
Copy link

This regenerates the files using ruby-rdf/json-ld#61, with the exception of lib/json/ld/preloaded/obi.rb which I edited by hand (it's not in the Rakefile I guess?).

Previously lib/json/ld/preloaded/research.rb did not work as it registered under an https URL and then aliased that https URL to itself, which did nothing. JSON::LD::Context#parse only looks for http:// preloads. I adjusted the tests to test using webmock so that this type of problem can be detected.

This also ends up removing all aliases as they all just seemed to be https vs http or canonicalization changes. Everything other than the http and canonicalized version of the URL could never be loaded so they previously had no effect other than preventing the code block from being GC'd.

Previously the test for https://w3id.org/bundle/context passed, however
that preload was misconfigured and didn't work. Using webmock and a real
call to parse we can ensure that the configuration is correct and that
the preloading works.
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.

None yet

1 participant