phony 2.19.1 → 2.19.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/phony/countries.rb +3 -3
- data/spec/functional/plausibility_spec.rb +4 -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: a25ea5ae1863104772974d3d8a632ef53bd45563a583d4598850c0488d319613
|
|
4
|
+
data.tar.gz: eaf8164939b8f6b86f0923f808d939f357bff541d4edbdea8471524c3c7d1e00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f0a932b5089196f06e373fb83cb1586304ce6ac8a1764d8b6b6be97a7a8c3edec1b1017ce0dbaaa5a26a46ab42ae250a3716c7207c669fa2a520a1180ab3f22
|
|
7
|
+
data.tar.gz: 0f58eaca4e4b4981e6ebe92ad309f51d3607567976dd106881ad453adeca1d63756df3ed2f4693f14a79f135db00ac3ec6c4b5efff1fe8818bad291a6c6db5b1
|
data/lib/phony/countries.rb
CHANGED
|
@@ -486,9 +486,9 @@ Phony.define do
|
|
|
486
486
|
# http://www.wtng.info/wtng-260-zm.html
|
|
487
487
|
# https://github.com/googlei18n/libphonenumber/
|
|
488
488
|
country '260',
|
|
489
|
-
match(/^(
|
|
490
|
-
match(/^(800)/)
|
|
491
|
-
match(/^(21[1-8])/)
|
|
489
|
+
match(/^([79][5678]\d)/) >> split(6) | # Mobile
|
|
490
|
+
match(/^(800)/) >> split(3,3) | # Toll free
|
|
491
|
+
match(/^(21[1-8])/) >> split(6) # Fixed
|
|
492
492
|
|
|
493
493
|
# Madagascar http://www.wtng.info/wtng-261-mg.html
|
|
494
494
|
# http://www.itu.int/oth/T020200007F/en
|
|
@@ -255,7 +255,7 @@ describe 'plausibility' do
|
|
|
255
255
|
end
|
|
256
256
|
# it_is_correct_for 'Gabonese Republic', :samples => [
|
|
257
257
|
# '+241 1 627 739',
|
|
258
|
-
# '+241 12 34 56 78',
|
|
258
|
+
# '+241 12 34 56 78',
|
|
259
259
|
# ]
|
|
260
260
|
it_is_correct_for 'Gambia', :samples => '+220 989 5148'
|
|
261
261
|
it_is_correct_for 'Germany', :samples => [
|
|
@@ -568,6 +568,9 @@ describe 'plausibility' do
|
|
|
568
568
|
'+967 58 1234']
|
|
569
569
|
it 'is correct for Zambia' do
|
|
570
570
|
Phony.plausible?('+260 211 123456').should be_truthy # Fixed
|
|
571
|
+
Phony.plausible?('+260 761 123456').should be_truthy # Mobile
|
|
572
|
+
Phony.plausible?('+260 772 123456').should be_truthy # Mobile
|
|
573
|
+
Phony.plausible?('+260 783 123456').should be_truthy # Mobile
|
|
571
574
|
Phony.plausible?('+260 955 123456').should be_truthy # Mobile
|
|
572
575
|
Phony.plausible?('+260 967 123456').should be_truthy # Mobile
|
|
573
576
|
Phony.plausible?('+260 978 123456').should be_truthy # Mobile
|
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.19.
|
|
4
|
+
version: 2.19.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Hanke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-07-05 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
|