dwc_agent 3.0.1.0 → 3.0.1.1
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 +4 -4
- data/lib/dwc_agent/parser.rb +2 -1
- data/lib/dwc_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51d092e5e8f6a540e67959189827553f1b37214b855465ef69444098e9146972
|
4
|
+
data.tar.gz: 5ca4086f1bed287ec90c1afc1ce1e46f1ad6fd149f7449ca519e59f2474a918c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a255f52c83b5bfda870d3edd20187186fd3d0a6345a51dadf67a2d9dd072ec4e476a56d0fbb593e72a417a425a5a9dae2716a61dc7bd88fbf9c8350a45ff68ea
|
7
|
+
data.tar.gz: 8cb41bc6e132bcc66aa3a196bd54e48b374c7a95227c9fa13f77b856d88684978d98c72100790db244a83e65b389d162a819a8926c2d1ca8c1dad7d8c6166de4
|
data/lib/dwc_agent/parser.rb
CHANGED
@@ -21,6 +21,7 @@ module DwcAgent
|
|
21
21
|
@char_subs_regex = Regexp.new [CHAR_SUBS.keys.join].to_s
|
22
22
|
@phrase_subs_regex = Regexp.new PHRASE_SUBS.keys.map{|a| Regexp.escape a }.join('|').to_s
|
23
23
|
@residual_terminators_regex = Regexp.new SPLIT_BY.to_s + %r{\s*\z}.to_s
|
24
|
+
@separators = SEPARATORS.map{|k,v| [ Regexp.new(k), v] }
|
24
25
|
end
|
25
26
|
|
26
27
|
# Parses the passed-in string and returns a list of names.
|
@@ -31,7 +32,7 @@ module DwcAgent
|
|
31
32
|
return [] if name.nil? || name == ""
|
32
33
|
name.gsub!(@strip_out_regex, ' ')
|
33
34
|
name.gsub!(Regexp.union(@char_subs_regex, @phrase_subs_regex), CHAR_SUBS.merge(PHRASE_SUBS))
|
34
|
-
|
35
|
+
@separators.each{|k| name.gsub!(k[0], k[1])}
|
35
36
|
name.gsub!(@residual_terminators_regex, '')
|
36
37
|
name.squeeze!(' ')
|
37
38
|
name.strip!
|
data/lib/dwc_agent/version.rb
CHANGED
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.0.1.
|
4
|
+
version: 3.0.1.1
|
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: 2022-08-
|
11
|
+
date: 2022-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: namae
|