phony 1.4.3 → 1.4.4

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.
@@ -150,7 +150,7 @@ Phony.define do
150
150
 
151
151
  # TODO Colombia.
152
152
  #
153
- country '57', default
153
+ country '57', todo
154
154
 
155
155
  # Venezuela (Bolivarian Republic of)
156
156
  #
@@ -162,8 +162,8 @@ Phony.define do
162
162
  #
163
163
  country '61', match(/^(4\d\d)\d+$/) >> split(3,3) | # Mobile
164
164
  fixed(1) >> split(4,4) # Rest
165
- country '62', default # TODO Indonesia (Republic of)
166
- country '63', default # TODO Philippines (Republic of the)
165
+ country '62', todo # TODO Indonesia (Republic of)
166
+ country '63', todo # TODO Philippines (Republic of the)
167
167
 
168
168
  # New Zealand.
169
169
  #
@@ -171,14 +171,20 @@ Phony.define do
171
171
  #
172
172
  country '64', fixed(1) >> split(3,4)
173
173
 
174
- country '65', default # TODO Singapore (Republic of)
175
- country '66', default # TODO Thailand
174
+ # Singapore (Republic of).
175
+ #
176
+ country '65', none >> split(4,4) # TODO Short Codes.
177
+
178
+ # Thailand.
179
+ #
180
+ country '66', one_of('2') >> split(3,4) | # Bangkok
181
+ fixed(2) >> split(3,3) # Rest
176
182
 
177
- country '81', default # TODO Japan
183
+ country '81', todo # TODO Japan
178
184
 
179
185
  # country '82' # SouthKorea, see special file.
180
186
 
181
- country '84', default # TODO Viet Nam (Socialist Republic of)
187
+ country '84', todo # TODO Viet Nam (Socialist Republic of)
182
188
 
183
189
  # country '86' # China, see special file.
184
190
 
@@ -186,8 +192,8 @@ Phony.define do
186
192
  #
187
193
  country '90', fixed(3) >> split(3,4) # Wiki says 7, but the examples say 3, 4.
188
194
 
189
- country '91', default # TODO India (Republic of)
190
- country '92', default # TODO Pakistan (Islamic Republic of), http://en.wikipedia.org/wiki/Telephone_numbers_in_Pakistan, NDC 2-5
195
+ country '91', todo # TODO India (Republic of)
196
+ country '92', todo # TODO Pakistan (Islamic Republic of), http://en.wikipedia.org/wiki/Telephone_numbers_in_Pakistan, NDC 2-5
191
197
 
192
198
  # Afghanistan.
193
199
  #
@@ -199,95 +205,95 @@ Phony.define do
199
205
  country '95', fixed(2) >> split(3,2,2) # TODO Myanmar (Union of)
200
206
  country '98', fixed(2) >> split(3,2,2) # TODO Iran (Islamic Republic of)
201
207
 
202
- country '210', default # -
203
- country '211', default # -
204
- country '212', default # Morocco
208
+ country '210', todo # -
209
+ country '211', todo # -
210
+ country '212', todo # Morocco
205
211
  country '213', fixed(2) >> split(3,4) # Algeria
206
- country '214', default # -
207
- country '215', default # -
212
+ country '214', todo # -
213
+ country '215', todo # -
208
214
  country '216', fixed(1) >> split(3,4) # Tunisia
209
- country '217', default # -
210
- country '218', default # Lybia
211
- country '219', default # -
212
-
213
- country '220', default # Gambia
214
- country '221', default # Senegal
215
- country '222', default # Mauritania
216
- country '223', default # Mali
217
- country '224', default # Guinea
218
- country '225', default # Côte d'Ivoire
219
- country '226', default # Burkina Faso
220
- country '227', default # Niger
221
- country '228', default # Togolese Republic
222
- country '229', default # Benin
223
-
224
- country '230', default # Mauritius
225
- country '231', default # Liberia
226
- country '232', default # Sierra Leone
227
- country '233', default # Ghana
228
- country '234', default # Nigeria
229
- country '235', default # Chad
230
- country '236', default # Central African Republic
231
- country '237', default # Cameroon
232
- country '238', default # Cape Verde
233
- country '239', default # Sao Tome and Principe
234
-
235
- country '240', default # Equatorial Guinea
236
- country '241', default # Gabonese Republic
237
- country '242', default # Congo
238
- country '243', default # Democratic Republic of the Congo
239
- country '244', default # Angola
240
- country '245', default # Guinea-Bissau
241
- country '246', default # Diego Garcia
242
- country '247', default # Ascension
243
- country '248', default # Seychelles
244
- country '249', default # Sudan
245
-
246
- country '250', default # Rwanda
247
- country '251', default # Ethiopia
248
- country '252', default # Somali Democratic Republic
249
- country '253', default # Djibouti
250
- country '254', default # Kenya
251
- country '255', default # Tanzania
252
- country '256', default # Uganda
253
- country '257', default # Burundi
254
- country '258', default # Mozambique
255
- country '259', default # -
256
-
257
- country '260', default # Zambia
258
- country '261', default # Madagascar
259
- country '262', default # Reunion / Mayotte (new)
260
- country '263', default # Zimbabwe
261
- country '264', default # Namibia
262
- country '265', default # Malawi
263
- country '266', default # Lesotho
264
- country '267', default # Botswana
265
- country '268', default # Swaziland
266
- country '269', default # Comoros
267
-
268
- country '280', default # -
269
- country '281', default # -
270
- country '282', default # -
271
- country '283', default # -
272
- country '284', default # -
273
- country '285', default # -
274
- country '286', default # -
275
- country '287', default # -
276
- country '288', default # -
277
- country '289', default # -
278
- country '290', default # Saint Helena
279
-
280
- country '291', default # Eritrea
281
- country '292', default # -
282
- country '293', default # -
283
- country '294', default # -
284
- country '295', default # -
285
- country '296', default # -
286
- country '297', default # Aruba
287
- country '298', default # Faroe Islands
288
- country '299', default # Greenland
289
-
290
- country '350', default # Gibraltar
215
+ country '217', todo # -
216
+ country '218', todo # Lybia
217
+ country '219', todo # -
218
+
219
+ country '220', todo # Gambia
220
+ country '221', todo # Senegal
221
+ country '222', todo # Mauritania
222
+ country '223', todo # Mali
223
+ country '224', todo # Guinea
224
+ country '225', todo # Côte d'Ivoire
225
+ country '226', todo # Burkina Faso
226
+ country '227', todo # Niger
227
+ country '228', todo # Togolese Republic
228
+ country '229', todo # Benin
229
+
230
+ country '230', todo # Mauritius
231
+ country '231', todo # Liberia
232
+ country '232', todo # Sierra Leone
233
+ country '233', todo # Ghana
234
+ country '234', todo # Nigeria
235
+ country '235', todo # Chad
236
+ country '236', todo # Central African Republic
237
+ country '237', todo # Cameroon
238
+ country '238', todo # Cape Verde
239
+ country '239', todo # Sao Tome and Principe
240
+
241
+ country '240', todo # Equatorial Guinea
242
+ country '241', todo # Gabonese Republic
243
+ country '242', todo # Congo
244
+ country '243', todo # Democratic Republic of the Congo
245
+ country '244', todo # Angola
246
+ country '245', todo # Guinea-Bissau
247
+ country '246', todo # Diego Garcia
248
+ country '247', todo # Ascension
249
+ country '248', todo # Seychelles
250
+ country '249', todo # Sudan
251
+
252
+ country '250', todo # Rwanda
253
+ country '251', todo # Ethiopia
254
+ country '252', todo # Somali Democratic Republic
255
+ country '253', todo # Djibouti
256
+ country '254', todo # Kenya
257
+ country '255', todo # Tanzania
258
+ country '256', todo # Uganda
259
+ country '257', todo # Burundi
260
+ country '258', todo # Mozambique
261
+ country '259', todo # -
262
+
263
+ country '260', todo # Zambia
264
+ country '261', todo # Madagascar
265
+ country '262', todo # Reunion / Mayotte (new)
266
+ country '263', todo # Zimbabwe
267
+ country '264', todo # Namibia
268
+ country '265', todo # Malawi
269
+ country '266', todo # Lesotho
270
+ country '267', todo # Botswana
271
+ country '268', todo # Swaziland
272
+ country '269', todo # Comoros
273
+
274
+ country '280', todo # -
275
+ country '281', todo # -
276
+ country '282', todo # -
277
+ country '283', todo # -
278
+ country '284', todo # -
279
+ country '285', todo # -
280
+ country '286', todo # -
281
+ country '287', todo # -
282
+ country '288', todo # -
283
+ country '289', todo # -
284
+ country '290', todo # Saint Helena
285
+
286
+ country '291', todo # Eritrea
287
+ country '292', todo # -
288
+ country '293', todo # -
289
+ country '294', todo # -
290
+ country '295', todo # -
291
+ country '296', todo # -
292
+ country '297', todo # Aruba
293
+ country '298', todo # Faroe Islands
294
+ country '299', todo # Greenland
295
+
296
+ country '350', todo # Gibraltar
291
297
 
292
298
  # Portugal.
293
299
  #
@@ -296,12 +302,12 @@ Phony.define do
296
302
  one_of('21', '22') >> split(3,4) | # Lisboa & Porto
297
303
  fixed(3) >> split(3,4) # 3-digit NDCs
298
304
 
299
- country '352', default # Luxembourg
300
- country '353', default # Ireland (0-3-4)
305
+ country '352', todo # Luxembourg
306
+ country '353', todo # Ireland (0-3-4)
301
307
  country '354', none >> split(3,4) # Iceland
302
- country '355', default # Albania
303
- country '356', default # Malta
304
- country '357', default # Cyprus
308
+ country '355', todo # Albania
309
+ country '356', todo # Malta
310
+ country '357', todo # Cyprus
305
311
 
306
312
  # Finland.
307
313
  #
@@ -319,21 +325,21 @@ Phony.define do
319
325
  one_of('37','41') >> split(2,2,2) | # Kaunas, Šiauliai
320
326
  fixed(3) >> split(1,2,2) # 3-digit NDCs.
321
327
 
322
- country '371', default # Latvia
323
- country '372', default # Estonia
324
- country '373', default # Moldova
325
- country '374', default # Armenia
326
- country '375', default # Belarus
327
- country '376', default # Andorra
328
- country '377', default # Monaco
329
- country '378', default # San Marino
330
- country '379', default # Vatican City State
331
-
332
- country '380', default # Ukraine
333
- country '381', default # Serbia and Montenegro
334
- country '382', default # -
335
- country '383', default # -
336
- country '384', default # -
328
+ country '371', todo # Latvia
329
+ country '372', todo # Estonia
330
+ country '373', todo # Moldova
331
+ country '374', todo # Armenia
332
+ country '375', todo # Belarus
333
+ country '376', todo # Andorra
334
+ country '377', todo # Monaco
335
+ country '378', todo # San Marino
336
+ country '379', todo # Vatican City State
337
+
338
+ country '380', todo # Ukraine
339
+ country '381', todo # Serbia and Montenegro
340
+ country '382', todo # -
341
+ country '383', todo # -
342
+ country '384', todo # -
337
343
 
338
344
  # Croatia.
339
345
  #
@@ -353,166 +359,166 @@ Phony.define do
353
359
  one_of('2') >> split(8) | # Bratislava
354
360
  fixed(2) >> split(7) # 2-digit NDCs
355
361
 
356
- country '422', default # Spare code
362
+ country '422', todo # Spare code
357
363
  country '423', none >> split(3,2,2) # Liechtenstein (Principality of)
