Ruby interface to the IDology API
Switch branches/tags
Nothing to show
Pull request Compare This branch is 7 commits ahead, 1 commit behind pdsphil:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


== Installation

Reference the ruby_idology repo in the main project Gemfile. Make sure you have require 'false' set. Otherwise the gem will load and there is an issue with a nil value for Rails.env if the gem loads early.

  gem 'ruby_idology', :path => '~/Documents/programming/projects/ruby_idology', :require => false

Create the path in the main project: app_root/config/ruby_idology.
Copy the ruby_idology_config.yml.example to the directory above (remove .example of course!).
Set the credentials as appropriate in the above yml file. 
When you want to access the gems functionlity, require it: "require 'ruby_idology'"

== Notes

This code has come straight from a production Rails app. It will soon be a Rails plugin, but for now, I suggest putting it in the lib/ directory of your Rails project.

You must have a valid IDology account to test or use this API library.

== ID Verification via IDology

Assuming you have a local proxy setup to the development server - and the development server's IP is authorized to access the IDology API - here is a curl command to test whether or not the API is working correctly. In this example, the socks v5 proxy is using 'ssh -D localhost:1080' to setup a temporary proxy between the development machine and the development server. Note that the username / password must be correct.

This curl command will perform a search for 'Mickey Mouse' - a valid test record in the IDology system

curl -v --socks -d username=test -d password=test -d firstName=mickey -d lastName=mouse -d address='15 MIDLAND AVE APT' -d city=paramus -d state=NJ -d zip=07652

== Configuration

The id_verification directory must contain a file called 'config.yml' using the following format:

# IDology API username and password
username: your_api_username
password: your_api_password

It is recommended that you symlink this file to the directory after deploy for security reasons. This file is also required for development mode - just fill with dummy data.

== Tests
To run tests
  cd to id_verification directory
  run 'rspec spec'

== DK Notes
to use:
  run irb
    load 'id_verification.rb'
    include API::Base
    include API::IDVerification

    # check if subject exists in idology system