phony 2.19.11 → 2.19.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phony/countries/italy.rb +6 -1
- data/spec/functional/plausibility_spec.rb +2 -1
- data/spec/lib/phony/countries_spec.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54699e3eb844624a7259e6ada8eb7723f464fc1c76be1a1509a2a3742da886af
|
4
|
+
data.tar.gz: bf0beaa674cd0c692b604aaada2af2c9ecbaeca220bdcd2d80c1bb6442e5f5d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71dd377780c26bdb99e8c787a27b12f9a03b50af1d336971e3007511251edbd74bfeb3019dc827e81d6b63b97a02c9e509db7ab055c2e25db317f257cf77baab
|
7
|
+
data.tar.gz: 278418af47c803338069c0c205c65fd1f575f47644313e3eb96ca5c5324f51c832e05db8bab47873ba7e650012dc2854f4cad6f9bafafe08e39271d68c4d869f
|
@@ -272,7 +272,12 @@ Phony.define do
|
|
272
272
|
country '39', trunk('', normalize: false) |
|
273
273
|
one_of(*service) >> split(3,3) |
|
274
274
|
one_of(*mobile) >> split(3,4,-1..1) |
|
275
|
-
one_of(*ndcs_2digit) >>
|
275
|
+
one_of(*ndcs_2digit) >> matched_split(
|
276
|
+
/\A\d{5}\z/ => [5],
|
277
|
+
/\A\d{6}\z/ => [4,2],
|
278
|
+
/\A\d{7}\z/ => [4,3],
|
279
|
+
/\A\d{8}\z/ => [4,4],
|
280
|
+
) |
|
276
281
|
one_of(*ndcs_3digit) >> matched_split(
|
277
282
|
/^1\d{6}$/ => [7],
|
278
283
|
/^1\d{7}$/ => [8],
|
@@ -280,7 +280,8 @@ describe 'plausibility' do
|
|
280
280
|
it_is_correct_for 'Guinea-Bissau', :samples => '+245 44 728 6998'
|
281
281
|
it_is_correct_for 'Guyana', :samples => '+592 263 1234'
|
282
282
|
it_is_correct_for 'Honduras (Republic of)', :samples => '+504 12 961 637'
|
283
|
-
it_is_correct_for 'Italy', :samples => ['+39 0574 1234'
|
283
|
+
it_is_correct_for 'Italy', :samples => ['+39 0574 1234',
|
284
|
+
'+39 06 49911']
|
284
285
|
it_is_correct_for 'Iraq', :samples => ['+964 1 123 4567',
|
285
286
|
'+964 21 113 456',
|
286
287
|
'+964 71 1234 5678']
|
@@ -460,8 +460,9 @@ describe 'country descriptions' do
|
|
460
460
|
it_splits '3934869528123',['39', '348', '695', '2812', '3'] # Mobile (8-digit subscriber no - new)
|
461
461
|
it_splits '393357210488', ['39', '335', '721', '0488'] # Mobile
|
462
462
|
it_splits '393248644272', ['39', '324', '864', '4272'] # Mobile
|
463
|
-
it_splits '
|
464
|
-
it_splits '
|
463
|
+
it_splits '390612341', ['39', '06', '12341'] # Roma 5 digit
|
464
|
+
it_splits '3906123412', ['39', '06', '1234', '12'] # Roma 6 digit
|
465
|
+
it_splits '39061234123', ['39', '06', '1234', '123'] # Roma 7 digit
|
465
466
|
it_splits '390612341234', ['39', '06', '1234', '1234'] # Roma 8 digit
|
466
467
|
it_splits '3902888388', ['39', '02', '8883', '88'] # Milano 6 digit
|
467
468
|
it_splits '39028883888', ['39', '02', '8883', '888'] # Milano 7 digit
|
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.12
|
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-06-09 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
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.
|
118
|
+
rubygems_version: 3.0.3
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Fast international phone number (E164 standard) normalizing, splitting and
|