358
- country '424', default # -
359
- country '425', default # -
360
- country '426', default # -
361
- country '427', default # -
362
- country '428', default # -
363
- country '429', default # -
364
-
365
- country '500', default # Falkland Islands (Malvinas)
366
- country '501', default # Belize
367
- country '502', default # Guatemala (Republic of)
368
- country '503', default # El Salvador (Republic of)
369
- country '504', default # Honduras (Republic of)
370
- country '505', default # Nicaragua
371
- country '506', default # Costa Rica
372
- country '507', default # Panama (Republic of)
373
- country '508', default # Saint Pierre and Miquelon (Collectivité territoriale de la République française)
374
- country '509', default # Haiti (Republic of)
375
-
376
- country '590', default # Guadeloupe (French Department of)
377
- country '591', default # Bolivia (Republic of)
378
- country '592', default # Guyana
379
- country '593', default # Ecuador
380
- country '594', default # French Guiana (French Department of)
381
- country '595', default # Paraguay (Republic of)
382
- country '596', default # Martinique (French Department of)
383
- country '597', default # Suriname (Republic of)
384
- country '598', default # Uruguay (Eastern Republic of)
385
- country '599', default # Netherlands Antilles
386
-
387
- country '670', default # Democratic Republic of Timor-Leste
388
- country '671', default # Spare code
389
- country '672', default # Australian External Territories
390
- country '673', default # Brunei Darussalam
391
- country '674', default # Nauru (Republic of)
392
- country '675', default # Papua New Guinea
393
- country '676', default # Tonga (Kingdom of)
394
- country '677', default # Solomon Islands
395
- country '678', default # Vanuatu (Republic of)
396
- country '679', default # Fiji (Republic of)
397
-
398
- country '680', default # Palau (Republic of)
399
- country '681', default # Wallis and Futuna (Territoire français d'outre-mer)
400
- country '682', default # Cook Islands
401
- country '683', default # Niue
402
- country '684', default # -
403
- country '685', default # Samoa (Independent State of)
404
- country '686', default # Kiribati (Republic of)
405
- country '687', default # New Caledonia (Territoire français d'outre-mer)
406
- country '688', default # Tuvalu
407
- country '689', default # French Polynesia (Territoire français d'outre-mer)
408
-
409
- country '690', default # Tokelau
410
- country '691', default # Micronesia (Federated States of)
411
- country '692', default # Marshall Islands (Republic of the)
412
- country '693', default # -
413
- country '694', default # -
414
- country '695', default # -
415
- country '696', default # -
416
- country '697', default # -
417
- country '698', default # -
418
- country '699', default # -
419
-
420
- country '800', default # International Freephone Service
421
- country '801', default # -
422
- country '802', default # -
423
- country '803', default # -
424
- country '804', default # -
425
- country '805', default # -
426
- country '806', default # -
427
- country '807', default # -
428
- country '808', default # International Shared Cost Service (ISCS)
429
- country '809', default # -
430
-
431
- country '830', default # -
432
- country '831', default # -
433
- country '832', default # -
434
- country '833', default # -
435
- country '834', default # -
436
- country '835', default # -
437
- country '836', default # -
438
- country '837', default # -
439
- country '838', default # -
440
- country '839', default # -
441
-
442
- country '850', default # Democratic People's Republic of Korea
443
- country '851', default # Spare code
444
- country '852', default # Hong Kong, China
445
- country '853', default # Macao, China
446
- country '854', default # Spare code
447
- country '855', default # Cambodia (Kingdom of)
448
- country '856', default # Lao People's Democratic Republic
449
- country '857', default # Spare code
450
- country '858', default # Spare code
451
- country '859', default # Spare code
452
-
453
- country '870', default # Inmarsat SNAC
454
- country '871', default # Inmarsat (Atlantic Ocean-East)
455
- country '872', default # Inmarsat (Pacific Ocean)
456
- country '873', default # Inmarsat (Indian Ocean)
457
- country '874', default # Inmarsat (Atlantic Ocean-West)
458
- country '875', default # Reserved - Maritime Mobile Service Applications
459
- country '876', default # Reserved - Maritime Mobile Service Applications
460
- country '877', default # Reserved - Maritime Mobile Service Applications
461
- country '878', default # Universal Personal Telecommunication Service (UPT)
462
- country '879', default # Reserved for national non-commercial purposes
463
-
464
- country '880', default # Bangladesh (People's Republic of)
465
- country '881', default # International Mobile, shared code
466
- country '882', default # International Networks, shared code
467
- country '883', default # -
468
- country '884', default # -
469
- country '885', default # -
470
- country '886', default # Reserved
471
- country '887', default # -
472
- country '888', default # Reserved for future global service
473
- country '889', default # -
474
-
475
- country '890', default # -
476
- country '891', default # -
477
- country '892', default # -
478
- country '893', default # -
479
- country '894', default # -
480
- country '895', default # -
481
- country '896', default # -
482
- country '897', default # -
483
- country '898', default # -
484
- country '899', default # -
485
-
486
- country '960', default # Maldives (Republic of)
487
- country '961', default # Lebanon
488
- country '962', default # Jordan (Hashemite Kingdom of)
489
- country '963', default # Syrian Arab Republic
490
- country '964', default # Iraq (Republic of)
491
- country '965', default # Kuwait (State of)
492
- country '966', default # Saudi Arabia (Kingdom of)
493
- country '967', default # Yemen (Republic of)
494
- country '968', default # Oman (Sultanate of)
495
- country '969', default # Reserved - reservation currently under investigation
496
-
497
- country '970', default # Reserved
498
- country '971', default # United Arab Emirates
499
- country '972', default # Israel (State of)
500
- country '973', default # Bahrain (Kingdom of)
501
- country '974', default # Qatar (State of)
502
- country '975', default # Bhutan (Kingdom of)
503
- country '976', default # Mongolia
504
- country '977', default # Nepal
505
- country '978', default # -
506
- country '979', default # International Premium Rate Service (IPRS)
507
-
508
- country '990', default # Spare code
509
- country '991', default # Trial of a proposed new international telecommunication public correspondence service, shared code
510
- country '992', default # Tajikistan (Republic of)
511
- country '993', default # Turkmenistan
512
- country '994', default # Azerbaijani Republic
513
- country '995', default # Georgia
514
- country '996', default # Kyrgyz Republic
515
- country '997', default # Spare code
516
- country '998', default # Uzbekistan (Republic of)
517
- country '999', default # Reserved for possible future use within the Telecommunications for Disaster Relief (TDR) concept
364
+ country '424', todo # -
365
+ country '425', todo # -
366
+ country '426', todo # -
367
+ country '427', todo # -
368
+ country '428', todo # -
369
+ country '429', todo # -
370
+
371
+ country '500', todo # Falkland Islands (Malvinas)
372
+ country '501', todo # Belize
373
+ country '502', todo # Guatemala (Republic of)
374
+ country '503', todo # El Salvador (Republic of)
375
+ country '504', todo # Honduras (Republic of)
376
+ country '505', todo # Nicaragua
377
+ country '506', todo # Costa Rica
378
+ country '507', todo # Panama (Republic of)
379
+ country '508', todo # Saint Pierre and Miquelon (Collectivité territoriale de la République française)
380
+ country '509', todo # Haiti (Republic of)
381
+
382
+ country '590', todo # Guadeloupe (French Department of)
383
+ country '591', todo # Bolivia (Republic of)
384
+ country '592', todo # Guyana
385
+ country '593', todo # Ecuador
386
+ country '594', todo # French Guiana (French Department of)
387
+ country '595', todo # Paraguay (Republic of)
388
+ country '596', todo # Martinique (French Department of)
389
+ country '597', todo # Suriname (Republic of)
390
+ country '598', todo # Uruguay (Eastern Republic of)
391
+ country '599', todo # Netherlands Antilles
392
+
393
+ country '670', todo # Democratic Republic of Timor-Leste
394
+ country '671', todo # Spare code
395
+ country '672', todo # Australian External Territories
396
+ country '673', todo # Brunei Darussalam
397
+ country '674', todo # Nauru (Republic of)
398
+ country '675', todo # Papua New Guinea
399
+ country '676', todo # Tonga (Kingdom of)
400
+ country '677', todo # Solomon Islands
401
+ country '678', todo # Vanuatu (Republic of)
402
+ country '679', todo # Fiji (Republic of)
403
+
404
+ country '680', todo # Palau (Republic of)
405
+ country '681', todo # Wallis and Futuna (Territoire français d'outre-mer)
406
+ country '682', todo # Cook Islands
407
+ country '683', todo # Niue
408
+ country '684', todo # -
409
+ country '685', todo # Samoa (Independent State of)
410
+ country '686', todo # Kiribati (Republic of)
411
+ country '687', todo # New Caledonia (Territoire français d'outre-mer)
412
+ country '688', todo # Tuvalu
413
+ country '689', todo # French Polynesia (Territoire français d'outre-mer)
414
+
415
+ country '690', todo # Tokelau
416
+ country '691', todo # Micronesia (Federated States of)
417
+ country '692', todo # Marshall Islands (Republic of the)
418
+ country '693', todo # -
419
+ country '694', todo # -
420
+ country '695', todo # -
421
+ country '696', todo # -
422
+ country '697', todo # -
423
+ country '698', todo # -
424
+ country '699', todo # -
425
+
426
+ country '800', todo # International Freephone Service
427
+ country '801', todo # -
428
+ country '802', todo # -
429
+ country '803', todo # -
430
+ country '804', todo # -
431
+ country '805', todo # -
432
+ country '806', todo # -
433
+ country '807', todo # -
434
+ country '808', todo # International Shared Cost Service (ISCS)
435
+ country '809', todo # -
436
+
437
+ country '830', todo # -
438
+ country '831', todo # -
439
+ country '832', todo # -
440
+ country '833', todo # -
441
+ country '834', todo # -
442
+ country '835', todo # -
443
+ country '836', todo # -
444
+ country '837', todo # -
445
+ country '838', todo # -
446
+ country '839', todo # -
447
+
448
+ country '850', todo # Democratic People's Republic of Korea
449
+ country '851', todo # Spare code
450
+ country '852', todo # Hong Kong, China
451
+ country '853', todo # Macao, China
452
+ country '854', todo # Spare code
453
+ country '855', todo # Cambodia (Kingdom of)
454
+ country '856', todo # Lao People's Democratic Republic
455
+ country '857', todo # Spare code
456
+ country '858', todo # Spare code
457
+ country '859', todo # Spare code
458
+
459
+ country '870', todo # Inmarsat SNAC
460
+ country '871', todo # Inmarsat (Atlantic Ocean-East)
461
+ country '872', todo # Inmarsat (Pacific Ocean)
462
+ country '873', todo # Inmarsat (Indian Ocean)
463
+ country '874', todo # Inmarsat (Atlantic Ocean-West)
464
+ country '875', todo # Reserved - Maritime Mobile Service Applications
465
+ country '876', todo # Reserved - Maritime Mobile Service Applications
466
+ country '877', todo # Reserved - Maritime Mobile Service Applications
467
+ country '878', todo # Universal Personal Telecommunication Service (UPT)
468
+ country '879', todo # Reserved for national non-commercial purposes
469
+
470
+ country '880', todo # Bangladesh (People's Republic of)
471
+ country '881', todo # International Mobile, shared code
472
+ country '882', todo # International Networks, shared code
473
+ country '883', todo # -
474
+ country '884', todo # -
475
+ country '885', todo # -
476
+ country '886', todo # Reserved
477
+ country '887', todo # -
478
+ country '888', todo # Reserved for future global service
479
+ country '889', todo # -
480
+
481
+ country '890', todo # -
482
+ country '891', todo # -
483
+ country '892', todo # -
484
+ country '893', todo # -
485
+ country '894', todo # -
486
+ country '895', todo # -
487
+ country '896', todo # -
488
+ country '897', todo # -
489
+ country '898', todo # -
490
+ country '899', todo # -
491
+
492
+ country '960', todo # Maldives (Republic of)
493
+ country '961', todo # Lebanon
494
+ country '962', todo # Jordan (Hashemite Kingdom of)
495
+ country '963', todo # Syrian Arab Republic
496
+ country '964', todo # Iraq (Republic of)
497
+ country '965', todo # Kuwait (State of)
498
+ country '966', todo # Saudi Arabia (Kingdom of)
499
+ country '967', todo # Yemen (Republic of)
500
+ country '968', todo # Oman (Sultanate of)
501
+ country '969', todo # Reserved - reservation currently under investigation
502
+
503
+ country '970', todo # Reserved
504
+ country '971', todo # United Arab Emirates
505
+ country '972', todo # Israel (State of)
506
+ country '973', todo # Bahrain (Kingdom of)
507
+ country '974', todo # Qatar (State of)
508
+ country '975', todo # Bhutan (Kingdom of)
509
+ country '976', todo # Mongolia
510
+ country '977', todo # Nepal
511
+ country '978', todo # -
512
+ country '979', todo # International Premium Rate Service (IPRS)
513
+
514
+ country '990', todo # Spare code
515
+ country '991', todo # Trial of a proposed new international telecommunication public correspondence service, shared code
516
+ country '992', todo # Tajikistan (Republic of)
517
+ country '993', todo # Turkmenistan
518
+ country '994', todo # Azerbaijani Republic
519
+ country '995', todo # Georgia
520
+ country '996', todo # Kyrgyz Republic
521
+ country '997', todo # Spare code
522
+ country '998', todo # Uzbekistan (Republic of)
523
+ country '999', todo # Reserved for possible future use within the Telecommunications for Disaster Relief (TDR) concept
518
524
  end
