bower / registry

The Bower registry
https://registry.bower.io/packages
MIT License
292 stars 66 forks source link

Normalize GitHub urls #7

Closed sindresorhus closed 10 years ago

sindresorhus commented 11 years ago

Server should have some custom logic for GitHub to normalize urls to prevent duplicates and return consistent urls.

All these are valid GitHub clone urls:

git://github.com/sakabako/scrollMonitor.git
git://github.com/sakabako/scrollMonitor
https://github.com/sakabako/scrollMonitor.git
https://github.com/sakabako/scrollMonitor
git@github.com:sakabako/scrollMonitor.git
git@github.com:sakabako/scrollMonitor # not sure about this

They should be saved to one format.

satazor commented 11 years ago

I've made similar normalisation in the rewrite.

Trailing slashes should also be normalised:

git://github.com/sakabako/scrollMonitor.git/ -> git://github.com/sakabako/scrollMonitor.git
git://github.com/sakabako/scrollMonitor/ -> git://github.com/sakabako/scrollMonitor.git