Open thebravoman opened 1 year ago
Did you check why the CI isn't happy ?
I did. It was too much and I could not directly see the connection between the change and the fails.
Let me know what you think about the PR. If you think it is in the right direction I could invest some time to understand why the specs fail.
you're right failures, seems quite unrelated
please have a look at https://github.com/jejacks0n/teaspoon/pull/597
and please rebase once merged
adding a test to reproduce the problem you are fixing would be great
Thanks for the feedback. Now as this makes sense I will think of a spec, rebase and clean up the teaspoon.gemspec
please update your branch with latest master
PR created against 1.2.2
Running teaspoon as
When using CGI.escape the string "ScenePointers are attached" becomes "ScenePointesr+are+attached" This is then passed as a "grep=ScenePointers+are+attached" into the url
In the JS that is running the specs in the browser the value of the grep is used to filter. We move through all the specs and encode their full name with encodeURIComponent
The result is
This means that on the ruby side we were escaping the space " " in the urls as '+' and on the JS side we were escaping them as "%20". One of these had to change and it seems changing it on the ruby side is the right one.
There is no right way to escape. We can use 'addressable' and URI and CGI and ERB. ERB seems to be the most straightforward for this case, it also does not bring a lot of dependencies. Just one - 'cgi'.
In the same time there seems to be no method in URI or CGI or 'addressable' gem that would address this