persvr / rql

Resource Query Language
http://www.persvr.org/
269 stars 49 forks source link

Fix handling of ISO dates #46

Closed khamasaki closed 10 years ago

khamasaki commented 10 years ago

This fixes #30. When passing in a comparison such as ?property=date:2010-01-01T00:00:00Z, an exception was thrown because the date string was being truncated to 2010-01-01T00 prior to being passed to the converter function. This was due to an improper use of the String.split method.

While writing a unit test for this fix, I noticed that the unit test suite was not running correctly, as I could not get my test to fail no matter what I did, despite it clearly failing in my running application. As it turns out, the test runner was running only the very last test from the queryPairs collection, but running it multiple times. I fixed this as well, which had a side-effect of causing two existing tests to fail (now that these tests were in fact actually executing, they turned out to be failing). I fixed those as best as I could, but the first one in particular I fixed only by a workaround of adding parentheses to the entire expression.

neonstalwart commented 10 years ago

thanks for fixing the tests. it seems there are some failures on IE8 that i'm looking into now. contributions require a CLA, have you filled one out?

neonstalwart commented 10 years ago

@khamasaki i opened #47 which builds on top of this PR to get tests passing on IE8 and fix other minor issues.

if you could sign a CLA then we can consider merging it. thanks.

khamasaki commented 10 years ago

Hi, thanks for considering my pull request and fixing it to run on IE8. I signed the individual CLA, but I have to wait for our company to review the corporate one.