Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement path collapsing #60

Merged
merged 19 commits into from
Sep 6, 2013
Merged

implement path collapsing #60

merged 19 commits into from
Sep 6, 2013

Conversation

chadwhitacre
Copy link
Contributor

This is a follow-on from #57.

This adds a Travis badge to our README, using origin.shields.io.
We build our own virtualenv and we want Travis CI to use that instead of
its own.
This includes more tests. Next step is to wire this up in an Aspen hook
to run at request time.
This applies the util from the last commit to the Aspen request
processing cycle.
This gives us an environment for testing
@chadwhitacre
Copy link
Contributor Author

Okay @olivierlacan, with this PR we:

  • Redirect any URL with %2F in it to the same location with / instead.
  • Collapse any path parts beyond the first into the final PNG filename.

So ...

https://shields.io/foo/bar%2Fbaz.png

... will redirect to ...

https://shields.io/foo/bar/baz.png

... and that will be served as if it had been a request for a bar%2Fbaz.png file (namely, the right side of the badge will read bar/baz.

Does that sound like the behavior we're after?

I wrote this comment before deciding to just write another test for what
the comment was presuming.
@olivierlacan
Copy link
Member

@whit537 That's quite jolly good my friend. 👍

@chadwhitacre
Copy link
Contributor Author

Cool, once I convince Travis that these tests pass I'll merge and deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants