phony 2.18.14 → 2.18.15
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/cambodia.rb +1 -5
- data/spec/lib/phony/countries_spec.rb +9 -2
- 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: d8b68b69c83acc6190f9fc36b4d9d3b0db6878ddc4bdb2c7cfabae8a77ee3ddc
|
|
4
|
+
data.tar.gz: 1552ef3d9749adde09192d5951218ec399aac9bfe7d5a40c6c5ac50cac6003be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 375e4422e3e19806732fb2ccfee87905754b56822538ae2eaf357d3e9fdc6d3d3cbdf800d10ea202c45f9c5bfc5cd3fd634f40964b5248fe6bd46c1632aef4c7
|
|
7
|
+
data.tar.gz: 75f9f196bf936e481741a1c9f45f23bcc0d695843288505a57467d01edc8d0cdc1daa898083e12d402b582f0b8b46c22413d9b94e58714fe54bbed6cd352ab60
|
|
@@ -71,6 +71,7 @@ six_digit_extended_range_mobile_prefixes = [
|
|
|
71
71
|
]
|
|
72
72
|
|
|
73
73
|
seven_digit_mobile_prefixes = [
|
|
74
|
+
'18', # Seatel
|
|
74
75
|
'31', # Metfone
|
|
75
76
|
'38', # CooTel
|
|
76
77
|
'39', # EMAXX
|
|
@@ -85,10 +86,6 @@ variable_length_extended_range_mobile_prefixes = [
|
|
|
85
86
|
'12' # Mobitel
|
|
86
87
|
]
|
|
87
88
|
|
|
88
|
-
mobile_prefixes_with_variable_length = [
|
|
89
|
-
'18' # Seatel
|
|
90
|
-
]
|
|
91
|
-
|
|
92
89
|
six_digit_total_single_digit_fixed_line_prefixes = [
|
|
93
90
|
'2', # Telecom Cambodia
|
|
94
91
|
'3', # Mobitel
|
|
@@ -126,7 +123,6 @@ seven_digit_total_double_digit_fixed_line_prefixes = [
|
|
|
126
123
|
|
|
127
124
|
Phony.define do
|
|
128
125
|
country '855', trunk('0', :normalize => true) |
|
|
129
|
-
one_of(mobile_prefixes_with_variable_length) >> matched_split(/^9/ => [3, 4], /^[2-8]/ => [3, 3]) |
|
|
130
126
|
one_of(variable_length_extended_range_mobile_prefixes) >> matched_split(/^1/ => [3, 4], /^[2-9]/ => [3, 3]) |
|
|
131
127
|
one_of(six_digit_mobile_prefixes) >> matched_split(/^[2-9]/ => [3, 3]) |
|
|
132
128
|
one_of(six_digit_extended_range_mobile_prefixes) >> matched_split(/^[1-9]/ => [3, 3]) |
|
|
@@ -103,9 +103,16 @@ describe 'country descriptions' do
|
|
|
103
103
|
it_splits '3295551914', ['32', '9', '555', '19', '14'] # Gent
|
|
104
104
|
it_splits '3245551414', ['32', '4', '555', '14', '14'] # Liège
|
|
105
105
|
it_splits '3216473200', ['32', '16', '47', '32', '00'] # Leuven
|
|
106
|
-
it_splits '32475279584', ['32', '475', '27', '95', '84'] # mobile
|
|
107
|
-
it_splits '32468279584', ['32', '468', '27', '95', '84'] # mobile (Telenet)
|
|
108
106
|
it_splits '32455123456', ['32', '455', '12', '34', '56'] # mobile (Voo)
|
|
107
|
+
it_splits '32456123456', ['32', '456', '12', '34', '56'] # mobile (MobileViking)
|
|
108
|
+
it_splits '32460123456', ['32', '460', '12', '34', '56'] # mobile (Proximus)
|
|
109
|
+
it_splits '32465123456', ['32', '465', '12', '34', '56'] # mobile (Lycamobile)
|
|
110
|
+
it_splits '32466123456', ['32', '466', '12', '34', '56'] # mobile (Vectone)
|
|
111
|
+
it_splits '32467123456', ['32', '467', '12', '34', '56'] # mobile (Telenet)
|
|
112
|
+
it_splits '32468123456', ['32', '468', '12', '34', '56'] # mobile (Telenet)
|
|
113
|
+
it_splits '32475123456', ['32', '475', '12', '34', '56'] # mobile (Proximus)
|
|
114
|
+
it_splits '32485123456', ['32', '485', '12', '34', '56'] # mobile (Telenet)
|
|
115
|
+
it_splits '32495123456', ['32', '495', '12', '34', '56'] # mobile (Orange)
|
|
109
116
|
it_splits '3270123123', ['32', '70', '123', '123'] # Bus Service?
|
|
110
117
|
it_splits '3278123123', ['32', '78', '123', '123'] # National rate service
|
|
111
118
|
it_splits '3290123123', ['32', '901', '23', '123'] # National rate service
|
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.18.
|
|
4
|
+
version: 2.18.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Hanke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-07-12 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
|