-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
When extending a schema in folder names with spaces #100
Comments
Confirmed; this can be reproduced trivially by just trying to run the test suite from within a directory with spaces in the name: $ git clone git://github.com/hoxworth/json-schema.git 'json schema'
$ cd 'json schema' && rake
[snip]
Finished tests in 1.603910s, 420.8466 tests/s, 925.8624 assertions/s.
675 tests, 1485 assertions, 487 failures, 40 errors, 0 skips |
I was hoping #174 had resolved this, but it's still reproducible using the command I referenced above. Current results: $ rake
[snip]
580) Error:
JSONSchemaTest#test_file_ref:
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/pd/sauce/rb/json%20schema/test/schemas/good_schema_2.json
825 runs, 1241 assertions, 0 failures, 580 errors, 0 skips |
This is because we use Addressable::URI.convert_path('/some/path/foo bar').path
# => "/some/path/foo%20bar"
Addressable::URI.unescape(Addressable::URI.convert_path('/some/path/foo bar').path)
# => "/some/path/foo bar" I'll prepare a PR later. |
If a schema is extended from a schema in folder with spaces in the name, it cannot load the reference schema and throws
URI::InvalidURIError
.For example,
and
extended.json
The text was updated successfully, but these errors were encountered: