Global controller specs #586
Cleanup
WIP
Global controller specs #586
Mocked controller's specs.
Removed generator_spec.
Made Adapters visible.
Current status concerning 1.0
CHANGELOG entry about VK changes, thanks to @makaroni4

Conflicts:
	CHANGELOG.md
Adds JIRA as an external provider (OAuth login) + Tests

Conflicts:
	spec/active_record/controller_oauth_spec.rb
	spec/rails_app/app/controllers/sorcery_controller.rb
	spec/rails_app/config/routes.rb
Store user_id in session as string

Currently we store in session `user.id` which in some cases is integer, but in
some cases (like Mongoid) is an object.
What's the problem with storing object? First thing, it might break
compatibility between different ORM versions (Mongoid changed class of this
object from v2 to v3). Second, the bigger issue, is that new serializer in Rails
uses JSON instead of YAML, so it can store only selected types, and it parses
custom objects incorrectly, which may break the authentication feature.

This commit changes the way we store user id to plain string. This will make it
being stored correctly no matter what serializer is used.
fix failing specs
Fixes the code highlights and reorganizes useful links with more proeminent one to first-steps
fix typo
feature/heroku_provider :: Heroku Oauth2 Provider, as per:
https://devcenter.heroku.com/articles/oauth#token-exchange
feature/expose_token :: Wanted to use sorcery as the authentication library with Oauth for external services, but needed to be able to access and store the user oauth token for use with other libraries, such as heroku's platform-api and github_api.

This commit does just that, by modifying get_user_hash to include the access_token token and refresh_token if present.  With a modified callback method on OauthsController, you can update the authentication to include the token and refresh token for later use:

  def callback
    provider = params[:provider]
    unless @user = login_from(provider)
      if @user = User.find_by_email(@user_hash[:email])
        @user.add_provider_to_user(provider, @user_hash[:uid])
      elsif current_user && @user = current_user
        current_user.add_provider_to_user(provider, @user_hash[:uid])
      elsif @user = create_from(provider)
        reset_session
      end
    end
    if @user
      Rails.logger.info @user_hash.inspect
      @user.send(provider).update_attributes(token: @user_hash[:token], refresh_token: @user_hash[:refresh_token])
      auto_login(@user)
      redirect_to root_path, :notice => "Logged in from #{provider.titleize}!"
    else
      redirect_to root_path, :alert => "Failed to login from #{provider.titleize}!"
    end
  end
feature/oauth_token :: Rename providers/base method from user_hash to auth_hash to avoid confusion. Add expires_at and expires_in to auth_hash.  Update all providers to use auth_hash method. Remove typo in Heroku documentation.
feature/oauth_token :: dup hash in providers/base auth_hash method so as to prevent mutation.
User.create_from_provider with empty password fix
Do not copy auth hash if there is no need

If `access_token` is nil, we do not want to modify the hash, therefore there's
no need to copy it