openjournals-nameable 1.1.7 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +3 -3
- data/Gemfile.lock +19 -17
- data/README.md +2 -36
- data/lib/nameable/version.rb +1 -1
- data/nameable.gemspec +3 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 461134c0f6eb95784e56d87c8cf28be522b50b22f2b5664920015ec727dbe738
|
4
|
+
data.tar.gz: 44c5ddbd1a4d5a23e45bea3f066b1cf2749cbd082939584d7d7495c086e4526c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9bb3093fc1d1ccd31aadcb509ebee9ec8c54e0574c659e5286f1cde4155ca0db979cd9fe75c534c252a8b13875ee8c2ee64e5f10c25b7b314195fe49a90d8ef
|
7
|
+
data.tar.gz: d3a902a41ab391fb44fb64c954a935191b2bed224751d3429438544437a5e4d8cc0b2368f267fee4bb2b6fbd30e97915d6a6984fc8520f65b13a8e59c0270d1f
|
data/.github/workflows/tests.yml
CHANGED
@@ -7,13 +7,13 @@ jobs:
|
|
7
7
|
continue-on-error: ${{ matrix.failure-allowed }}
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby-version: ['
|
10
|
+
ruby-version: ['3.0.6', '3.1.4', '3.2.3', '3.3.0']
|
11
11
|
failure-allowed: [false]
|
12
12
|
include:
|
13
13
|
- ruby-version: 'truffleruby'
|
14
14
|
failure-allowed: true
|
15
15
|
steps:
|
16
|
-
- uses: actions/checkout@
|
16
|
+
- uses: actions/checkout@v4
|
17
17
|
- name: Set up Ruby
|
18
18
|
uses: ruby/setup-ruby@v1
|
19
19
|
with:
|
@@ -22,4 +22,4 @@ jobs:
|
|
22
22
|
- name: Run tests
|
23
23
|
run: |
|
24
24
|
ruby -v
|
25
|
-
bundle exec rspec
|
25
|
+
bundle exec rspec
|
data/Gemfile.lock
CHANGED
@@ -1,33 +1,35 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openjournals-nameable (1.
|
4
|
+
openjournals-nameable (1.2.0)
|
5
|
+
csv
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
8
9
|
specs:
|
9
|
-
|
10
|
+
csv (3.2.8)
|
11
|
+
diff-lcs (1.5.1)
|
10
12
|
docile (1.4.0)
|
11
|
-
rake (13.0
|
12
|
-
rspec (3.
|
13
|
-
rspec-core (~> 3.
|
14
|
-
rspec-expectations (~> 3.
|
15
|
-
rspec-mocks (~> 3.
|
16
|
-
rspec-core (3.
|
17
|
-
rspec-support (~> 3.
|
18
|
-
rspec-expectations (3.
|
13
|
+
rake (13.1.0)
|
14
|
+
rspec (3.13.0)
|
15
|
+
rspec-core (~> 3.13.0)
|
16
|
+
rspec-expectations (~> 3.13.0)
|
17
|
+
rspec-mocks (~> 3.13.0)
|
18
|
+
rspec-core (3.13.0)
|
19
|
+
rspec-support (~> 3.13.0)
|
20
|
+
rspec-expectations (3.13.0)
|
19
21
|
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
-
rspec-support (~> 3.
|
21
|
-
rspec-mocks (3.
|
22
|
+
rspec-support (~> 3.13.0)
|
23
|
+
rspec-mocks (3.13.0)
|
22
24
|
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
-
rspec-support (~> 3.
|
24
|
-
rspec-support (3.
|
25
|
-
simplecov (0.
|
25
|
+
rspec-support (~> 3.13.0)
|
26
|
+
rspec-support (3.13.0)
|
27
|
+
simplecov (0.22.0)
|
26
28
|
docile (~> 1.1)
|
27
29
|
simplecov-html (~> 0.11)
|
28
30
|
simplecov_json_formatter (~> 0.1)
|
29
31
|
simplecov-html (0.12.3)
|
30
|
-
simplecov_json_formatter (0.1.
|
32
|
+
simplecov_json_formatter (0.1.4)
|
31
33
|
|
32
34
|
PLATFORMS
|
33
35
|
ruby
|
@@ -40,4 +42,4 @@ DEPENDENCIES
|
|
40
42
|
simplecov
|
41
43
|
|
42
44
|
BUNDLED WITH
|
43
|
-
2.
|
45
|
+
2.5.5
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# nameable
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/openjournals-nameable.svg)](http://badge.fury.io/rb/nameable)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/openjournals-nameable.svg)](http://badge.fury.io/rb/openjournals-nameable)
|
4
4
|
[![Build Status](https://github.com/openjournals/nameable/actions/workflows/tests.yml/badge.svg)](https://github.com/openjournals/nameable/actions/workflows/tests.yml)
|
5
5
|
|
6
6
|
A library that provides parsing and normalization of people's names.
|
@@ -47,38 +47,4 @@ Nameable::Latin.new('Chris', 'Horn').ethnicity
|
|
47
47
|
#=> {:rank=>593, :count=>51380, :percent_white=>86.75, :percent_black=>8.31, :percent_asian_pacific_islander=>0.84, :percent_american_indian_alaska_native=>1.16, :percent_two_or_more_races=>1.46, :percent_hispanic=>1.48}
|
48
48
|
```
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
I've included a little web service, which should be installed as "nameable_web_service" that requires sinatra. It's been handy when paired with OpenRefine, if I'm working with a file and I am not going to be parsing with Ruby. If you're reading this, that's probably not an issue for you, but I do think it's a nice way to show someone how to use OpenRefine in a more advanced way.
|
53
|
-
|
54
|
-
# Inspiration
|
55
|
-
|
56
|
-
By inspiration, I should really say "other projects from which I yanked their code, ideas, examples and data." At worst I'll make sure the other projects I looked at and borrowed from are credited here.
|
57
|
-
|
58
|
-
# Security
|
59
|
-
|
60
|
-
As of version `1.1.1`., the nameable gem is cryptographically signed. To be sure the gem you install hasn’t been tampered with, add my public key as a trusted certificate, and verify that nameable and any dependencies it has are also signed:
|
61
|
-
|
62
|
-
```
|
63
|
-
$ gem cert --add <(curl -Ls https://raw.github.com/chorn/nameable/master/certs/chorn.pem)
|
64
|
-
$ gem install nameable -P HighSecurity
|
65
|
-
```
|
66
|
-
|
67
|
-
# References
|
68
|
-
|
69
|
-
* [Open Refine](http://openrefine.org/) formerly [Google Refine](https://code.google.com/p/google-refine/)
|
70
|
-
* [Help with splitting names](http://www.onlineaspect.com/2009/08/17/splitting-names/)
|
71
|
-
* [First Names from the U.S. SSA](http://www.ssa.gov/oact/babynames/limits.html)
|
72
|
-
* [Last Names from the Census](http://www.census.gov/topics/population/genealogy/data/2000_surnames.html)
|
73
|
-
* [Data Science Toolkit](https://github.com/petewarden/dstk)
|
74
|
-
* [Addressable](https://github.com/sporkmonger/addressable)
|
75
|
-
|
76
|
-
# To-do
|
77
|
-
|
78
|
-
1. Extract all of the US Census / Ethnicity / Asset stuff out of `Latin`. Yuck, that's ugly why did I ever do that?
|
79
|
-
2. Rename `Latin` to be `US` or `English` because it's looks like I really only support English, and probably US English.
|
80
|
-
3. Use named captures for all the regexs.
|
81
|
-
4. Refactor the Ethnicity stuff into a class.
|
82
|
-
5. Refactor parsing into a class.
|
83
|
-
|
84
|
-
-chorn
|
50
|
+
This fork updates [the original gem](https://github.com/chorn/nameable) with custom tweaks
|
data/lib/nameable/version.rb
CHANGED
data/nameable.gemspec
CHANGED
@@ -18,7 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ['lib']
|
21
|
-
spec.required_ruby_version = '>=
|
21
|
+
spec.required_ruby_version = '>= 3.0'
|
22
|
+
|
23
|
+
spec.add_dependency "csv"
|
22
24
|
|
23
25
|
spec.add_development_dependency 'bundler'
|
24
26
|
spec.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openjournals-nameable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Horn
|
@@ -9,8 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: csv
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: bundler
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,14 +129,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
129
|
requirements:
|
116
130
|
- - ">="
|
117
131
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
132
|
+
version: '3.0'
|
119
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
134
|
requirements:
|
121
135
|
- - ">="
|
122
136
|
- !ruby/object:Gem::Version
|
123
137
|
version: '0'
|
124
138
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
139
|
+
rubygems_version: 3.5.5
|
126
140
|
signing_key:
|
127
141
|
specification_version: 4
|
128
142
|
summary: Parse names into components.
|