icu_name 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 1e591eff0f6b945e8d28537d3c3bbfa0d96bd5112a3c4c523165ab82ae33ebc1
4
- data.tar.gz: 4c792884b907c9f13282dd70b2c36f5e6cf2890003f9ce6526673c5997672300
2
+ SHA1:
3
+ metadata.gz: b8bbf1c4c849f51c6ab2f47313c82d0d13152994
4
+ data.tar.gz: 9b4fe1734f14058592026aeed2674a1342ff35da
5
5
  SHA512:
6
- metadata.gz: 3c144bbdd14138152c909bdba39ff6f9694a8d4339a187e4f050c2ea5b4dfeeec18c210fb3832c8031e3acc30a6073d6c06cba8a41bc58b8023d95660f7b4958
7
- data.tar.gz: 87abf7022b4f36048896f8a8a30b44b5b1e06629b3ab5813a93ed469ca0e00ed5eb0638a9fb2cc648d445f210ea77b20e3dbd69c06929d035f9616fb95a7792f
6
+ metadata.gz: 69cbf7083eb2311fb91c6bdb3f46c964d5308e76f1dcfc481623a51661ab298f1ffeb3da949367ff452cbd712600addeaff11d2e940f0e5120c8949a8bb61318
7
+ data.tar.gz: acfdb0fc58b6ed2eb4d9f183428e2468e53751d57f36c68cbff666c4a511544d51456838c60ed7d5bed4995795029ed2d5d7ca86489e60ca50009abc03305762
@@ -66,6 +66,7 @@ module ICU
66
66
  # Match another name to this object, returning true or false.
67
67
  def match(name1='', name2='', opts={})
68
68
  other = Name.new(name1, name2)
69
+ return true if name == other.name
69
70
  match_first(first(opts), other.first(opts)) && match_last(last(opts), other.last(opts))
70
71
  end
71
72
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ICU
4
4
  class Name
5
- VERSION = "1.2.5"
5
+ VERSION = "1.2.6"
6
6
  end
7
7
  end
@@ -168,6 +168,23 @@ module ICU
168
168
  end
169
169
  end
170
170
 
171
+ context "nil last name" do
172
+ before(:each) do
173
+ @sarthak1 = Name.new('Sarthak Bathla', nil)
174
+ @sarthak2 = Name.new("Sarthak", "Bathla")
175
+ @sarthak3 = Name.new("Sarthak Bathla", "")
176
+ end
177
+
178
+ it "should match concatenation of first and last name" do
179
+ [@sarthak1, @sarthak2, @sarthak3].each do |sarthak|
180
+ expect(sarthak.match("Sarthak", "Bathla")).to be_truthy
181
+ expect(sarthak.match("Sarthak Bathla", "")).to be_truthy
182
+ expect(sarthak.match("", "Sarthak Bathla")).to be_truthy
183
+ end
184
+ end
185
+ end
186
+
187
+
171
188
  context "accented characters and capitalisation" do
172
189
  it "should downcase upper case accented characters where appropriate" do
173
190
  name = Name.new('GEARÓIDÍN', 'UÍ LAIGHLÉIS')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icu_name
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Orr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-03 00:00:00.000000000 Z
11
+ date: 2019-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: 1.3.6
109
109
  requirements: []
110
110
  rubyforge_project: icu_name
111
- rubygems_version: 2.7.8
111
+ rubygems_version: 2.6.10
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Canonicalises and matches person names