dwc_agent 3.3.1.0 → 3.4.0.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
  SHA256:
3
- metadata.gz: 39a9ead6ab8410e39f29e6bf5b841214042fbf47a336c0e4c5dfaa4b0d11b87d
4
- data.tar.gz: 763e722a2f28c765660573b6a0f2895e5c4c25550e8c927f5a85fa6e533f3800
3
+ metadata.gz: a8c59f7eec17563af7a1e0ab3a931055d8181c7331f4ad4e569a61a4a05a07b8
4
+ data.tar.gz: 204d62a3fd1d5e003e455f271813d38691e00710a7e47b50e87bb60b7a4b7a90
5
5
  SHA512:
6
- metadata.gz: e5e35467255e9e5dfc029a02757387099d3edc4ef385e4d73785c02ca74b0ffc8be7d87a60ec34f9fd22e80d10747bf357e4951b35d415bdc099b2ec24973178
7
- data.tar.gz: 5726c9073b61195aa4e5a9f8d5861c044c4392e42b0c2ec114013cb3881362ff7b30927847b352152fb5659dcc8ca2aaf48c728a3bd6ab0059b1126f56659fd0
6
+ metadata.gz: b1872d38cdc1983d090850a4d0eb313c84f9b5a5c753d4a1af39fc016a3306245224f23f3fb021e1543f59646f685ba21167e80aef30bebb414349a0f675929a
7
+ data.tar.gz: 5fb3deb9a940f9407abeda5d558a2275bcc4df8180f5966e26af6692d74c044b3af88f4732a26185e2362a35d42883d45d47f1555ce9fecc10d9f0a5c37c91c9
@@ -202,10 +202,7 @@ module DwcAgent
202
202
  '%' => '',
203
203
  '\\' => '',
204
204
  '´' => '\'',
205
- '+' => ' | '
206
- }
207
-
208
- PHRASE_SUBS = {
205
+ '+' => ' | ',
209
206
  ', ph.d.' => ' Ph.D.',
210
207
  ', Ph.D.' => ' Ph.D.',
211
208
  ', bro.' => ' Bro.',
@@ -224,7 +221,7 @@ module DwcAgent
224
221
  ', &' => ' &'
225
222
  }
226
223
 
227
- SEPARATORS = {
224
+ COMPLEX_SEPARATORS = {
228
225
  "^(\\S{4,}),\\s+(Mrs?\\.|MRS?\\.)\\s+([A-Za-z\\.\\s]+)$" => "\\2 \\3 \\1",
229
226
  "^(Mrs?\\.?)\\s+&\\s+(Mrs?\\.?)\\s+(.*)$" => "\\1 \\3 | \\2 \\3",
230
227
  "^([A-Z]{1}\\.\\s*[[:alpha:]]+),\\s*?([A-Z.]+)$" => "\\1 \\2",
@@ -10,10 +10,9 @@ module DwcAgent
10
10
  suffix: SUFFIX,
11
11
  strip_out_regex: Regexp.new(STRIP_OUT.to_s),
12
12
  tidy_remains_regex: Regexp.new(POST_STRIP_TIDY.to_s),
13
- char_subs_regex: Regexp.new([CHAR_SUBS.keys.join].to_s),
14
- phrase_subs_regex: Regexp.new(PHRASE_SUBS.keys.map{|a| Regexp.escape a }.join('|').to_s),
15
- residual_terminators_regex: Regexp.new(SPLIT_BY.to_s + %r{\s*\z}.to_s),
16
- separators: SEPARATORS.map{|k,v| [ Regexp.new(k), v] }
13
+ subs_regex: Regexp.new(CHAR_SUBS.keys.map{|a| Regexp.escape a }.join('|').to_s),
14
+ complex_separators_regex: COMPLEX_SEPARATORS.map{|k,v| [Regexp.new(k), v] },
15
+ residual_terminators_regex: Regexp.new(SPLIT_BY.to_s + %r{\s*\z}.to_s)
17
16
  }
18
17
 
19
18
  class << self
@@ -39,8 +38,8 @@ module DwcAgent
39
38
  return [] if name.nil? || name == ""
40
39
  name.gsub!(options[:strip_out_regex], ' ')
41
40
  name.gsub!(options[:tidy_remains_regex], '')
42
- name.gsub!(Regexp.union(options[:char_subs_regex], options[:phrase_subs_regex]), CHAR_SUBS.merge(PHRASE_SUBS))
43
- options[:separators].each{|k| name.gsub!(k[0], k[1])}
41
+ name.gsub!(options[:subs_regex], CHAR_SUBS)
42
+ options[:complex_separators_regex].each{|k| name.gsub!(k[0], k[1])}
44
43
  name.gsub!(options[:residual_terminators_regex], '')
45
44
  name.squeeze!(' ')
46
45
  name.strip!
@@ -3,8 +3,8 @@ module DwcAgent
3
3
  class Version
4
4
 
5
5
  MAJOR = 3
6
- MINOR = 3
7
- PATCH = 1
6
+ MINOR = 4
7
+ PATCH = 0
8
8
  BUILD = 0
9
9
 
10
10
  def self.version
@@ -12,7 +12,7 @@ module DwcAgent
12
12
  end
13
13
 
14
14
  def self.date
15
- '2025-06-18'
15
+ '2025-08-20'
16
16
  end
17
17
 
18
18
  end
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: 3.3.1.0
4
+ version: 3.4.0.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: 2025-06-18 00:00:00.000000000 Z
11
+ date: 2025-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae