Data-Liberation-Front / csvlint.io

Check that your CSV files are valid
http://csvlint.io
MIT License
73 stars 12 forks source link

URL schemas failing when previously passed #230

Open quadrophobiac opened 9 years ago

quadrophobiac commented 9 years ago

If I use the URL http://theodi.github.io/hot-drinks/datapackage.json and the CSV from http://csvlint.io/schemas/531d9ae663737628d9340000 or https://raw.githubusercontent.com/theodi/hot-drinks/gh-pages/datapackage.json
I get an error of Empty Schema
If I use the URL https://github.com/theodi/hot-drinks/blob/gh-pages/datapackage.json I get a Malformed Schema error
The latter is expected
if you follow the steps detailed in Scenario: Load schema from a datapackage url(bundle exec cucumber features/datapackages.feature:29) but attempt to manually enter these steps you receive a Schema Empty error - inspecting the Schema object generates reveals that the @fields=[] array is empty In the cucumber test the Schema.from_json_table correctly receives the resources[0].schema portion of datapackage-with-schema.json as argument json
When manually uploading the json argument is the entirety of the datapackage

quadrophobiac commented 9 years ago

git checkout 0d98001d6e092eb1d715258989ca53f056eb60df for the point in csvlint.rb which the behaviour can be observed within