phony 2.20.3 → 2.20.5

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: 27443f0af2d18a25a1b9056a1a09e77dffd8e8669346d974a3970cdfe9931ee4
4
- data.tar.gz: b5d22d65bb38fcb66b8f966716e5a5ee582d272a53b418b3ed20070ce90a74c1
3
+ metadata.gz: 443ce0ac52dcde0ab0b419d6c49123ac60fdb6525ce56df52c09102b2a1b79af
4
+ data.tar.gz: 3db5d454a9c112ad429b1c0986379bae3230685bcc795aaedf5c0f7feba2a902
5
5
  SHA512:
6
- metadata.gz: 5ee83977f8d9f5b8ccbcbbea65976ff20456fd35f4adca206e91b9efe4838cf80bef3a15b8cd837e093f4cfedca43a757e7ecd2c941abae9d08c0d54f217c930
7
- data.tar.gz: 30760e746ca05cadc07b41e404507537a18f516938b9701a18ecedd6a56d14f9f1eb39eee754d8121679e7217514be356f250292a7d7a9bad7a89efcc98168c4
6
+ metadata.gz: c0081748a294e804a1e1870dc40bc9e4359733f25f54e73dbbf2ad7fd01661af91e6724fa550dc61a29f4ff0c2f3b2b9161160657c852493e63afbdc839f7ae7
7
+ data.tar.gz: 0f371abf103cd53b85093973e96cbf3ae91d9d44b3e4e1b7db51826ce2a9f818252d9774cdd81abcdcf5f893dd696cf2649b70a0e7960164e8f02b4ca8618088
@@ -920,7 +920,14 @@ Phony.define do
920
920
  )
921
921
 
922
922
  country '671', todo # Spare code
923
- country '672', todo # Australian External Territories
923
+
924
+ # Australian External Territories https://en.wikipedia.org/wiki/Telephone_numbers_in_Norfolk_Island
925
+ # Norfolk Island
926
+ country '672',
927
+ fixed(1) >> split(2,3) |
928
+ match(/^(2\d+)$/) >> split(3) | # Fixed
929
+ match(/^(5\d+)$/) >> split(3) # Mobile
930
+
924
931
  country '673', fixed(1) >> split(3, 3) # Brunei Darussalam http://www.wtng.info/wtng-673-bn.html
925
932
  country '674', none >> split(3, 4) # Nauru (Republic of) http://www.wtng.info/wtng-674-nr.html
926
933
 
@@ -992,7 +999,7 @@ Phony.define do
992
999
  /\A\d+\z/ => [2,3] # geographic
993
1000
  )
994
1001
 
995
- country '686', none >> split(2,3) # Kiribati (Republic of) http://www.wtng.info/wtng-686-ki.html
1002
+ country '686', none >> split(8) # Kiribati (Republic of) https://www.numberingplans.com/?page=plans&sub=phonenr&alpha_2_input=KI
996
1003
  country '687', none >> split(3,3) # New Caledonia (Territoire français d'outre-mer) http://www.wtng.info/wtng-687-nc.html
997
1004
  country '688', none >> split(5) # Tuvalu http://www.wtng.info/wtng-688-tv.html
998
1005
  country '689', none >> split(2,2,2,2) # French Polynesia (Territoire français d'outre-mer) http://www.wtng.info/wtng-689-pf.html
@@ -293,7 +293,7 @@ describe 'plausibility' do
293
293
  '+964 71 1234 5678']
294
294
 
295
295
 
296
- it_is_correct_for 'Kiribati (Republic of)', :samples => '+686 31993'
296
+ it_is_correct_for 'Kiribati (Republic of)', :samples => '+686 34814527'
297
297
  it_is_correct_for "Democratic People's Republic of Korea", :samples => ['+850 2 123 45',
298
298
  '+850 2 123 456 789',
299
299
  '+850 2 381 2356',
@@ -593,6 +593,10 @@ describe 'country descriptions' do
593
593
  it_splits '31222123456', ['31', '222', '123', '456']
594
594
  it_splits '3197012345678', ['31', '970', '1234', '5678'] # machine-to-machine
595
595
  end
596
+ describe 'Norfolk Island' do
597
+ it_splits '672321234', ['672', '3', '21', '234'] # fixed
598
+ it_splits '672351234', ['672', '3', '51', '234'] # mobile
599
+ end
596
600
  describe 'Norway' do
597
601
  it_splits '4721234567', ['47',false,'21','23','45','67']
598
602
  it_splits '4731234567', ['47',false,'31','23','45','67']
@@ -872,6 +876,7 @@ describe 'country descriptions' do
872
876
  end
873
877
  describe 'Burkina Faso' do
874
878
  it_splits '22667839323', ['226', false, '67', '83', '93', '23']
879
+ it_splits '22601234567', ['226', false, '01', '23', '45', '67'] # 0 not removed.
875
880
  end
876
881
  describe 'Burundi' do
877
882
  it_splits '25712345678', ['257', false, '1234', '5678']
@@ -1012,7 +1017,7 @@ describe 'country descriptions' do
1012
1017
  it_splits '96287901456', %w(962 8790 1456)
1013
1018
  end
1014
1019
  describe 'Kiribati (Republic of)' do
1015
- it_splits '68634814', ['686', false, '34', '814']
1020
+ it_splits '68634814527', ['686', false, '34814527']
1016
1021
  end
1017
1022
  describe "Democratic People's Republic of Korea" do
1018
1023
  it_splits '850212345', %w(850 2 123 45)
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.3
4
+ version: 2.20.5
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-04-18 00:00:00.000000000 Z
11
+ date: 2023-05-06 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