CashStar/nap — pull request #4 by mcordes (2014-09-08 15:32:08+00:00)
Title: fix lame handling of slashes when joining base url and resource uri

Hi guys,

Nap could do a better job constructing a resources url from the root_url and the resource uri. Currently nap just smashes the two together and hopes for the best. This change adds a little more intelligence in an effort to make the resulting url nicer.

Note that nap has the option 'add_slash'. Although this sounds related it's not. This deal with a trailing slash on the entire url and isn't relevant here.

The fix ensures there's always a single slash (/) between the root_url and resource uri. I believe this makes sense in all cases and seems to work in my testing.