phonie 3.1.12 → 3.1.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b02f64163737c849b8fede3e9d4e88a9d39ef6d
4
- data.tar.gz: 8c7ea1f1d92601eff986422d8db0e1d59bdd9f20
3
+ metadata.gz: 15de8d87ac4c7994dadd9a234787ef42beb68517
4
+ data.tar.gz: 34d1d1a018ad44593f5df559408224ee66d3e2a0
5
5
  SHA512:
6
- metadata.gz: 69f76f8f160aed2a8158e86f0dc8798c6e774a68387a321fb6084aa229aed8b45cbf369cfc3844f1f33e3f50d7c8fa2888bd344b6e13b2bc0ccb3cb2ab4a0c3a
7
- data.tar.gz: 289c2ca6a9bb502970bf7e75bd5db3ffde4459be8af56910618bbec817180c83a56188c38eaa584a1365706ed83fc8ad205d2e3cc8f2e93ed12777035a0f2cb6
6
+ metadata.gz: 62e646feaf55f0126c68341a86e81e3361ac7343c7ab9669b6f32ba9b6ec1bf22f9f0fc808438e8b7355726083921c51f4f5f787676c4b9afbb522ee974c8fcf
7
+ data.tar.gz: c3ab61534a2b4383b54e98268b8b9b1e1e92dfeae41f9f1ff57573531cf8fc2a39f91ab445dc2ae189a849b76313721120df5b8d18e3b15a96edf3cb4f073ff3
data/Changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ 3.1.13
2
+ ======
3
+
4
+ * Adds support for MY. (Thanks @dramalho!)
5
+ * Add 07341 numbers to UK (Thanks @ijpiantanida!)
6
+
1
7
  3.1.12
2
8
  ======
3
9
 
data/Readme.rdoc CHANGED
@@ -160,6 +160,7 @@ Currently tested on:
160
160
  [ME] Montenegro
161
161
  [MT] Malta
162
162
  [MX] Mexico
163
+ [MY] Malaysia
163
164
  [NG] Nigeria
164
165
  [NI] Nicaragua
165
166
  [NL] Netherlands
@@ -562,6 +562,10 @@
562
562
  :iso_3166_code: MY
563
563
  :name: Malaysia
564
564
  :international_dialing_prefix: '00'
565
+ :mobile_format: '1\d{7,9}'
566
+ :number_format: '\d{6,10}'
567
+ :local_number_format: '\d{6,8}'
568
+ :area_code: '[2-7,9]{1}|[1,8]\d{1}'
565
569
  -
566
570
  :country_code: '966'
567
571
  :national_dialing_prefix: '0'
@@ -1501,7 +1505,7 @@
1501
1505
  :iso_3166_code: GB
1502
1506
  :name: United Kingdom
1503
1507
  :international_dialing_prefix: '00'
1504
- :area_code: 2[03489]|11[3-8]|1[2-69]1|1(3873|5(242|39[456])|697[347]|768[347]|9467)|1[2-9]\d{2}|3[0347]\d|500|5[56]|70|7([45789]\d{2}|624)|8(0[08]|4[2-5]|7[0-3])|9[018]\d
1508
+ :area_code: 2[03489]|11[3-8]|1[2-69]1|1(3873|5(242|39[456])|697[347]|768[347]|9467)|1[2-9]\d{2}|3[0347]\d|500|5[56]|70|7([45789]\d{2}|624|341)|8(0[08]|4[2-5]|7[0-3])|9[018]\d
1505
1509
  :local_number_format: \d{4,8}
1506
1510
  :mobile_format: '7[1-9]\d{8}'
1507
1511
  :number_format: \d{9,10}
@@ -1,3 +1,3 @@
1
1
  module Phonie
2
- VERSION = '3.1.12'
2
+ VERSION = '3.1.13'
3
3
  end
@@ -0,0 +1,14 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+
3
+ ## Malaysia
4
+ class MYTest < Phonie::TestCase
5
+ def test_local
6
+ parse_test('+60392218081', '60', '3', '92218081', 'Malaysia', false)
7
+ end
8
+
9
+ def test_mobile
10
+ parse_test('+60196681162', '60', '19', '6681162', 'Malaysia', true)
11
+ parse_test('+601118788037', '60', '11', '18788037', 'Malaysia', true)
12
+ end
13
+
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phonie
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.12
4
+ version: 3.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomislav Car
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-07-03 00:00:00.000000000 Z
15
+ date: 2015-10-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activemodel
@@ -174,6 +174,7 @@ files:
174
174
  - test/countries/mt_test.rb
175
175
  - test/countries/mu_test.rb
176
176
  - test/countries/mx_test.rb
177
+ - test/countries/my_test.rb
177
178
  - test/countries/ng_test.rb
178
179
  - test/countries/ni_test.rb
179
180
  - test/countries/nl_test.rb
@@ -235,8 +236,120 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
236
  version: '0'
236
237
  requirements: []
237
238
  rubyforge_project:
238
- rubygems_version: 2.2.2
239
+ rubygems_version: 2.4.5.1
239
240
  signing_key:
