kdonovan-trufina 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +116 -0
- data/Rakefile +53 -0
- data/TODO +8 -0
- data/VERSION +1 -0
- data/init.rb +1 -0
- data/lib/config.rb +62 -0
- data/lib/elements.rb +170 -0
- data/lib/exceptions.rb +15 -0
- data/lib/requests.rb +132 -0
- data/lib/responses.rb +90 -0
- data/lib/trufina.rb +143 -0
- data/rails/init.rb +12 -0
- data/tasks/trufina_tasks.rake +4 -0
- data/test/fixtures/requests/access_request.xml +16 -0
- data/test/fixtures/requests/info_request.xml +6 -0
- data/test/fixtures/requests/login_info_request.xml +6 -0
- data/test/fixtures/requests/login_request.xml +32 -0
- data/test/fixtures/requests/login_request_simple.xml +11 -0
- data/test/fixtures/responses/access_notification.xml +5 -0
- data/test/fixtures/responses/access_response.xml +13 -0
- data/test/fixtures/responses/info_response.xml +19 -0
- data/test/fixtures/responses/login_info_response.xml +15 -0
- data/test/fixtures/responses/login_response.xml +5 -0
- data/test/fixtures/schema.xsd +1064 -0
- data/test/test_helper.rb +15 -0
- data/test/trufina_test.rb +8 -0
- data/trufina.yml.template +31 -0
- metadata +92 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_support/test_case'
|
4
|
+
require 'ostruct'
|
5
|
+
|
6
|
+
# Renders the appropriate template for the specified method call
|
7
|
+
def render(template_name, template_vars = {})
|
8
|
+
template_file = File.join(File.dirname(__FILE__), 'fixtures', 'requests', "#{template_name}.xml")
|
9
|
+
raise TrufinaException.new("Unable to find fixture file: #{template_file}") unless File.exists?(template_file)
|
10
|
+
|
11
|
+
template_binding_object = OpenStruct.new(template_vars)
|
12
|
+
|
13
|
+
template = ERB.new(File.read(template_file))
|
14
|
+
template.result(template_binding_object.get_binding)
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Your Trufina credentials
|
2
|
+
credentials:
|
3
|
+
PID: YOUR_DATA_HERE # Partner ID
|
4
|
+
PAK: YOUR_DATA_HERE # Partner Authentication Key
|
5
|
+
|
6
|
+
# Your username and password to access the staging website
|
7
|
+
# Note: only required for staging/demo use
|
8
|
+
staging_access:
|
9
|
+
username: YOUR_DATA_HERE
|
10
|
+
password: YOUR_DATA_HERE
|
11
|
+
|
12
|
+
# Default URLs to redirect user to after they complete the registration process
|
13
|
+
# Note - can be overridden on a per-request basis if desired
|
14
|
+
endpoints:
|
15
|
+
cancel: YOUR_DATA_HERE
|
16
|
+
success: YOUR_DATA_HERE
|
17
|
+
failure: YOUR_DATA_HERE
|
18
|
+
|
19
|
+
# Run mode (hit the production or staging servers at Trufina)
|
20
|
+
# Optional -- otherwise defaults to staging unless installed in a
|
21
|
+
# Rails application with RAILS_ENV == 'production' or a Merb app
|
22
|
+
# with MERB_ENV == 'production'.
|
23
|
+
#
|
24
|
+
# The YML file is run through Erb before being processed, so you can
|
25
|
+
# put arbitrary logic in <%= %> tags for this value as long as the output
|
26
|
+
# is one of 'staging' or 'production'.
|
27
|
+
#
|
28
|
+
# Also note that this can be set explicitly via Trufina::Config.staging!
|
29
|
+
# or Trufina::Config.production!
|
30
|
+
#
|
31
|
+
mode:
|
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kdonovan-trufina
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kali Donovan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-09-02 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: jimmyz-happymapper
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
description: Provides a DSL to easily interact with the XML API offered by Trufina.com, an identity verification company.
|
26
|
+
email: kali.donovan@gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README.rdoc
|
33
|
+
files:
|
34
|
+
- .gitignore
|
35
|
+
- MIT-LICENSE
|
36
|
+
- README.rdoc
|
37
|
+
- Rakefile
|
38
|
+
- TODO
|
39
|
+
- VERSION
|
40
|
+
- init.rb
|
41
|
+
- lib/config.rb
|
42
|
+
- lib/elements.rb
|
43
|
+
- lib/exceptions.rb
|
44
|
+
- lib/requests.rb
|
45
|
+
- lib/responses.rb
|
46
|
+
- lib/trufina.rb
|
47
|
+
- rails/init.rb
|
48
|
+
- tasks/trufina_tasks.rake
|
49
|
+
- test/fixtures/requests/access_request.xml
|
50
|
+
- test/fixtures/requests/info_request.xml
|
51
|
+
- test/fixtures/requests/login_info_request.xml
|
52
|
+
- test/fixtures/requests/login_request.xml
|
53
|
+
- test/fixtures/requests/login_request_simple.xml
|
54
|
+
- test/fixtures/responses/access_notification.xml
|
55
|
+
- test/fixtures/responses/access_response.xml
|
56
|
+
- test/fixtures/responses/info_response.xml
|
57
|
+
- test/fixtures/responses/login_info_response.xml
|
58
|
+
- test/fixtures/responses/login_response.xml
|
59
|
+
- test/fixtures/schema.xsd
|
60
|
+
- test/test_helper.rb
|
61
|
+
- test/trufina_test.rb
|
62
|
+
- trufina.yml.template
|
63
|
+
has_rdoc: false
|
64
|
+
homepage: http://github.com/kdonovan/trufina
|
65
|
+
licenses:
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options:
|
68
|
+
- --charset=UTF-8
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: "0"
|
76
|
+
version:
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: "0"
|
82
|
+
version:
|
83
|
+
requirements: []
|
84
|
+
|
85
|
+
rubyforge_project:
|
86
|
+
rubygems_version: 1.3.5
|
87
|
+
signing_key:
|
88
|
+
specification_version: 3
|
89
|
+
summary: DSL to easily interact with Trufina's verification API
|
90
|
+
test_files:
|
91
|
+
- test/test_helper.rb
|
92
|
+
- test/trufina_test.rb
|