<commit_before>evri_rpx
========
The `evri_rpx` library provides an wrapper around RPXNow's universal sign-on API. To learn more about this API, you can read up at [https://rpxnow.com/docs](https://rpxnow.com/docs)

![Sign-on Screen](https://rpxnow.com/images/rpxnow-virgin.jpg "RPXNow Sign-on screen")

Features
--------
 - Clean and simple API design
 - Full SSL certificate validation
 - Implements all RPX API calls, including ones available at the Pro level
 - 100% spec coverage
 - Clear documentation (and if not, let me know!)

TODO
----
 - Rails helper methods for building up the iframe/popup widget code.

Usage/Install
-------------
 - Grab an API key/account from [http://rpxnow.com](http://rpxnow.com)
 - As gem: `sudo gem install dbalatero-evri_rpx -s http://gems.github.com`
 - The gem will be on RubyForge soon, but their project request page is messed up, so no dice for now.

Examples
========

Here are examples of the features in `evri_rpx`. As well, you can browse the RDocs here: [http://rdoc.info/projects/dbalatero/evri_rpx](http://rdoc.info/projects/dbalatero/evri_rpx)

All interaction with the API goes through the public methods in `Evri::RPX::Session`, which often return complex objects. See [RDocs](http://rdoc.info/projects/dbalatero/evri_rpx) for all the methods available on these objects.

To see examples of raw JSON responses from RPX, see [http://github.com/dbalatero/evri_rpx/tree/master/spec/fixtures](http://github.com/dbalatero/evri_rpx/tree/master/spec/fixtures)

Validating tokens in your Rails app
-----------------------------------
    class RPXController < ApplicationController
      def process_token
        if params[:token].blank?
          flash[:notice] = 'You cancelled RPX login.'
          redirect_to root_url
          return
        end

        # Returns a User object.
        @user = rpx.auth_info(params[:token])
<commit_msg>Added new gem install to README.<commit_after>evri_rpx
========
The `evri_rpx` library provides an wrapper around RPXNow's universal sign-on API. To learn more about this API, you can read up at [https://rpxnow.com/docs](https://rpxnow.com/docs)

![Sign-on Screen](https://rpxnow.com/images/rpxnow-virgin.jpg "RPXNow Sign-on screen")

Features
--------
 - Clean and simple API design
 - Full SSL certificate validation
 - Implements all RPX API calls, including ones available at the Pro level
 - 100% spec coverage
 - Clear documentation (and if not, let me know!)

TODO
----
 - Rails helper methods for building up the iframe/popup widget code.

Usage/Install
-------------
 - Grab an API key/account from [http://rpxnow.com](http://rpxnow.com)
 - As gem: `sudo gem install evri_rpx`

Examples
========

Here are examples of the features in `evri_rpx`. As well, you can browse the RDocs here: [http://rdoc.info/projects/dbalatero/evri_rpx](http://rdoc.info/projects/dbalatero/evri_rpx)

All interaction with the API goes through the public methods in `Evri::RPX::Session`, which often return complex objects. See [RDocs](http://rdoc.info/projects/dbalatero/evri_rpx) for all the methods available on these objects.

To see examples of raw JSON responses from RPX, see [http://github.com/dbalatero/evri_rpx/tree/master/spec/fixtures](http://github.com/dbalatero/evri_rpx/tree/master/spec/fixtures)

Validating tokens in your Rails app
-----------------------------------
    class RPXController < ApplicationController
      def process_token
        if params[:token].blank?
          flash[:notice] = 'You cancelled RPX login.'
          redirect_to root_url
          return
        end

        # Returns a User object.
        @user = rpx.auth_info(params[:token])

{'fraction_non_alphanumeric': 0.13435281267067176, 'fraction_numerical': 0.0016384489350081922, 'mean_word_length': 3.1862857142857144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1302606', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1093, 'n_words': 367}