namor 0.0.2 → 0.1.0
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.
- data/Guardfile +8 -0
- data/Rakefile +7 -0
- data/lib/namor/version.rb +1 -1
- data/spec/lib/namor_spec.rb +10 -0
- metadata +5 -4
data/Guardfile
ADDED
data/Rakefile
CHANGED
data/lib/namor/version.rb
CHANGED
data/spec/lib/namor_spec.rb
CHANGED
@@ -59,6 +59,16 @@ describe "name extract" do
|
|
59
59
|
it "should handle pathological cases" do
|
60
60
|
@namor.extract(", Mary Smith").should == ['MARY', 'SMITH', nil, 'MARY SMITH']
|
61
61
|
end
|
62
|
+
|
63
|
+
it "should squash multi-part last names" do
|
64
|
+
@namor.extract("Al Hassan, Bashar").should == ['BASHAR', nil, 'ALHASSAN', 'ALHASSAN,BASHAR']
|
65
|
+
@namor.extract("Bashar Al-Hassan").should == ['BASHAR', nil, 'ALHASSAN', 'ALHASSAN,BASHAR']
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should squash hyphenated first names" do
|
69
|
+
@namor.extract("Smith,Anne-Marie").should == ['ANNEMARIE', nil, 'SMITH', 'SMITH,ANNEMARIE']
|
70
|
+
end
|
71
|
+
|
62
72
|
end
|
63
73
|
|
64
74
|
describe "with cluster coding" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: namor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -84,6 +84,7 @@ extra_rdoc_files: []
|
|
84
84
|
files:
|
85
85
|
- .gitignore
|
86
86
|
- Gemfile
|
87
|
+
- Guardfile
|
87
88
|
- LICENSE
|
88
89
|
- README.md
|
89
90
|
- Rakefile
|
@@ -107,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
108
|
version: '0'
|
108
109
|
segments:
|
109
110
|
- 0
|
110
|
-
hash:
|
111
|
+
hash: 52459653516907226
|
111
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
113
|
none: false
|
113
114
|
requirements:
|
@@ -116,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
117
|
version: '0'
|
117
118
|
segments:
|
118
119
|
- 0
|
119
|
-
hash:
|
120
|
+
hash: 52459653516907226
|
120
121
|
requirements: []
|
121
122
|
rubyforge_project:
|
122
123
|
rubygems_version: 1.8.24
|