pengwynn/octokit — pull request #184 by x3ro (2012-12-01 00:31:45+00:00)
Title: Code refactoring/cleanup based on suggestions from Code Climate

I did some more or less basic refactoring based on what Code Climate has been telling me :)

![](http://f.cl.ly/items/3B0S2h0s2l1g1q090J0e/Screen%20Shot%202012-12-01%20at%201.28.49%20AM.png)

[Code Climate](https://codeclimate.com/github/x3ro/octokit)

While doing that, I also found a "bug" in the specs: RSpec's `be_true` seems to consider everything that is not `nil` to be true ([or so they say](http://anaykamat.com/2010/05/30/rspec-matchers-be-careful-while-testing-boolean-values/)), which is why one might want to use `eq(true)` instead (?). Mentioned RSpec behavior caused it not to fail even when `remove_collaborator` returned the request object instead of a boolean (which is stated as the return type in the method comment).

If you have any suggestions or some of the changes are not to your "gusto", please let me know and I'll adapt the PR accordingly :smile: