bundler/bundler — pull request #2850 by strzalek (2014-01-31 16:35:56+00:00)
Title: Custom git sources

Adds ability to register custom git sources like :github and :gist.

Example:

```ruby
register_git_source(:acme){ |repo_name| "git@git.acme.org:#{repo_name}.git" }

gem "secret", :acme => "strzalek/secret"
```

I work at the moment on the project in which we have custom wrapper methods around `gem` method. One sets ssh urls to github projects becouse `:github` option defined by bundler uses `git://` protocol and the port it uses is blocked on production, another one, which is very similar to github, just sets url for our github enterprise instance through ssh.

It makes our gemfile ugly.

This PR introduces nice solution to this problem. It adds ability to register custom sources as well as overwrite `:github` and `:gist` if you need to. What do you think?

On tech side - I'm not sure if `Dsl`'s `initializer` is a good place to set `:github` and `:gists` defaults. Is there be a better one? Also maybe just `git_source`, without `register_` prefix would be a better name?