zmoazeni/harvested — pull request #60 by bloudermilk (2013-06-30 18:23:01+00:00)
Title: Adds preliminary support for OAuth 2.0

@zmoazeni thanks for maintaining such a helpful gem. Like the folks in #42 I need OAuth 2.0 support to use this in production, so I added that. My changes are backwards compatible except for some of the internals of `Credentials`. Notably, I decided to use HTTParty's `:basic_auth` option instead of computing the header ourselves. This can be changed back to the old style if for some reason people are using `Credentials` directly.

I introduced a new API for creating clients and recommend we deprecate the old positional argument style (though it still works).

```ruby
Harvest.client(username: "a", password: "b", subdomain: "c")

Harvest.client(access_token: "asd")
```

Other than the above, nothing else changes. Looking forward to hearing your feedback. Happy to make any changes to get this to your standards. At the very least, this PR still needs an updated README and tests for OAuth. Will add those if you intend to merge.