phony 2.20.5 → 2.20.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 443ce0ac52dcde0ab0b419d6c49123ac60fdb6525ce56df52c09102b2a1b79af
4
- data.tar.gz: 3db5d454a9c112ad429b1c0986379bae3230685bcc795aaedf5c0f7feba2a902
3
+ metadata.gz: 68617b6bf80b10f9dbd64feb4f49ddab596b15b764fd61055879463dd06c5718
4
+ data.tar.gz: 5baed629ebf5d0d5a41f2591b69b96b0626e43fe9a4f5f1ee1db5dc4cd16dd61
5
5
  SHA512:
6
- metadata.gz: c0081748a294e804a1e1870dc40bc9e4359733f25f54e73dbbf2ad7fd01661af91e6724fa550dc61a29f4ff0c2f3b2b9161160657c852493e63afbdc839f7ae7
7
- data.tar.gz: 0f371abf103cd53b85093973e96cbf3ae91d9d44b3e4e1b7db51826ce2a9f818252d9774cdd81abcdcf5f893dd696cf2649b70a0e7960164e8f02b4ca8618088
6
+ metadata.gz: 9a91e3ec9440a6ac196dc558ec872b05f595d4b8907f50ad6ef42b23b5fb1f772aaf5a6a330e7f03e003b02df12115774d7f91eba7148e639e2d96f95816526c
7
+ data.tar.gz: f7e0faa6c2372c54920dc7405e78c0635884f373775141375d8254df612026b5571a86b19011e475405260d2b498b465e6a583e6c9f0b0aeb4856c4f57af3a52
data/README.textile CHANGED
@@ -104,7 +104,7 @@ For example, when just loading the NANP CC, the retained memory usage is ~63kB.
104
104
 
105
105
  h2. List of Handled Countries
106
106
 
107
- Mildly unmaintained list: Abhas, Afghan, Algerian, Argentina, Austrian, Australian, Azerbaijani, Belgian, Brazilian, Cambodian, Chilean, Chinese, Croatian, Cuban, Cypriot, Czech, Danish, Dutch, Egyptian, El Salvadorian, Estonian, French, German, Ghanan, Gibraltar, Greek, Haiti, Hong Kong, Hungarian, Indian, Iran, Irish, Israel, Italian, Japanese, Kazakh, Liberian, Lithuanian, Luxembourgian, Malaysian, Malta, Mexican, Monaco, Morocco, New Zealand, Nigerian, Norwegian, Peruvian, Polish, Romanian, Russian, Rwandan, Seychelles, Singapore, Slovakian, South African, South Korean, South Osetian, Spanish, Sri Lankan, Sudan, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, Venezuelan, Vietnamese, and Zambian numbers.
107
+ Mildly unmaintained list: Abhas, Afghan, Algerian, Argentina, Austrian, Australian, Azerbaijani, Belgian, Brazilian, Cambodian, Chilean, Chinese, Croatian, Cuban, Cypriot, Czech, Danish, Dutch, Egyptian, El Salvadorian, Estonian, French, German, Ghanan, Gibraltar, Greek, Haiti, Hong Kong, Hungarian, Indian, Iran, Irish, Israel, Italian, Japanese, Kazakh, Liberian, Lithuanian, Luxembourgian, Malaysian, Malta, Mauritian, Mexican, Monaco, Morocco, New Zealand, Nigerian, Norwegian, Peruvian, Polish, Romanian, Russian, Rwandan, Seychelles, Singapore, Slovakian, South African, South Korean, South Osetian, Spanish, Sri Lankan, Sudan, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, Venezuelan, Vietnamese, and Zambian numbers.
108
108
 
109
109
  h2. Proud Sponsors
110
110
 
@@ -376,7 +376,16 @@ Phony.define do
376
376
  country '228', none >> split(4,4) # Togolese Republic http://www.wtng.info/wtng-228-tg.html
377
377
  country '229', none >> split(4,4) # Benin http://www.itu.int/oth/T0202000017/en
378
378
 
379
- country '230', none >> split(4,4) # Mauritius http://www.wtng.info/wtng-230-mu.html
379
+ # Mauritius
380
+ # http://www.wtng.info/wtng-230-mu.html
381
+ # https://en.wikipedia.org/wiki/Telephone_numbers_in_Mauritius
382
+ #
383
+ # There is no trunk code for this country.
384
+ country '230',
385
+ none >> matched_split(
386
+ /^5\d{7}$/ => [1,3,4], # Mobile
387
+ /^[246]\d{6}$/ => [3,4], # Landline
388
+ )
380
389
 
381
390
  # Liberia
382
391
  # https://www.numberingplans.com/?page=plans&sub=phonenr&alpha_2_input=LR
@@ -355,7 +355,8 @@ describe 'plausibility' do
355
355
  it_is_correct_for 'Marshall Islands (Republic of the)', :samples => '+692 372 7183'
356
356
  it_is_correct_for 'Martinique (French Department of)', :samples => '+596 596 123 456'
357
357
  it_is_correct_for 'Mauritania', :samples => '+222 1234 5678'
358
- it_is_correct_for 'Mauritius', :samples => '+230 5695 2277'
358
+ it_is_correct_for 'Mauritius', :samples => ['+230 5 695 2277',
359
+ '+230 260 0070']
359
360
  it_is_correct_for 'Micronesia (Federated States of)', :samples => '+691 766 7914'
360
361
  it_is_correct_for 'Moldova', :samples => ['+373 800 123 45',
361
362
  '+373 22 123 345',
@@ -1090,7 +1090,8 @@ describe 'country descriptions' do
1090
1090
  it_splits '22212345678', ['222', false, '1234', '5678']
1091
1091
  end
1092
1092
  describe 'Mauritius' do
1093
- it_splits '23059518919', ['230', false, '5951', '8919']
1093
+ it_splits '23059518919', ['230', false, '5', '951', '8919']
1094
+ it_splits '2302600070', ['230', false, '260', '0070']
1094
1095
  end
1095
1096
  describe 'Micronesia (Federated States of)' do
1096
1097
  it_splits '6911991754', ['691', false, '199', '1754']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.5
4
+ version: 2.20.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-06 00:00:00.000000000 Z
11
+ date: 2023-08-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Fast international phone number (E164 standard) normalizing, splitting
14
14
  and formatting. Lots of formatting options: International (+.., 00..), national
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.3.26
118
+ rubygems_version: 3.4.14
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Fast international phone number (E164 standard) normalizing, splitting and