octokit/octokit.rb — pull request #349 by catsby (2013-12-02 14:51:04+00:00)
Title: Rescue from NoMethodError when trying to load missing netrc

If you try to authenticate with `netrc` credentials and there's no entry in the `netrc` file for the given api endpoint, Octokit throws an unhelpful error:

```ruby
>> c = Octokit::Client.new netrc: true
NoMethodError: undefined method `shift' for nil:NilClass
from /Users/clint/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-2.6.1/lib/octokit/authentication.rb:61:in `login_from_netrc'
from /Users/clint/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-2.6.1/lib/octokit/client.rb:91:in `initialize'
from (irb):4:in `new'
from (irb):4
from /Users/clint/.rbenv/versions/2.0.0-p247/bin/irb:12:in `

'
```

With this patch, output changed to this:

```ruby
>> c = Octokit::Client.new netrc: true
Error loading credentials from netrc file for https://api.github.com/
#