data/lib/phony/dsl.rb CHANGED
@@ -73,7 +73,7 @@ module Phony
73
73
  def match regex, options = {}
74
74
  NationalSplitters::Regex.instance_for regex, options[:on_fail_take]
75
75
  end
76
- def default
76
+ def todo
77
77
  none >> NationalSplitters::Default.instance_for
78
78
  end
79
79
 
@@ -158,10 +158,17 @@ describe 'country descriptions' do
158
158
  Phony.split('825112345678').should == ['82', '51', '1234', '5678'] # Busan
159
159
  Phony.split('821027975588').should == ['82', '10', '2797', '5588'] # mobile
160
160
  end
161
+ it 'handles thai numbers' do
162
+ Phony.split('6621231234').should == ['66', '2', '123', '1234'] # Bangkok
163
+ Phony.split('6636123123').should == ['66', '36', '123', '123'] # Lop Buri
164
+ end
161
165
  it 'handles tunisian numbers' do
162
166
  Phony.split('21611231234').should == ['216', '1', '123', '1234'] # Ariana
163
167
  Phony.split('21621231234').should == ['216', '2', '123', '1234'] # Bizerte
164
168
  end
169
+ it "handles singaporean numbers" do
170
+ Phony.split('6561231234').should == ['65', '6123', '1234'] # Fixed line
171
+ end
165
172
  it "handles slovakian numbers" do
