phony 2.19.8 → 2.19.9
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 +8 -7
- data/spec/lib/phony/countries_spec.rb +1 -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: 30b195be2f2aafc2cda3d6f6f32f1f8b5c5af7dc11d63e03cb329fb4fdf40556
|
|
4
|
+
data.tar.gz: 6f4cc992009707e109eb9c50efea3b6c38fd2c7452434d23aa44b401559ffd1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77892f621ff0ad9455ad7eabaf6a8f2beee67f79fc09ade1913295c92f649e4c5790a5dc6336a32cb095f136b0bf46c2f9a1582f196ee8a988d4465ea1640a02
|
|
7
|
+
data.tar.gz: 6f585de726af1584d89eeec8dd41e6dbb25cf740acf144149ada1a8bd5d461149c8eea341629fe0746fbecfecab38990eb0dc5b992efe7c94832fae6472c41f4
|
data/lib/phony/countries.rb
CHANGED
|
@@ -96,15 +96,16 @@ Phony.define do
|
|
|
96
96
|
# Belgium.
|
|
97
97
|
#
|
|
98
98
|
# http://en.wikipedia.org/wiki/Telephone_numbers_in_Belgium
|
|
99
|
+
# https://www.bipt.be/operators/publication/national-numbering-plan
|
|
99
100
|
#
|
|
100
101
|
country '32', trunk('0') |
|
|
101
|
-
match(/^(7[08])\d+$/)
|
|
102
|
-
match(/^(800|90\d)\d+$/)
|
|
103
|
-
match(/^(46[
|
|
104
|
-
match(/^(4[789]\d)\d{6}$/)
|
|
105
|
-
match(/^(45[56])\d{6}$/)
|
|
106
|
-
one_of('2','3','4','9')
|
|
107
|
-
fixed(2)
|
|
102
|
+
match(/^(7[08])\d+$/) >> split(3,3) | # Premium and national rate Services
|
|
103
|
+
match(/^(800|90\d)\d+$/) >> split(2,3) | # Toll free service and premium numbers
|
|
104
|
+
match(/^(46[056789])\d{6}$/) >> split(2,2,2) | # Mobile (Lycamobile, Telenet, Join Experience, Proximus 0460)
|
|
105
|
+
match(/^(4[789]\d)\d{6}$/) >> split(2,2,2) | # Mobile
|
|
106
|
+
match(/^(45[56])\d{6}$/) >> split(2,2,2) | # Mobile Vikings and Voo
|
|
107
|
+
one_of('2','3','4','9') >> split(3,2,2) | # Short NDCs
|
|
108
|
+
fixed(2) >> split(2,2,2) # 2-digit NDCs
|
|
108
109
|
|
|
109
110
|
# France.
|
|
110
111
|
#
|
|
@@ -110,6 +110,7 @@ describe 'country descriptions' do
|
|
|
110
110
|
it_splits '32466123456', ['32', '466', '12', '34', '56'] # mobile (Vectone)
|
|
111
111
|
it_splits '32467123456', ['32', '467', '12', '34', '56'] # mobile (Telenet)
|
|
112
112
|
it_splits '32468123456', ['32', '468', '12', '34', '56'] # mobile (Telenet)
|
|
113
|
+
it_splits '32469123456', ['32', '469', '12', '34', '56'] # mobile ()
|
|
113
114
|
it_splits '32475123456', ['32', '475', '12', '34', '56'] # mobile (Proximus)
|
|
114
115
|
it_splits '32485123456', ['32', '485', '12', '34', '56'] # mobile (Telenet)
|
|
115
116
|
it_splits '32495123456', ['32', '495', '12', '34', '56'] # mobile (Orange)
|
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.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Hanke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-02-15 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
|