trufina 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/CHANGELOG +16 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +179 -0
- data/Rakefile +54 -0
- data/TODO +5 -0
- data/VERSION +1 -0
- data/init.rb +1 -0
- data/lib/config.rb +64 -0
- data/lib/elements.rb +203 -0
- data/lib/exceptions.rb +15 -0
- data/lib/requests.rb +139 -0
- data/lib/responses.rb +86 -0
- data/lib/trufina.rb +153 -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 +20 -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.gemspec +73 -0
- data/trufina.yml.template +31 -0
- metadata +95 -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
|
data/trufina.gemspec
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{trufina}
|
8
|
+
s.version = "0.2.5"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Kali Donovan"]
|
12
|
+
s.date = %q{2009-10-14}
|
13
|
+
s.description = %q{Provides a DSL to easily interact with the XML API offered by Trufina.com, an identity verification company.}
|
14
|
+
s.email = %q{kali.donovan@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".gitignore",
|
20
|
+
"CHANGELOG",
|
21
|
+
"MIT-LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"TODO",
|
25
|
+
"VERSION",
|
26
|
+
"init.rb",
|
27
|
+
"lib/config.rb",
|
28
|
+
"lib/elements.rb",
|
29
|
+
"lib/exceptions.rb",
|
30
|
+
"lib/requests.rb",
|
31
|
+
"lib/responses.rb",
|
32
|
+
"lib/trufina.rb",
|
33
|
+
"rails/init.rb",
|
34
|
+
"tasks/trufina_tasks.rake",
|
35
|
+
"test/fixtures/requests/access_request.xml",
|
36
|
+
"test/fixtures/requests/info_request.xml",
|
37
|
+
"test/fixtures/requests/login_info_request.xml",
|
38
|
+
"test/fixtures/requests/login_request.xml",
|
39
|
+
"test/fixtures/requests/login_request_simple.xml",
|
40
|
+
"test/fixtures/responses/access_notification.xml",
|
41
|
+
"test/fixtures/responses/access_response.xml",
|
42
|
+
"test/fixtures/responses/info_response.xml",
|
43
|
+
"test/fixtures/responses/login_info_response.xml",
|
44
|
+
"test/fixtures/responses/login_response.xml",
|
45
|
+
"test/fixtures/schema.xsd",
|
46
|
+
"test/test_helper.rb",
|
47
|
+
"test/trufina_test.rb",
|
48
|
+
"trufina.gemspec",
|
49
|
+
"trufina.yml.template"
|
50
|
+
]
|
51
|
+
s.homepage = %q{http://github.com/kdonovan/trufina}
|
52
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
53
|
+
s.require_paths = ["lib"]
|
54
|
+
s.rubygems_version = %q{1.3.5}
|
55
|
+
s.summary = %q{DSL to easily interact with Trufina's verification API}
|
56
|
+
s.test_files = [
|
57
|
+
"test/test_helper.rb",
|
58
|
+
"test/trufina_test.rb"
|
59
|
+
]
|
60
|
+
|
61
|
+
if s.respond_to? :specification_version then
|
62
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
63
|
+
s.specification_version = 3
|
64
|
+
|
65
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
66
|
+
s.add_runtime_dependency(%q<kdonovan-happymapper>, [">= 0"])
|
67
|
+
else
|
68
|
+
s.add_dependency(%q<kdonovan-happymapper>, [">= 0"])
|
69
|
+
end
|
70
|
+
else
|
71
|
+
s.add_dependency(%q<kdonovan-happymapper>, [">= 0"])
|
72
|
+
end
|
73
|
+
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,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: trufina
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kali Donovan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-10-14 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: kdonovan-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
|
+
- CHANGELOG
|
36
|
+
- MIT-LICENSE
|
37
|
+
- README.rdoc
|
38
|
+
- Rakefile
|
39
|
+
- TODO
|
40
|
+
- VERSION
|
41
|
+
- init.rb
|
42
|
+
- lib/config.rb
|
43
|
+
- lib/elements.rb
|
44
|
+
- lib/exceptions.rb
|
45
|
+
- lib/requests.rb
|
46
|
+
- lib/responses.rb
|
47
|
+
- lib/trufina.rb
|
48
|
+
- rails/init.rb
|
49
|
+
- tasks/trufina_tasks.rake
|
50
|
+
- test/fixtures/requests/access_request.xml
|
51
|
+
- test/fixtures/requests/info_request.xml
|
52
|
+
- test/fixtures/requests/login_info_request.xml
|
53
|
+
- test/fixtures/requests/login_request.xml
|
54
|
+
- test/fixtures/requests/login_request_simple.xml
|
55
|
+
- test/fixtures/responses/access_notification.xml
|
56
|
+
- test/fixtures/responses/access_response.xml
|
57
|
+
- test/fixtures/responses/info_response.xml
|
58
|
+
- test/fixtures/responses/login_info_response.xml
|
59
|
+
- test/fixtures/responses/login_response.xml
|
60
|
+
- test/fixtures/schema.xsd
|
61
|
+
- test/test_helper.rb
|
62
|
+
- test/trufina_test.rb
|
63
|
+
- trufina.gemspec
|
64
|
+
- trufina.yml.template
|
65
|
+
has_rdoc: true
|
66
|
+
homepage: http://github.com/kdonovan/trufina
|
67
|
+
licenses: []
|
68
|
+
|
69
|
+
post_install_message:
|
70
|
+
rdoc_options:
|
71
|
+
- --charset=UTF-8
|
72
|
+
require_paths:
|
73
|
+
- lib
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
version:
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: "0"
|
85
|
+
version:
|
86
|
+
requirements: []
|
87
|
+
|
88
|
+
rubyforge_project:
|
89
|
+
rubygems_version: 1.3.5
|
90
|
+
signing_key:
|
91
|
+
specification_version: 3
|
92
|
+
summary: DSL to easily interact with Trufina's verification API
|
93
|
+
test_files:
|
94
|
+
- test/test_helper.rb
|
95
|
+
- test/trufina_test.rb
|