fat_core 7.1.1 → 7.1.2
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/fat_core/string.rb +4 -1
- data/lib/fat_core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e0583ab5a7550b3b4d7eef69e28a0b8cbd7f6fde9c15f294325ae37145e05b4
|
|
4
|
+
data.tar.gz: ff46db81c0e1754c39ef2e89fa0650f037e8f26831c092c669a40af03bc265c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 846d6ae4fdb56cf089b30dc80cfe61d1fe2ffe1063e227ee323ed855aa63cbba4886da598ca354c5605608936962c8789ee02d2f30e2ee7aca7779b5b57175b0
|
|
7
|
+
data.tar.gz: b320b91c8e1893da4595a50830036bb6ddbde4fc9c381c38e1bece3c2c905db8e4e00452f11759d268d13dd8963907b748f8e7ca7711b2b7378ce93a059b193b
|
data/lib/fat_core/string.rb
CHANGED
|
@@ -226,7 +226,10 @@ module FatCore
|
|
|
226
226
|
# @see #fuzzy_match #fuzzy_match for the specifics of string matching
|
|
227
227
|
# @see #as_regexp #as_regexp for conversion of `matcher` to regular expression
|
|
228
228
|
def matches_with(matcher)
|
|
229
|
-
|
|
229
|
+
# Replace periods and commas with a space (so they are still word
|
|
230
|
+
# separators, e.g. 'WWW.WOLFRAM' -> 'WWW WOLFRAM' and 'AMZON,INC.' ->
|
|
231
|
+
# 'AMAZON INC') and remove asterisks and apostrophes
|
|
232
|
+
target = gsub(/[.,]/, ' ').gsub(/[\*']/, '').clean
|
|
230
233
|
if matcher.nil?
|
|
231
234
|
nil
|
|
232
235
|
elsif matcher.match?(%r{^\s*/})
|
data/lib/fat_core/version.rb
CHANGED