namae 0.6.0 → 0.7.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/lib/namae/parser.rb +6 -2
- data/lib/namae/parser.y +6 -2
- data/lib/namae/version.rb +1 -1
- data/namae.gemspec +1 -1
- metadata +2 -2
data/lib/namae/parser.rb
CHANGED
@@ -121,11 +121,15 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 90)
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def will_see_suffix?
|
124
|
-
input.peek(8).to_s.split(/\s+/)[0] =~ suffix
|
124
|
+
input.peek(8).to_s.strip.split(/\s+/)[0] =~ suffix
|
125
125
|
end
|
126
126
|
|
127
|
+
def will_see_initial?
|
128
|
+
input.peek(6).to_s.strip.split(/\s+/)[0] =~ /[[:alpha:]]\./
|
129
|
+
end
|
130
|
+
|
127
131
|
def seen_full_name?
|
128
|
-
prefer_comma_as_separator? && @words > 1
|
132
|
+
prefer_comma_as_separator? && @words > 1 && !will_see_initial?
|
129
133
|
end
|
130
134
|
|
131
135
|
def next_token
|
data/lib/namae/parser.y
CHANGED
@@ -195,11 +195,15 @@ require 'strscan'
|
|
195
195
|
end
|
196
196
|
|
197
197
|
def will_see_suffix?
|
198
|
-
input.peek(8).to_s.split(/\s+/)[0] =~ suffix
|
198
|
+
input.peek(8).to_s.strip.split(/\s+/)[0] =~ suffix
|
199
199
|
end
|
200
200
|
|
201
|
+
def will_see_initial?
|
202
|
+
input.peek(6).to_s.strip.split(/\s+/)[0] =~ /[[:alpha:]]\./
|
203
|
+
end
|
204
|
+
|
201
205
|
def seen_full_name?
|
202
|
-
prefer_comma_as_separator? && @words > 1
|
206
|
+
prefer_comma_as_separator? && @words > 1 && !will_see_initial?
|
203
207
|
end
|
204
208
|
|
205
209
|
def next_token
|
data/lib/namae/version.rb
CHANGED
data/namae.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: namae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
segments:
|
149
149
|
- 0
|
150
|
-
hash: -
|
150
|
+
hash: -219042018557465799
|
151
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
152
|
none: false
|
153
153
|
requirements:
|