Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Force directory URLs to end with / (fixes #12) #13

Merged
merged 4 commits into from Nov 20, 2012

Conversation

Projects
None yet
2 participants

SLaks commented Nov 20, 2012

I modified the relevant test as well.

This fixes #12

SLaks commented Nov 20, 2012

Any idea why the build doesn't work on Node 0.6?

A regex is a bit heavy just to test the final char == /, no? I'm not concerned with performance so much as simplicity and readability.

I find a regex much simpler and more readable than the equivalent string manipulation

if (remainder.length && remainder.charAt(remainder.length - 1) === '/')

sp replied Nov 20, 2012

I prefer to use regexes only when necessary, but fix the grammar in line 116 and I'll merge.

Done.
I also changed the required Node version

Contributor

sp commented Nov 20, 2012

No idea - haven't looked into it. I'd suggest just dropping support for it in package.json.

SLaks commented Nov 20, 2012

Wait; I changed the wrong thing

SLaks commented Nov 20, 2012

The build finally passes 😄

@sp sp pushed a commit that referenced this pull request Nov 20, 2012

sp Merge pull request #13 from Unroll-Me/directory-redirect
Force directory URLs to end with / (fixes #12)
Drops v0.6 from Travis config to avoid failing build.
3d55aa5

@sp sp merged commit 3d55aa5 into capsela:master Nov 20, 2012

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment