passing --filter="...." correctly escapes the spaces into "%20" and not "+" #595
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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