namae 0.10.2 → 0.11.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcec4ebe2e5cb74313b9160f78d28424be234fe4
4
- data.tar.gz: c594fa39e465008d9007b58f61e5e5cb7c2feb4f
3
+ metadata.gz: 4d9f2056c44415634fdd0b968119872820548867
4
+ data.tar.gz: 25b9ca58158c63a0e12b0dca520f709ca5f97e4f
5
5
  SHA512:
6
- metadata.gz: 835ea3e85eeb662665079a7ff6de9dd91e962675317e41cb52fc6e54da9825062abcbe2229ec91edccafc849088027975c03ba5b8c53bb824eabf35d50bbebb8
7
- data.tar.gz: ed0ae1629aa9939dbfafacf6b344741b6a433ab786faf7d5a9409d8ba3e9170b1257eec492f8d481946d1c8f55de6783668b7a9a5dc4bc279a6b357b45384de4
6
+ metadata.gz: d0f4bf53e0aebb1371ffd850e75ff108eb69c293f64bd6aaafd39533c53fb0902d60467bf201740f715109eb6230923fcbe91814c9bc8da2898e13f739231d6b
7
+ data.tar.gz: 8a8181d58ae478bbe2a9ea4fac39720f25a3721b058ace4ce4f1e159bc8b2528d0723759e7ce66b263048ed0c28001dea172af2c8fb3bc90117352a6d24f657f
@@ -11,7 +11,7 @@ rvm:
11
11
  - 2.0.0
12
12
  - 1.9.3
13
13
  - jruby
14
- - rbx-2
14
+ # - rbx-2
15
15
  notifications:
16
16
  email: false
17
17
  matrix:
@@ -20,6 +20,8 @@ Feature: Parse the names in the Readme file
20
20
  | Ms. Sofia Kovalevskaya | Sofia | | Kovalevskaya | | | Ms. | |
21
21
  | Countess Ada Lovelace | Ada | | Lovelace | | Countess | | |
22
22
  | Augusta Ada King | Augusta Ada | | King | | | | |
23
+ | Julia Herr | Julia | | Herr | | | | |
24
+ | Herr, Julia | Julia | | Herr | | | | |
23
25
 
24
26
  @readme @sort
25
27
  Scenarios: Readme examples (sort-order)
@@ -160,7 +160,11 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 107)
160
160
  when input.scan(suffix)
161
161
  consume_word(:SUFFIX, input.matched.strip)
162
162
  when input.scan(appellation)
163
- [:APPELLATION, input.matched.strip]
163
+ if @words.zero?
164
+ [:APPELLATION, input.matched.strip]
165
+ else
166
+ consume_word(:UWORD, input.matched)
167
+ end
164
168
  when input.scan(/((\\\w+)?\{[^\}]*\})*[[:upper:]][^\s#{stops}]*/)
165
169
  consume_word(:UWORD, input.matched)
166
170
  when input.scan(/((\\\w+)?\{[^\}]*\})*[[:lower:]][^\s#{stops}]*/)
@@ -251,7 +251,11 @@ require 'strscan'
251
251
  when input.scan(suffix)
252
252
  consume_word(:SUFFIX, input.matched.strip)
253
253
  when input.scan(appellation)
254
- [:APPELLATION, input.matched.strip]
254
+ if @words.zero?
255
+ [:APPELLATION, input.matched.strip]
256
+ else
257
+ consume_word(:UWORD, input.matched)
258
+ end
255
259
  when input.scan(/((\\\w+)?\{[^\}]*\})*[[:upper:]][^\s#{stops}]*/)
256
260
  consume_word(:UWORD, input.matched)
257
261
  when input.scan(/((\\\w+)?\{[^\}]*\})*[[:lower:]][^\s#{stops}]*/)
@@ -1,8 +1,8 @@
1
1
  module Namae
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 10
5
- PATCH = 2
4
+ MINOR = 11
5
+ PATCH = 0
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: namae 0.10.2 ruby lib
5
+ # stub: namae 0.11.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "namae".freeze
9
- s.version = "0.10.2"
9
+ s.version = "0.11.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Sylvester Keil".freeze, "Dan Collis-Puro".freeze]
14
- s.date = "2016-05-11"
14
+ s.date = "2016-06-20"
15
15
  s.description = " Namae (\u{540d}\u{524d}) is a parser for human names. It recognizes personal names of various cultural backgrounds and tries to split them into their component parts (e.g., given and family names, honorifics etc.). ".freeze
16
16
  s.email = ["sylvester@keil.or.at".freeze, "dan@collispuro.com".freeze]
17
17
  s.extra_rdoc_files = [
@@ -74,7 +74,7 @@ module Namae
74
74
 
75
75
  %w{Mr. Mr Mrs. Ms Herr Frau Miss}.each do |appellation|
76
76
  describe "the next token is #{appellation.inspect}" do
77
- before { parser.send(:input).string = appellation }
77
+ before { parser.reset.send(:input).string = appellation }
78
78
  it 'returns an APPELLATION token' do
79
79
  expect(parser.send(:next_token)).to eq([:APPELLATION, appellation])
80
80
  end
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.10.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-11 00:00:00.000000000 Z
12
+ date: 2016-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simplecov