twitter/bower — pull request #268 by josh (2013-02-22 21:49:13+00:00)
Title: component.json package name should be authoritative

Noticed a regression with my usage of bower in 0.7.

00aaeb9305e3941a8ab560d42c2050fb0f945a1a changed how the package name from the `component.json` is used. Prior whatever was declared in the `component.json` would be used when installing.

Theres 2 use cases here for the old behavior.

1. When installing from a git url, bower makes an attempt to "guess" the package name from the url. This can often be wrong and the declared `component.json` name won't be used. Say if you forked a project, named it differently on github, it'd always install as the forked identifier. `bower install git://github.com/josh/jquery-bower.git` would install into `components/jquery-bower` when the name ought to just be `jquery`.
2. Its actually pretty useful to intentionally have different names in the registry and the json file. Its similar to the forking case. I have a modernizr fork registered as [`sprockets-modernizr`](github.com/josh/sprockets-modernizr). But I still want it to satisfy the `modernizr` dependency should anything require Modernizr.

The previous commit doesn't seem to intentionally want to change this behavior, but did so because of separate dependency resolution bug. Though, I don't see any tests covering that fix. With this change everything is still green.

/cc @satazor @Caged @Nami-Doc @manuel-woelker

Related 00aaeb9305e3941a8ab560d42c2050fb0f945a1a, #205