240
241
  specification_version: 4
241
242
  summary: Phone number parsing, validation and formatting
242
- test_files: []
243
+ test_files:
244
+ - test/countries/ae_test.rb
245
+ - test/countries/af_test.rb
246
+ - test/countries/al_test.rb
247
+ - test/countries/am_test.rb
248
+ - test/countries/ar_test.rb
249
+ - test/countries/at_test.rb
250
+ - test/countries/au_test.rb
251
+ - test/countries/az_test.rb
252
+ - test/countries/ba_test.rb
253
+ - test/countries/bd_test.rb
254
+ - test/countries/be_test.rb
255
+ - test/countries/bf_test.rb
256
+ - test/countries/bg_test.rb
257
+ - test/countries/bo_test.rb
258
+ - test/countries/br_test.rb
259
+ - test/countries/bs_test.rb
260
+ - test/countries/bt_test.rb
261
+ - test/countries/by_test.rb
262
+ - test/countries/bz_test.rb
263
+ - test/countries/ca_test.rb
264
+ - test/countries/ch_test.rb
265
+ - test/countries/cl_test.rb
266
+ - test/countries/cn_test.rb
267
+ - test/countries/co_test.rb
268
+ - test/countries/cr_test.rb
269
+ - test/countries/cy_test.rb
270
+ - test/countries/cz_test.rb
271
+ - test/countries/de_test.rb
272
+ - test/countries/dk_test.rb
273
+ - test/countries/dz_test.rb
274
+ - test/countries/ec_test.rb
275
+ - test/countries/ee_test.rb
276
+ - test/countries/eg_test.rb
277
+ - test/countries/es_test.rb
278
+ - test/countries/et_test.rb
279
+ - test/countries/fi_test.rb
280
+ - test/countries/fr_test.rb
281
+ - test/countries/gb_test.rb
282
+ - test/countries/ge_test.rb
283
+ - test/countries/gf_test.rb
284
+ - test/countries/gh_test.rb
285
+ - test/countries/gr_test.rb
286
+ - test/countries/gt_test.rb
287
+ - test/countries/gu_test.rb
288
+ - test/countries/gy_test.rb
289
+ - test/countries/hk_test.rb
290
+ - test/countries/hr_test.rb
291
+ - test/countries/ht_test.rb
292
+ - test/countries/hu_test.rb
293
+ - test/countries/id_test.rb
294
+ - test/countries/ie_test.rb
295
+ - test/countries/il_test.rb
296
+ - test/countries/in_test.rb
297
+ - test/countries/iq_test.rb
298
+ - test/countries/ir_test.rb
299
+ - test/countries/is_test.rb
300
+ - test/countries/it_test.rb
301
+ - test/countries/jp_test.rb
302
+ - test/countries/ke_test.rb
303
+ - test/countries/kh_text.rb
304
+ - test/countries/km_test.rb
305
+ - test/countries/kr_test.rb
306
+ - test/countries/kw_test.rb
307
+ - test/countries/lk_test.rb
308
+ - test/countries/lt_test.rb
309
+ - test/countries/lu_test.rb
310
+ - test/countries/lv_test.rb
311
+ - test/countries/ma_test.rb
312
+ - test/countries/me_test.rb
313
+ - test/countries/mt_test.rb
314
+ - test/countries/mu_test.rb
315
+ - test/countries/mx_test.rb
316
+ - test/countries/my_test.rb
317
+ - test/countries/ng_test.rb
318
+ - test/countries/ni_test.rb
319
+ - test/countries/nl_test.rb
320
+ - test/countries/no_test.rb
321
+ - test/countries/np_test.rb
322
+ - test/countries/nz_test.rb
323
+ - test/countries/ph_test.rb
324
+ - test/countries/pk_test.rb
325
+ - test/countries/pl_test.rb
326
+ - test/countries/pr_test.rb
327
+ - test/countries/pt_test.rb
328
+ - test/countries/qa_test.rb
329
+ - test/countries/ro_test.rb
330
+ - test/countries/rs_test.rb
331
+ - test/countries/ru_test.rb
332
+ - test/countries/sa_test.rb
333
+ - test/countries/se_test.rb
334
+ - test/countries/sg_test.rb
335
+ - test/countries/si_test.rb
336
+ - test/countries/sk_test.rb
337
+ - test/countries/sn_test.rb
338
+ - test/countries/sv_test.rb
339
+ - test/countries/th_test.rb
340
+ - test/countries/tn_test.rb
341
+ - test/countries/to_test.rb
342
+ - test/countries/tr_test.rb
343
+ - test/countries/tt_test.rb
344
+ - test/countries/tw_test.rb
345
+ - test/countries/ua_test.rb
346
+ - test/countries/us_test.rb
347
+ - test/countries/uy_test.rb
348
+ - test/countries/vn_test.rb
349
+ - test/countries/za_test.rb
350
+ - test/countries/zw_test.rb
351
+ - test/country_test.rb
352
+ - test/extension_test.rb
353
+ - test/phone_test.rb
354
+ - test/railties/validator_test.rb
355
+ - test/test_helper.rb