stormpath/stormpath-sdk-ruby — pull request #64 by DamirSvrtan (2014-07-15 23:19:29+00:00)
Title: Provider Integration + RSpec3 update + Test on 3 Ruby versions

Hey Elder,

As requested this PR includes 3 features:
- Provider Integration
- RSpec3 support
- Updates specs for testing 3 Ruby versions in parallel on TravisCI

I've described the Provider Integration feature on the last pull request that we eventually split into two parts:
The syntax for creating a auth request(this can be viewed also at [The Sinatra Sample app](https://github.com/DamirSvrtan/stormpath-sinatra-sample/blob/master/routes/omniauth.rb) :

```ruby
request = Stormpath::Provider::AccountRequest.new(:facebook, :access_token, 'xyszsadad2323')
result = settings.application.get_provider_account(request)
result.is_new_account?
puts result.account.email
```

And creating a directory is standard as before just with extra info:

```ruby
directory = client.directories.create({
name: 'MyFacebookDirectory',
description: 'My First FB Dir.',
provider: {
client_id: '85733424235s',
client_secret: 'Wda934msiaQ',
redirect_uri: 'https://myapplication.com/auth/facebook/callback',
provider_id: :facebook }
})
```

I wouldn't make constants like Provider::GOOGLE and similar since symbols in Ruby are immutable and are perfect for this job. This will accept a string also, so as long as it says 'facebook' or 'google' after a #to_s method call, everything is fine.

You will see the provider changes in the lib/provider dir. There are also three other folders inside, holding special classes for Facebook/Google/Stormpath Provider and ProviderData classes. The Stormpath classes are made just so it would be more consistent with everything else (look at the proc calls in the Directory and Account resources), but i have no problem removing them. However they can be convenient if there is a decision in the future that the StormpathProvider or StormpathProviderData classes hold something else besides a href, provider_id and timestamps.

Again, the specs are failing because I'm not sending you out my keys in the .travis.yml. I have a branch in my repo that is like this one + a commit with changed keys. You can see the specs [here](https://travis-ci.org/DamirSvrtan/stormpath-sdk-ruby/builds/30028308). Sorry for the delay and sorry for possibly doing heavy requests on your servers, but with the configuration of specs we have right now, the whole test suite is run on three different versions of Ruby in parallel and this will happen every time you push a new commit. [There is a way](http://docs.travis-ci.com/user/how-to-skip-a-build/) to avoid this happening when you are just editing some documentation or making similar actions that don't effect the code.