Fix a violation of attr_accessible.
Load dependencies lazily. In particular, don't load active_record in the main lib file; this is so we can use OAuth2::Provider.access_token_from request in projects that don't use ActiveRecord.
Test that ResourceOwner#grant_access returns the same owner object as it was called on.
Move authorization find/create for client to model

By defining the class method and calling it through the association
Active Record automatically assigns the owner so it's not needed in
grant_access!

By using attr_accessible :client it allows passing the client through
the attributes hash but prevents injected params assigning client_id.
The is_a? check is not strictly necessary as Active Record will blow
up when trying to assign a literal to a association, it's just there
to provide a more helpful error message.

It may be preferable to use create! rather than create in
find_or_create_for_client as no checking is done to see whether the
save was successful.
Ensure that authorization owner is the same instance

If only support for Active Record 3 were needed then we could use
:inverse_of on the association definition to set the owner to be
the same instance. Since backwards compatibility to Active Record 2.2
is required the same effect can be achieved by using an association
extension module to manually set the instance.
Failing spec for saving Authorizations.
Remove failing test, check that ResourceOwner#grant_access actually creates an Authorization.
Add support for appraisals gem

Use the appraisals gem to test against multiple versions of
Active Record. Rails 2.2 is not compatible with Ruby 1.9.x so
these tests are excluded.
Only run ActiveRecord 2.2 tests on Ruby 1.8
Change names to reflect dependency is Active Record not Rails
Remove rdoc task and dependency.
Add a logger to prevent error with mass-assignment logging in AR 2.2
ResourceOwner.grant_access was not creating Authorizations on Rails 2.3 and 3.0.
Make Time.now return the same value throughout every test.
Use 'build' instead of 'new' in ResourceOwner.grant_access.
Sort out encoding of bcrypt hashes so sqlite doesn't complain during tests.
Change schema to using actual migrations that can be added to over time.
Remove a bit of logging.
Check db file exists before deleting it.
Add :duration option to ResourceOwner#grant_access.