phony 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- '10', # Genoa
11
- '11', # Turin
12
- '122', # Sestrieres, Bardonecchia and other Susa Valley mountain resorts
13
- '125', # Ivrea
14
- '131', # Alessandria
15
- '141', # Asti
16
- '15', # Biella
17
- '161', # Vercelli
18
- '165', # Aosta, Courmayeur
19
- '166', # Cervinia
20
- '171', # Cuneo
21
- '185', # Tigullio
22
- '187', # La Spezia and Cinque Terre
23
- '19', # Savona
24
- '2', # Milan
25
- '30', # Brescia
26
- '31', # Como
27
- '321', # Novara
28
- '331', # Varese
29
- '341', # Lecco
30
- '342', # Sondrio
31
- '35', # Bergamo
32
- '369', # Mediaset Cologno Monzese and Segrate TV studios, geographical rate (used for polls, television programs, etc.)
33
- '376', # Mantua
34
- '382', # Pavia
35
- '39', # Monza
36
- '40', # Trieste
37
- '41', # Venice
38
- '425', # Rovigo
39
- '432', # Udine
40
- '444', # Vicenza
41
- '45', # Verona
42
- '461', # Trento
43
- '471', # Bolzano
44
- '481', # Gorizia
45
- '49', # Padua
46
- '50', # Pisa
47
- '51', # Bologna
48
- '521', # Parma
49
- '522', # Reggio nell'Emilia
50
- '523', # Piacenza
51
- '532', # Ferrara
52
- '536', # Sassuolo
53
- '541', # Rimini
54
- '549', # San Marino (Most Serene Republic of San Marino)
55
- '55', # Florence
56
- '573', # Pistoia
57
- '577', # Siena
58
- '586', # Livorno
59
- '59', # Modena
60
- '6', # Rome (including State of Vatican City) and Aprilia
61
- '70', # Cagliari
62
- '71', # Ancona
63
- '75', # Perugia
64
- '769', # RAI Saxa Rubra Studios, geographical rate (used for polls, television programs, etc.)
65
- '771', # Fondi
66
- '773', # Latina
67
- '775', # Frosinone
68
- '789', # Olbia and Costa Smeralda
69
- '79', # Sassari
70
- '80', # Bari
71
- '81', # Naples
72
- '823', # Caserta
73
- '824', # Benevento
74
- '825', # Avellino
75
- '85', # Pescara
76
- '865', # Isernia
77
- '871', # Chieti
78
- '872', # Lanciano
79
- '873', # Vasto
80
- '874', # Campobasso
81
- '875', # Termoli
82
- '881', # Foggia
83
- '89', # Salerno
84
- '90', # Messina
85
- '91', # Palermo
86
- '92', # Agrigento
87
- '95', # Catania
88
- '961', # Catanzaro
89
- '965', # Reggio di Calabria
90
- '971', # Potenza
91
- '99', # Taranto
92
- ],
93
- :mobile => [], # TODO
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
- '112',
96
- '113',
97
- '115',
98
- '117',
99
- '118',
100
- '878',
101
- '1515',
102
- '1518',
103
- '1530'
104
- ]
146
+ '112',
147
+ '113',
148
+ '115',
149
+ '117',
150
+ '118',
151
+ '1515',
152
+ '1518',
153
+ '1530'
154
+ ]
105
155
  }
@@ -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('3928061371').should == ['39', '2', '806', '1371']
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
- - 5
9
- version: 1.2.5
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-21 00:00:00 +01:00
17
+ date: 2011-01-24 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies: []
20
20