Skip to content

Conversation

sashabelozerov
Copy link
Contributor

Fixes #474

Actually, not only fixes issue with trailing space, but removes last empty line (#[EOL]) at the end of routes map completely.

Example:
Instead of

# == Route Map # # Prefix Verb URI Pattern Controller#Action # root GET / main#index # [EOL] 

Now it will be

# == Route Map # # Prefix Verb URI Pattern Controller#Action # root GET / main#index 

Here is why this empty line occurred in the first place:
rake routes returns text with a new line character at the very end.
AnnotateRoutes treated this last empty line as a useful content and added # [EOL] because of it.

I decided to remove # [EOL], because specs show that it wasn't expected from the beginning. Specs passed only because there was an assumption that rake routes doesn't add new line character at the end, which is wrong.

@ctran ctran added this to the v2.7.3 milestone Jul 12, 2017
@ctran ctran merged commit 330f8bd into ctran:develop Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants