elskwid-phone 0.9.9.2 → 0.9.9.3

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.rdoc CHANGED
@@ -84,11 +84,13 @@ Parse testing for different countries.
84
84
 
85
85
  Currently tested on:
86
86
  [BA] Bosnia and Herzegovina
87
+ [BE] Belgium
87
88
  [DE] Germany
88
89
  [FR] France
89
90
  [GB] United Kingdom
90
91
  [HR] Croatia
91
92
  [HU] Hungary
93
+ [NL] Netherlands
92
94
  [RS] Serbia
93
95
  [SE] Sweden
94
96
  [SI] Slovenia
@@ -371,6 +371,7 @@
371
371
  :char_3_code: NL
372
372
  :name: Netherlands
373
373
  :international_dialing_prefix: "0"
374
+ :area_code: "6760|66|6|800|878|8[4578]|90[069]|1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7[0-9]|11[134578]|16[124-8]|17[24]|18[0-467]|22[2-46-9]|25[125]|29[479]|31[3-8]|32[01]|34[1-8]|41[12368]|47[58]|48[15-8]|49[23579]|5[129][1-9]|54[134-8]|56[126]|57[0-3578]"
374
375
  "850":
375
376
  :country_code: "850"
376
377
  :national_dialing_prefix: "0"
@@ -413,6 +414,7 @@
413
414
  :char_3_code: BE
414
415
  :name: Belgium
415
416
  :international_dialing_prefix: "0"
417
+ :area_code: "800|90[0-9]|2|3|4|9|1[0-69]|5[0-9]|6[013-9]|7[01]|8[1-9]"
416
418
  "965":
417
419
  :country_code: "965"
418
420
  :national_dialing_prefix: None
