phony 2.15.39 → 2.15.40
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.rb +11 -3
- data/lib/phony/countries/italy.rb +1 -1
- data/spec/lib/phony/countries_spec.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025fd5f44739a955cee2b09ef250e2e820de8ecd
|
4
|
+
data.tar.gz: fea5fd6630d91521f8dcfaa1f3c0a22fb4025a2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 356f262ce1fc0eb730c0ed00d8c1fb4f09862b96a5afae1bdf6c12e7fe42e7f3b8a9fd86e4fe585d616bb0241038d3fd1c5f87a062f992669902dada5b0a878a
|
7
|
+
data.tar.gz: 641cec9186c42bb03bae365c8d1a54e20b39d26a3e287dc7134aeb52504e6b2668d766f9bf8f779f272731393ffbc24339f8a6a7bcbe732491865e41143ce2a6
|
data/lib/phony/countries.rb
CHANGED
@@ -122,11 +122,19 @@ Phony.define do
|
|
122
122
|
|
123
123
|
# Hungary.
|
124
124
|
#
|
125
|
+
# http://webpub-ext.nmhh.hu/aga/foldr/DoIndexAction.do
|
126
|
+
#
|
125
127
|
country '36',
|
126
128
|
trunk('06', normalize: false) |
|
127
|
-
one_of('104','105','107','112')
|
128
|
-
one_of('1')
|
129
|
-
|
129
|
+
one_of('104', '105', '107', '112') >> split(3,3) | # Service
|
130
|
+
one_of('1') >> split(3,4) | # Budapest
|
131
|
+
one_of('20', '30', '31', '50', '70') >> split(3,4) | # Mobile
|
132
|
+
one_of('21') >> split(3,4) | # VOIP
|
133
|
+
one_of('40', '80', '90', '91') >> split(3,3) | # Special charged numbers
|
134
|
+
one_of('51') >> split(3,3) | # Corporate network, M2M
|
135
|
+
one_of('38') >> split(3,4) | # Corporate network, M2M
|
136
|
+
one_of('71') >> split(5,5) | # M2M Numbers
|
137
|
+
fixed(2) >> split(3,3) # Geographic numbers
|
130
138
|
|
131
139
|
# country '39' # Italy, see special file.
|
132
140
|
|
@@ -267,7 +267,7 @@ Phony.define do
|
|
267
267
|
country '39', trunk('', :normalize => false) |
|
268
268
|
one_of(*service) >> split(3,3) |
|
269
269
|
one_of(*mobile) >> split(3,4,-1..1) |
|
270
|
-
one_of(*ndcs_2digit) >> split(4,4) |
|
270
|
+
one_of(*ndcs_2digit) >> split(4, 2..4) |
|
271
271
|
one_of(*ndcs_3digit) >> matched_split(
|
272
272
|
/^1\d{6}$/ => [7],
|
273
273
|
/^1\d{7}$/ => [8],
|
@@ -405,8 +405,12 @@ describe 'country descriptions' do
|
|
405
405
|
it_splits '3934869528123',['39', '348', '695', '2812', '3'] # Mobile (8-digit subscriber no - new)
|
406
406
|
it_splits '393357210488', ['39', '335', '721', '0488'] # Mobile
|
407
407
|
it_splits '393248644272', ['39', '324', '864', '4272'] # Mobile
|
408
|
-
it_splits '
|
409
|
-
it_splits '
|
408
|
+
it_splits '3906123412', ['39', '06', '1234', '12'] # Roma 6 digit
|
409
|
+
it_splits '39061234123', ['39', '06', '1234', '123'] # Roma 7 digit
|
410
|
+
it_splits '390612341234', ['39', '06', '1234', '1234'] # Roma 8 digit
|
411
|
+
it_splits '3902888388', ['39', '02', '8883', '88'] # Milano 6 digit
|
412
|
+
it_splits '39028883888', ['39', '02', '8883', '888'] # Milano 7 digit
|
413
|
+
it_splits '390288838883', ['39', '02', '8883', '8883'] # Milano 8 digit
|
410
414
|
it_splits '390141595661', ['39', '0141', '595', '661'] # Asti
|
411
415
|
it_splits '3903123391', ['39', '031', '23391'] # Como
|
412
416
|
it_splits '390909709511', ['39', '090', '9709511'] # Barcellona
|
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.15.
|
4
|
+
version: 2.15.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Hanke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-22 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
|