166
173
  Phony.split('421912123456').should == ['421', '912', '123456'] # Mobile
167
174
  Phony.split('421212345678').should == ['421', '2', '12345678'] # Bratislava
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+ #
3
+ require 'spec_helper'
4
+
5
+ describe Phony::DSL do
6
+
7
+ it 'has a todo' do
8
+ Phony.define do
9
+ todo.split("123456789012345").should == ["123456789012345"]
10
+ end
11
+ end
12
+
13
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.4.3
5
+ version: 1.4.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Florian Hanke
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-16 00:00:00 +10:00
13
+ date: 2011-08-01 00:00:00 +10:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -51,6 +51,7 @@ files:
51
51
  - spec/lib/phony/countries_spec.rb
52
52
  - spec/lib/phony/country_codes_spec.rb
53
53
  - spec/lib/phony/country_spec.rb
54
+ - spec/lib/phony/dsl_spec.rb
54
55
  - spec/lib/phony/local_splitters/fixed_spec.rb
55
56
  - spec/lib/phony/local_splitters/regex_spec.rb
56
57
  - spec/lib/phony/national_code_spec.rb
@@ -92,6 +93,7 @@ test_files:
92
93
  - spec/lib/phony/countries_spec.rb
93
94
  - spec/lib/phony/country_codes_spec.rb
94
95
  - spec/lib/phony/country_spec.rb
96
+ - spec/lib/phony/dsl_spec.rb
95
97
  - spec/lib/phony/local_splitters/fixed_spec.rb
96
98
  - spec/lib/phony/local_splitters/regex_spec.rb
97
99
  - spec/lib/phony/national_code_spec.rb