dwc_agent 1.0.0 → 1.1.0

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
2
  SHA256:
3
- metadata.gz: 69d6e0f6c0f9d59801d0e53a89dd73896f0ac5a8230156879227ea6efe14bb7d
4
- data.tar.gz: 1330921589cbcad22273c4b5cae821eba7266cc4357756498ae3b6d4f029e3f8
3
+ metadata.gz: d56e8cb49d4857e324dbdda7d6cfa31e9a7a3079c40a12659ff6077d13308613
4
+ data.tar.gz: 7652bc849261aa4179a99e64a725a0f82d0b65b4d2e2885042ad35521887e705
5
5
  SHA512:
6
- metadata.gz: 735057f853b259f4d7fcb9f4c73d2f193f9a0e363d439a8bf894bbd9f878e8667cd14979c10cf138c7cc007f83cd09b7d5f9f21e0482b6303f73a40c788a957a
7
- data.tar.gz: 8760dc0d9976543fe6ce448e2129b94e2d86d5a17f8e0b4b297f4dd23e8c4e4d73b4c7af4863e5edfa6abbbdb83181e6364e8064b0c73f185b0370c3ea1f597c
6
+ metadata.gz: 99d384a56c180c8c5db64c5cc8cf072da272b427830875783a22d67279cd070af3bd0bd2b881e4a20018bdeba774d27e8adb8ae048668c28452171017b72c70b
7
+ data.tar.gz: edc59989136745e0b603039d08420b368ef92e95a0ab17b48bcabf439472c1252ec763f4f9c7a398b735995b340f897dc0f3d85a45c2ea1c9ccec643f050e904
@@ -159,7 +159,11 @@ module DwcAgent
159
159
  }
160
160
 
161
161
  COMPLEX_SEPARATORS = %r{
162
- ^([A-Za-z]{4,},\s+(?:[A-Z]\.\s*){1,})\s+([A-Za-z]{4,},\s+(?:[A-Z]\.\s*){1,})$
162
+ ^(\S{4,},\s+(?:\S\.\s*){1,})\s+(\S{4,},\s+(?:\S\.\s*){1,})$
163
+ }x
164
+
165
+ CONTRACTED_LIST = %r{
166
+ ^(\S{1,}\.?)+\s+(?i:and|&)\s+(\S{1,}\.?)+\s*(.*)$
163
167
  }x
164
168
 
165
169
  BLACKLIST = %r{
@@ -20,7 +20,8 @@ module DwcAgent
20
20
  @char_subs_regex = Regexp.new [CHAR_SUBS.keys.join('\\')].to_s
21
21
  @phrase_subs_regex = Regexp.new (PHRASE_SUBS.keys.join('|')).to_s
22
22
  @complex_separators_regex = Regexp.new COMPLEX_SEPARATORS.to_s
23
- @add_separators_regex = Regexp.new %r{([A-Z]{1}\.)([[:alpha:]]{2,})}.to_s
23
+ @add_separators_regex = Regexp.new %r{(\S{1}\.)([[:alpha:]]{2,})}.to_s
24
+ @contracted_list_regex = Regexp.new CONTRACTED_LIST.to_s
24
25
  end
25
26
 
26
27
  # Parses the passed-in string and returns a list of names.
@@ -34,6 +35,7 @@ module DwcAgent
34
35
  name.gsub!(@phrase_subs_regex, PHRASE_SUBS)
35
36
  name.gsub!(@add_separators_regex, '\1 \2')
36
37
  name.gsub!(@complex_separators_regex, '\1 | \2')
38
+ name.gsub!(@contracted_list_regex, '\1 \3 | \2 \3')
37
39
  name.gsub!(@residual_terminators_regex, '')
38
40
  name.squeeze!(' ')
39
41
  name.strip!
@@ -2,7 +2,7 @@ module DwcAgent
2
2
  class Version
3
3
 
4
4
  MAJOR = 1
5
- MINOR = 0
5
+ MINOR = 1
6
6
  PATCH = 0
7
7
  BUILD = nil
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwc_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David P. Shorthouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-29 00:00:00.000000000 Z
11
+ date: 2019-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae