phony 2.20.15 → 2.21.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 +4 -4
- data/README.textile +1 -1
- data/lib/phony/country_codes.rb +5 -0
- 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: 4ff2cd9c33f893f770fd66ba1665ace7827d0d30bb21f1f0a46ace070f9e683b
|
|
4
|
+
data.tar.gz: 34fed8e28246ab7db2b348e9bb6a46956e0eb366ef94bdfa9f0f3798b7c87cc5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0ce05e1ed6fac6fc0a23b57549b9ffd71bf45f2b258e606348e1f2572afdcaa00d6c2da5923a4568f3b02ad09b5390e23a571a0e8182df79927b4737245b081
|
|
7
|
+
data.tar.gz: 2f0b899f0acba7142a4c68de1ddf00a66b2f8a7f2996bc22d981695dda9c0dcdb823c98c40d76e9cb0845f77657327b65a05aa7ee774cef1438f9d4ead6c500f
|
data/README.textile
CHANGED
|
@@ -108,7 +108,7 @@ Mildly unmaintained list: Abhas, Afghan, Algerian, Argentina, Austrian, Australi
|
|
|
108
108
|
|
|
109
109
|
h2. Proud Sponsors
|
|
110
110
|
|
|
111
|
-
* Renuo AG (July
|
|
111
|
+
* Renuo AG (July 2022 – January 2025): "Github":https://github.com/renuo, "Homepage":https://www.renuo.ch. Much appreciated!
|
|
112
112
|
|
|
113
113
|
h2. License
|
|
114
114
|
|
data/lib/phony/country_codes.rb
CHANGED
|
@@ -94,6 +94,11 @@ module Phony
|
|
|
94
94
|
# Is this number plausible?
|
|
95
95
|
#
|
|
96
96
|
def plausible?(number, hints = {})
|
|
97
|
+
# Fail if it contains too many of certain phone specific markers:
|
|
98
|
+
# * more than 1 +
|
|
99
|
+
#
|
|
100
|
+
return false if number.count('+') > 1
|
|
101
|
+
|
|
97
102
|
normalized = clean number
|
|
98
103
|
|
|
99
104
|
# False if it fails the basic check.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phony
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Hanke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: 'Fast international phone number (E164 standard) normalizing, splitting
|
|
14
14
|
and formatting. Lots of formatting options: International (+.., 00..), national
|