elixir-lang/elixir — pull request #1884 by madlep (2013-11-18 13:55:09+00:00)
Title: Fix mix new deps github comment

I Noticed that the example `github:` comment for `def deps` in generated `mix.exs` files caused an error if used as shown:

```
# To specify particular versions, regardless of the tag, do:
# { :barbat, "~> 0.1", github: "elixir-lang/barbat.git" }
```

note the `github` keyword is used, and the trailing `.git` on the partial path.

So let's fix the comment generated as part of `mix new` is fixed to use correct syntax for partial `github` dep paths.

Also, while we're at it, lets make the handling of `github` dep paths be foolproof, and handle deps declared both with the trailing `.git` suffix, and without. So `madlep/foobar` *and* `madlep/foobar.git` work as expected. e.g

```elixir
def deps do
[
{ :foobar, "~> 0.1", github: "madlep/foobar" }, # valid
{ :foobar, "~> 0.1", github: "madlep/foobar.git" }, # also valid now, but not before this change
]
end
```