phony 1.2.5 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/phony/countries/italy.rb +144 -94
- data/spec/lib/phony_spec.rb +3 -1
- metadata +3 -3
@@ -7,99 +7,149 @@ Phony::Countries::Italy = Phony::Country.configured :local_format => [3, 4],
|
|
7
7
|
:ndc_fallback_length => 3,
|
8
8
|
:ndc_mapping => {
|
9
9
|
:landline => [
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
:mobile => [
|
10
|
+
'010', # Genoa
|
11
|
+
'011', # Turin
|
12
|
+
'0122', # Sestrieres, Bardonecchia and other Susa Valley mountain resorts
|
13
|
+
'0125', # Ivrea
|
14
|
+
'0131', # Alessandria
|
15
|
+
'0141', # Asti
|
16
|
+
'015', # Biella
|
17
|
+
'0161', # Vercelli
|
18
|
+
'0165', # Aosta, Courmayeur
|
19
|
+
'0166', # Cervinia
|
20
|
+
'0171', # Cuneo
|
21
|
+
'0185', # Tigullio
|
22
|
+
'0187', # La Spezia and Cinque Terre
|
23
|
+
'019', # Savona
|
24
|
+
'02', # Milan
|
25
|
+
'030', # Brescia
|
26
|
+
'031', # Como
|
27
|
+
'0321', # Novara
|
28
|
+
'0331', # Varese
|
29
|
+
'0341', # Lecco
|
30
|
+
'0342', # Sondrio
|
31
|
+
'035', # Bergamo
|
32
|
+
'0369', # Mediaset Cologno Monzese and Segrate TV studios, geographical rate (used for polls, television programs, etc.)
|
33
|
+
'0376', # Mantua
|
34
|
+
'0382', # Pavia
|
35
|
+
'039', # Monza
|
36
|
+
'040', # Trieste
|
37
|
+
'041', # Venice
|
38
|
+
'0425', # Rovigo
|
39
|
+
'0432', # Udine
|
40
|
+
'0444', # Vicenza
|
41
|
+
'045', # Verona
|
42
|
+
'0461', # Trento
|
43
|
+
'0471', # Bolzano
|
44
|
+
'0481', # Gorizia
|
45
|
+
'049', # Padua
|
46
|
+
'050', # Pisa
|
47
|
+
'051', # Bologna
|
48
|
+
'0521', # Parma
|
49
|
+
'0522', # Reggio nell'Emilia
|
50
|
+
'0523', # Piacenza
|
51
|
+
'0532', # Ferrara
|
52
|
+
'0536', # Sassuolo
|
53
|
+
'0541', # Rimini
|
54
|
+
'0549', # San Marino (Most Serene Republic of San Marino)
|
55
|
+
'055', # Florence
|
56
|
+
'0573', # Pistoia
|
57
|
+
'0577', # Siena
|
58
|
+
'0586', # Livorno
|
59
|
+
'059', # Modena
|
60
|
+
'06', # Rome (including State of Vatican City) and Aprilia
|
61
|
+
'070', # Cagliari
|
62
|
+
'071', # Ancona
|
63
|
+
'075', # Perugia
|
64
|
+
'0769', # RAI Saxa Rubra Studios, geographical rate (used for polls, television programs, etc.)
|
65
|
+
'0771', # Fondi
|
66
|
+
'0773', # Latina
|
67
|
+
'0775', # Frosinone
|
68
|
+
'0789', # Olbia and Costa Smeralda
|
69
|
+
'079', # Sassari
|
70
|
+
'080', # Bari
|
71
|
+
'081', # Naples
|
72
|
+
'0823', # Caserta
|
73
|
+
'0824', # Benevento
|
74
|
+
'0825', # Avellino
|
75
|
+
'085', # Pescara
|
76
|
+
'0865', # Isernia
|
77
|
+
'0871', # Chieti
|
78
|
+
'0872', # Lanciano
|
79
|
+
'0873', # Vasto
|
80
|
+
'0874', # Campobasso
|
81
|
+
'0875', # Termoli
|
82
|
+
'0881', # Foggia
|
83
|
+
'089', # Salerno
|
84
|
+
'090', # Messina
|
85
|
+
'091', # Palermo
|
86
|
+
'092', # Agrigento
|
87
|
+
'095', # Catania
|
88
|
+
'0961', # Catanzaro
|
89
|
+
'0965', # Reggio di Calabria
|
90
|
+
'0971', # Potenza
|
91
|
+
'099', # Taranto
|
92
|
+
],
|
93
|
+
:mobile => [
|
94
|
+
'310',
|
95
|
+
'31100',
|
96
|
+
'31101',
|
97
|
+
'31102',
|
98
|
+
'31103',
|
99
|
+
'31104',
|
100
|
+
'31105',
|
101
|
+
'313',
|
102
|
+
'319',
|
103
|
+
*('3200'..'3209').to_a,
|
104
|
+
'322',
|
105
|
+
*('3230'..'3239').to_a,
|
106
|
+
*('3270'..'3279').to_a,
|
107
|
+
*('3280'..'3289').to_a,
|
108
|
+
*('3290'..'3299').to_a,
|
109
|
+
*('3300'..'3309').to_a,
|
110
|
+
'331',
|
111
|
+
*('3330'..'3339').to_a,
|
112
|
+
*('3340'..'3349').to_a,
|
113
|
+
*('3350'..'3359').to_a,
|
114
|
+
*('3360'..'3369').to_a,
|
115
|
+
*('3370'..'3379').to_a,
|
116
|
+
*('3380'..'3389').to_a,
|
117
|
+
*('3390'..'3399').to_a,
|
118
|
+
*('3400'..'3409').to_a,
|
119
|
+
'341',
|
120
|
+
*('3430'..'3439').to_a,
|
121
|
+
'345',
|
122
|
+
*('3460'..'3469').to_a,
|
123
|
+
*('3470'..'3479').to_a,
|
124
|
+
*('3480'..'3489').to_a,
|
125
|
+
*('3490'..'3499').to_a,
|
126
|
+
'350',
|
127
|
+
*('3600'..'3609').to_a,
|
128
|
+
'361',
|
129
|
+
'362',
|
130
|
+
*('3630'..'3639').to_a,
|
131
|
+
*('3660'..'3669').to_a,
|
132
|
+
*('3680'..'3689').to_a,
|
133
|
+
'370',
|
134
|
+
'373',
|
135
|
+
'377',
|
136
|
+
*('3800'..'3809').to_a,
|
137
|
+
*('3880'..'3889').to_a,
|
138
|
+
*('3890'..'3899').to_a,
|
139
|
+
*('3900'..'3909').to_a,
|
140
|
+
*('3910'..'3919').to_a,
|
141
|
+
*('3920'..'3929').to_a,
|
142
|
+
*('3930'..'3939').to_a,
|
143
|
+
'397',
|
144
|
+
],
|
94
145
|
:service => [ # Not exhaustive.
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
]
|
146
|
+
'112',
|
147
|
+
'113',
|
148
|
+
'115',
|
149
|
+
'117',
|
150
|
+
'118',
|
151
|
+
'1515',
|
152
|
+
'1518',
|
153
|
+
'1530'
|
154
|
+
]
|
105
155
|
}
|
data/spec/lib/phony_spec.rb
CHANGED
@@ -59,7 +59,9 @@ describe Phony do
|
|
59
59
|
Phony.split('3612345678').should == ['36', '1', '234', '5678']
|
60
60
|
end
|
61
61
|
it "should handle italian numbers" do
|
62
|
-
Phony.split('
|
62
|
+
Phony.split('3934869528').should == ['39', '3486', '952', '8'] # Mobile
|
63
|
+
Phony.split('39068546705').should == ['39', '06', '854', '6705'] # Roma
|
64
|
+
Phony.split('390909709511').should == ['39', '090', '970', '9511'] # Barcellona
|
63
65
|
end
|
64
66
|
it 'handles malay numbers' do
|
65
67
|
Phony.split('6082123456').should == ['60', '82', '123456'] # Kuching
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 1.2.
|
8
|
+
- 6
|
9
|
+
version: 1.2.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Florian Hanke
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-24 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|