@@ -0,0 +1,116 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+
3
+ ## Belgium
4
+ class BETest < Test::Unit::TestCase
5
+
6
+ ## single digit
7
+ # 02: Brussels (Bruxelles/Brussel)
8
+ def test_brussels
9
+ parse_test('+32 2 1234567', '32', '2', '1234567')
10
+ end
11
+ # 03: Antwerpen (Antwerp), Sint-Niklaas
12
+ def test_antwerpen
13
+ parse_test('+32 3 1234567', '32', '3', '1234567')
14
+ end
15
+ # 04: Liège (Luik), Voeren (Fourons)
16
+ def test_liege
17
+ parse_test('+32 4 1234567', '32', '4', '1234567')
18
+ end
19
+ # 09: Gent (Ghent/Gand)
20
+ def test_gent
21
+ parse_test('+32 9 1234567', '32', '9', '1234567')
22
+ end
23
+
24
+ ## two digit
25
+ # 010: Wavre (Waver)
26
+ def test_wavre
27
+ parse_test('+32 10 123456', '32', '10', '123456')
28
+ end
29
+ # 011: Hasselt
30
+ def test_hasselt
31
+ parse_test('+32 11 123456', '32', '11', '123456')
32
+ end
33
+ # 012: Tongeren (Tongres)
34
+ def test_tongeren
35
+ parse_test('+32 12 123456', '32', '12', '123456')
36
+ end
37
+ # 013: Diest
38
+ def test_diest
39
+ parse_test('+32 13 123456', '32', '13', '123456')
40
+ end
41
+ # 014: Herentals, Turnhout
42
+ # 015: Mechelen (Malines)
43
+ # 016: Leuven (Louvain), Tienen (Tirlemont)
44
+ # 019: Waremme (Borgworm)
45
+ def test_waremme
46
+ parse_test('+32 19 123456', '32', '19', '123456')
47
+ end
48
+
49
+ # 050: Brugge (Bruges), Zeebrugge
50
+ def test_brugge
51
+ parse_test('+32 50 123456', '32', '50', '123456')
52
+ end
53
+ # 051: Roeselare (Roulers)
54
+ def test_roeselare
55
+ parse_test('+32 51 123456', '32', '51', '123456')
56
+ end
57
+ # 052: Dendermonde (Termonde)
58
+ # 053: Aalst (Alost)
59
+ # 054: Ninove
60
+ # 055: Ronse (Renaix)
61
+ # 056: Kortrijk (Courtrai), Comines-Warneton, Mouscron (Moeskroen)
62
+ # 057: Ieper (Ypres)
63
+ # 058: Veurne (Furnes)
64
+ # 059: Oostende (Ostend)
65
+ def test_oostende
66
+ parse_test('+32 59 123456', '32', '59', '123456')
67
+ end
68
+
69
+ # 060: Chimay
70
+ def test_chimay
71
+ parse_test('+32 60 123456', '32', '60', '123456')
72
+ end
73
+ # 061: Bastogne, Libramont-Chevigny
74
+ # 063: Arlon (Aarlen)
75
+ # 064: La Louviere
76
+ # 065: Mons (Bergen)
77
+ # 067: Nivelles (Nijvel)
78
+ def test_nivelles
79
+ parse_test('+32 67 123456', '32', '67', '123456')
80
+ end
81
+ # 068: Ath (Aat)
82
+ # 069: Tournai (Doornik)
83
+
84
+ # 070: Specialty Numbers (i.e. bus information or bank information)
85
+ def test_specialty
86
+ parse_test('+32 70 123456', '32', '70', '123456')
87
+ end
88
+ # 071: Charleroi
89
+
90
+ # 081: Namur (Namen)
91
+ def test_namur
92
+ parse_test('+32 81 123456', '32', '81', '123456')
93
+ end
94
+ # 082: Dinant
95
+ # 083: Ciney
96
+ # 084: Jemelle, Marche-en-Famenne
97
+ # 085: Huy
98
+ # 086: Durbuy
99
+ # 087: Verviers
100
+ # 089: Genk
101
+
102
+ # 0800: toll free service
103
+ def test_toll_free
104
+ parse_test('+32 800 12345', '32', '800', '12345')
105
+ end
106
+
107
+ # 090x: Premium numbers (0900, 0901, 0902, 0903, 0904, 0905, 0906, 0907, 0908, 0909)
108
+ def test_premium_900
109
+ parse_test('+32 900 12345', '32', '900', '12345')
110
+ end
111
+
112
+ def test_premium_901
113
+ parse_test('+32 901 12345', '32', '901', '12345')
114
+ end
115
+
116
+ end
@@ -0,0 +1,383 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+
3
+ ## Netherlands
4
+ class NETest < Test::Unit::TestCase
5
+
6
+ # 06: mobile phone number
7
+ def test_mobile
8
+ parse_test('+31 6 12345678', '31', '6', '12345678')
9
+ end
10
+
11
+ # 066: mobile pagers
12
+ def test_pagers
13
+ parse_test('+31 66 1234567', '31', '66', '1234567')
14
+ end
15
+
16
+ # 06760: internet access number
17
+ def test_internet_access
18
+ parse_test('+31 6760 12345', '31', '6760', '12345')
19
+ end
20
+
21
+ # 0800: toll free number
22
+ def test_toll_free
23
+ parse_test('+31 800 123456', '31', '800', '123456')
24
+ end
25
+
26
+ # 084: location independent (used mostly for fax-to-email and voicemail services)
27
+ def test_location_independent_84
28
+ parse_test('+31 84 1234567', '31', '84', '1234567')
29
+ end
30
+
31
+ # 085: location independent
32
+ def test_location_independent_85
33
+ parse_test('+31 85 1234567', '31', '85', '1234567')
34
+ end
35
+
36
+ # 087: location independent
37
+ def test_location_independent_87
38
+ parse_test('+31 87 1234567', '31', '87', '1234567')
39
+ end
40
+
41
+ # 088: location independent (for companies)
42
+ def test_location_independent_88
43
+ parse_test('+31 88 1234567', '31', '88', '1234567')
44
+ end
45
+
46
+ # 0878: location independent (voice over IP)
47
+ def test_location_independent_878
48
+ parse_test('+31 878 123456', '31', '878', '123456')
49
+ end
50
+
51
+ # 0900: premium rate, information
52
+ def test_premium_900
53
+ parse_test('+31 900 123456', '31', '900', '123456')
54
+ end
55
+
56
+ # 0906: premium rate, erotic
57
+ def test_premium_906
58
+ parse_test('+31 906 123456', '31', '906', '123456')
59
+ end
60
+ # 0909: premium rate, entertainment
61
+
62
+ # 112: emergency services number
63
+ # 14xxx(x): public authorities, where xxxx is the three- or four-digit area-code of the municipality
64
+ # 18xx: number information
65
+
66
+ # 01x(x) to 05x(x): geographical area codes
67
+
68
+ ## two digit
69
+ # 010 Rotterdam
70
+ def test_rotterdam
71
+ parse_test('+31 10 1234567', '31', '10', '1234567')
72
+ end
73
+ # 013 Tilburg
74
+ def test_tilburg
75
+ parse_test('+31 13 1234567', '31', '13', '1234567')
76
+ end
77
+ # 015 Delft
78
+
79
+ # 020 Amsterdam
80
+ def test_amsterdam
81
+ parse_test('+31 20 1234567', '31', '20', '1234567')
82
+ end
83
+ # 023 Haarlem
84
+ # 024 Nijmegen
85
+ # 026 Arnhem
86
+
87
+ # 030 Utrecht
88
+ def test_utrecht
89
+ parse_test('+31 30 1234567', '31', '30', '1234567')
90
+ end
91
+ # 033 Amersfoort
92
+ def test_amersfoort
93
+ parse_test('+31 33 1234567', '31', '33', '1234567')
94
+ end
95
+ # 035 Hilversum
96
+ # 036 Almere
97
+ # 038 Zwolle
98
+
99
+ # 040 Eindhoven
100
+ # 043 Maastricht
101
+ # 045 Heerlen
102
+ def test_heerlen
103
+ parse_test('+31 45 1234567', '31', '45', '1234567')
104
+ end
105
+ # 046 Sittard
106
+
107
+ # 050 Groningen
108
+ def test_groningen
109
+ parse_test('+31 50 1234567', '31', '50', '1234567')
110
+ end
111
+ # 053 Enschede
112
+ # 055 Apeldoorn
113
+ # 058 Leeuwarden
114
+ def test_leeuwarden
115
+ parse_test('+31 58 1234567', '31', '58', '1234567')
116
+ end
117
+
118
+ # 07x: geographical area codes (cities all over the country)
119
+ # 070 The Hague
120
+ def test_the_hague
121
+ parse_test('+31 70 1234567', '31', '70', '1234567')
122
+ end
123
+ # 071 Leiden
124
+ def test_leiden
125
+ parse_test('+31 71 1234567', '31', '71', '1234567')
126
+ end
127
+ # 072 Alkmaar
128
+ # 073 's-Hertogenbosch
129
+ # 074 Hengelo
130
+ # 075 Zaandam
131
+ def test_zaandam
132
+ parse_test('+31 75 1234567', '31', '75', '1234567')
133
+ end
134
+ # 076 Breda
135
+ # 077 Venlo
136
+ # 078 Dordrecht
137
+ # 079 Zoetermeer
138
+ def test_zoetermeer
139
+ parse_test('+31 79 1234567', '31', '79', '1234567')
140
+ end
141
+
142
+
143
+ ## three digit
144
+ # 0111 Zierikzee
145
+ def test_zierikzee
146
+ parse_test('+31 111 123456', '31', '111', '123456')
147
+ end
148
+ # 0113 Goes
149
+ def test_goes
150
+ parse_test('+31 113 123456', '31', '113', '123456')
151
+ end
152
+ # 0114 Hulst
153
+ # 0115 Terneuzen
154
+ # 0117 Sluis
155
+ def test_sluis
156
+ parse_test('+31 117 123456', '31', '117', '123456')
157
+ end
158
+ # 0118 Middelburg
159
+
160
+ # 0161 Gilze-Rijen
161
+ def test_gilze
162
+ parse_test('+31 161 123456', '31', '161', '123456')
163
+ end
164
+ # 0162 Oosterhout
165
+ # 0164 Bergen op Zoom
166
+ def test_bergen
167
+ parse_test('+31 164 123456', '31', '164', '123456')
168
+ end
169
+ # 0165 Roosendaal
170
+ # 0166 Tholen
171
+ # 0167 Steenbergen
172
+ # 0168 Zevenbergen
173
+
174
+ # 0172 Alphen aan den Rijn
175
+ def test_alphen
176
+ parse_test('+31 172 123456', '31', '172', '123456')
177
+ end
178
+ # 0174 Naaldwijk
179
+
180
+ # 0180 Ridderkerk
181
+ def test_ridderkerk
182
+ parse_test('+31 180 123456', '31', '180', '123456')
183
+ end
184
+ # 0181 Spijkenisse
185
+ # 0182 Gouda
186
+ def test_gouda
187
+ parse_test('+31 182 123456', '31', '182', '123456')
188
+ end
189
+ # 0183 Gorinchem
190
+ # 0184 Sliedrecht
191
+ # 0186 Oud-Beijerland
192
+ # 0187 Middelharnis
193
+
194
+ # 0222 Texel
195
+ def test_texel
196
+ parse_test('+31 222 123456', '31', '222', '123456')
197
+ end
198
+ # 0223 Den Helder
199
+ # 0224 Schagen
200
+ def test_shagen
201
+ parse_test('+31 224 123456', '31', '224', '123456')
202
+ end
203
+ # 0226 Harenkarspel
204
+ # 0227 Medemblik, Middenmeer as well as Heerhugowaard
205
+ # 0228 Enkhuizen
206
+ # 0229 Hoorn
207
+ def test_hoorn
208
+ parse_test('+31 229 123456', '31', '229', '123456')
209
+ end
210
+
211
+ # 0251 Beverwijk
212
+ def test_beverwijk
213
+ parse_test('+31 251 123456', '31', '251', '123456')
214
+ end
215
+ # 0252 Hillegom
216
+ # 0255 IJmuiden
217
+
218
+ # 0294 Weesp
219
+ def test_weesp
220
+ parse_test('+31 294 123456', '31', '294', '123456')
221
+ end
222
+ # 0297 Aalsmeer
223
+ # 0299 Purmerend
224
+
225
+ # 0313 Dieren
226
+ def test_dieren
227
+ parse_test('+31 313 123456', '31', '313', '123456')
228
+ end
229
+ # 0314 Doetinchem
230
+ # 0315 Terborg
231
+ def test_terborg
232
+ parse_test('+31 315 123456', '31', '315', '123456')
233
+ end
234
+ # 0316 Zevenaar
235
+ # 0317 Wageningen
236
+ # 0318 Ede / Veenendaal
237
+
238
+ # 0320 Lelystad
239
+ def test_lelystad
240
+ parse_test('+31 320 123456', '31', '320', '123456')
241
+ end
242
+ # 0321 Dronten
243
+
244
+ # 0341 Harderwijk
245
+ def test_harderwijk
246
+ parse_test('+31 341 123456', '31', '341', '123456')
247
+ end
248
+ # 0342 Barneveld
249
+ # 0343 Doorn
250
+ # 0344 Tiel
251
+ def test_tiel
252
+ parse_test('+31 344 123456', '31', '344', '123456')
253
+ end
254
+ # 0345 Culemborg
255
+ # 0346 Maarssen
256
+ # 0347 Vianen
257
+ # 0348 Woerden
258
+
259
+ # 0411 Boxtel
260
+ def test_boxtel
261
+ parse_test('+31 411 123456', '31', '411', '123456')
262
+ end
263
+ # 0412 Oss
264
+ # 0413 Veghel
265
+ # 0416 Waalwijk
266
+ # 0418 Zaltbommel
267
+
268
+ # 0475 Roermond
269
+ def test_roermond
270
+ parse_test('+31 475 123456', '31', '475', '123456')
271
+ end
272
+ # 0478 Venray
273
+
274
+ # 0481 Bemmel
275
+ def test_bemmel
276
+ parse_test('+31 481 123456', '31', '481', '123456')
277
+ end
278
+ # 0485 Cuijk
279
+ # 0486 Grave
280
+ # 0487 Druten
281
+ def test_druten
282
+ parse_test('+31 487 123456', '31', '487', '123456')
283
+ end
284
+ # 0488 Zetten
285
+
286
+ # 0492 Helmond
287
+ def test_helmond
288
+ parse_test('+31 492 123456', '31', '492', '123456')
289
+ end
290
+ # 0493 Deurne
291
+ # 0495 Weert
292
+ def test_weert
293
+ parse_test('+31 495 123456', '31', '495', '123456')
294
+ end
295
+ # 0497 Eersel
296
+ # 0499 Best
297
+
298
+ # 0511 Veenwouden
299
+ def test_veenwouden
300
+ parse_test('+31 511 123456', '31', '511', '123456')
301
+ end
302
+ # 0512 Drachten
303
+ # 0513 Heerenveen
304
+ # 0514 Balk
305
+ # 0515 Sneek
306
+ def test_sneek
307
+ parse_test('+31 515 123456', '31', '515', '123456')
308
+ end
309
+ # 0516 Oosterwolde
310
+ # 0517 Franeker
311
+ # 0518 St. Annaparochie
312
+ # 0519 Dokkum
313
+
314
+ # 0521 Steenwijk
315
+ def test_steenwijk
316
+ parse_test('+31 521 123456', '31', '521', '123456')
317
+ end
318
+ # 0522 Meppel
319
+ # 0523 Hardenberg
320
+ # 0524 Coevorden
321
+ def tst_coevorden
322
+ parse_test('+31 524 123456', '31', '524', '123456')
323
+ end
324
+ # 0525 Elburg
325
+ # 0527 Emmeloord
326
+ # 0528 Hoogeveen
327
+ # 0529 Ommen
328
+
329
+ # 0541 Oldenzaal
330
+ def test_oldenzaal
331
+ parse_test('+31 541 123456', '31', '541', '123456')
332
+ end
333
+ # 0543 Winterswijk
334
+ # 0544 Groenlo
335
+ # 0545 Neede
336
+ def test_neede
337
+ parse_test('+31 545 123456', '31', '545', '123456')
338
+ end
339
+ # 0546 Almelo
340
+ # 0547 Goor
341
+ # 0548 Rijssen
342
+
343
+ # 0561 Wolvega
344
+ def test_wolvega
345
+ parse_test('+31 561 123456', '31', '561', '123456')
346
+ end
347
+ # 0562 Terschelling/Vlieland
348
+ # 0566 Irnsum
349
+
350
+ # 0570 Deventer
351
+ def test_deventer
352
+ parse_test('+31 570 123456', '31', '570', '123456')
353
+ end
354
+ # 0571 Voorst
355
+ # 0572 Raalte
356
+ # 0573 Lochem
357
+ def test_lochem
358
+ parse_test('+31 573 123456', '31', '573', '123456')
359
+ end
360
+ # 0575 Zutphen
361
+ # 0577 Uddel
362
+ # 0578 Epe
363
+
364
+ # 0591 Emmen
365
+ def test_emmen
366
+ parse_test('+31 591 123456', '31', '591', '123456')
367
+ end
368
+ # 0592 Assen
369
+ # 0593 Beilen
370
+ def test_beilen
371
+ parse_test('+31 593 123456', '31', '593', '123456')
372
+ end
373
+ # 0594 Zuidhorn
374
+ # 0595 Warffum
375
+ # 0596 Appingedam
376
+ # 0597 Winschoten
377
+ # 0598 Hoogezand
378
+ # 0599 Stadskanaal
379
+ def test_stadskanaal
380
+ parse_test('+31 599 123456', '31', '599', '123456')
381
+ end
382
+
383
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elskwid-phone
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 9
10
- - 2
11
- version: 0.9.9.2
10
+ - 3
11
+ version: 0.9.9.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Tomislav Car
@@ -45,11 +45,13 @@ files:
45
45
  - test/phone_test.rb
46
46
  - test/test_helper.rb
47
47
  - test/countries/ba_test.rb
48
+ - test/countries/be_test.rb
48
49
  - test/countries/de_test.rb
49
50
  - test/countries/fr_test.rb
50
51
  - test/countries/gb_test.rb
51
52
  - test/countries/hr_test.rb
52
53
  - test/countries/hu_test.rb
54
+ - test/countries/nl_test.rb
53
55
  - test/countries/rs_test.rb
54
56
  - test/countries/se_test.rb
55
57
  - test/countries/si_test.rb
@@ -98,11 +100,13 @@ test_files:
98
100
  - test/phone_test.rb
99
101
  - test/test_helper.rb
100
102
  - test/countries/ba_test.rb
103
+ - test/countries/be_test.rb
101
104
  - test/countries/de_test.rb
102
105
  - test/countries/fr_test.rb
103
106
  - test/countries/gb_test.rb
104
107
  - test/countries/hr_test.rb
105
108
  - test/countries/hu_test.rb
109
+ - test/countries/nl_test.rb
106
110
  - test/countries/rs_test.rb
107
111
  - test/countries/se_test.rb
108
112
  - test/countries/si_test.rb