kdonovan-trufina 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/CHANGELOG +3 -0
  2. data/VERSION +1 -1
  3. data/lib/elements.rb +9 -0
  4. data/trufina.gemspec +2 -2
  5. metadata +2 -2
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 0.2.3 [September 07, 2009]
2
+ * Added a to_s method for Trufina::Elements::Name and Trufina::Elements::ResidenceAddressResponse
3
+
1
4
  0.2.2 [September 04, 2009]
2
5
  * Fixed bug in present_and_verified where it choked handling arrays
3
6
  * API Change: modified present_and_verified return value to be more direct (nested hashes rather than alternating hashes and arrays of hashes)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/lib/elements.rb CHANGED
@@ -106,6 +106,11 @@ class Trufina
106
106
  element :middle_initial, String, :tag => 'MiddleInitial', :attributes => RESPONSE_XML_ATTRIBUTES
107
107
  element :last, String, :tag => 'Surname', :attributes => RESPONSE_XML_ATTRIBUTES
108
108
  element :suffix, String, :tag => 'Suffix', :attributes => RESPONSE_XML_ATTRIBUTES
109
+
110
+ def to_s
111
+ name_parts = self.class.elements.map(&:method_name)
112
+ name_parts.collect {|name_part| self.send(name_part) }.compact.join(' ')
113
+ end
109
114
  end
110
115
 
111
116
  # Encapsulates Trufina's address fields - has multiple street address fields
@@ -125,6 +130,10 @@ class Trufina
125
130
  self.street_addresses ||= []
126
131
  self.street_addresses << adr
127
132
  end
133
+
134
+ def to_s
135
+ [street_addresses[0], street_addresses[1], city, state, zip].compact.join(', ')
136
+ end
128
137
  end
129
138
 
130
139
  # Encapsulates Trufina's address fields - only one street address field
data/trufina.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{trufina}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kali Donovan"]
12
- s.date = %q{2009-09-06}
12
+ s.date = %q{2009-09-07}
13
13
  s.description = %q{Provides a DSL to easily interact with the XML API offered by Trufina.com, an identity verification company.}
14
14
  s.email = %q{kali.donovan@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kdonovan-trufina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kali Donovan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-06 00:00:00 -07:00
12
+ date: 2009-09-07 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency