phony 2.19.9 → 2.19.10

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
  SHA256:
3
- metadata.gz: 30b195be2f2aafc2cda3d6f6f32f1f8b5c5af7dc11d63e03cb329fb4fdf40556
4
- data.tar.gz: 6f4cc992009707e109eb9c50efea3b6c38fd2c7452434d23aa44b401559ffd1c
3
+ metadata.gz: d8e8c59adf885678317d72197e37fc237635f43e83bdc49b3162dc0226142185
4
+ data.tar.gz: fae6cff7e1fb009729a6098c69b76dd95f51596cac3c6ac1006562bd8759cdfd
5
5
  SHA512:
6
- metadata.gz: 77892f621ff0ad9455ad7eabaf6a8f2beee67f79fc09ade1913295c92f649e4c5790a5dc6336a32cb095f136b0bf46c2f9a1582f196ee8a988d4465ea1640a02
7
- data.tar.gz: 6f585de726af1584d89eeec8dd41e6dbb25cf740acf144149ada1a8bd5d461149c8eea341629fe0746fbecfecab38990eb0dc5b992efe7c94832fae6472c41f4
6
+ metadata.gz: c75466301cd92d29728be0570c9c300697fa0c7c1ea00143420af3f4b5c2e6bd10d9e39bbe4327946be6703bef773ad36df9328fdb7bb8838647726352d6b0af
7
+ data.tar.gz: 38ffb42f3b733f312b83b9d37d7e5f678836fd4be25b611f73d6465198491508ba14352a77687f3db4507ba44de3ef61a8cd2d1fc30b94df2946587b42c4e5bd
@@ -280,6 +280,7 @@ Phony.define do
280
280
  /^[^1]\d{6}$/ => [7]
281
281
  ) |
282
282
  one_of(*ndcs_4digit) >> matched_split(
283
+ /\A\d{4}\z/ => [4],
283
284
  /^1\d{5}$/ => [6],
284
285
  /^1\d{6}$/ => [7],
285
286
  /^[^1]\d{4}$/ => [5],
@@ -111,6 +111,6 @@ Phony.define do
111
111
  one_of(ndcs_with_5_subscriber_numbers) >> split(3,2) |
112
112
  one_of(ndcs_with_6_subscriber_numbers) >> split(3,3) |
113
113
  one_of(ndcs_with_7_subscriber_numbers) >> split(4,3) |
114
- one_of(%w(91 92)) >> split(4,3) | # mobile
114
+ one_of(%w(91 92 94 95)) >> split(4,3) | # mobile
115
115
  fixed(2) >> split(3,3)
116
116
  end
@@ -280,6 +280,7 @@ describe 'plausibility' do
280
280
  it_is_correct_for 'Guinea-Bissau', :samples => '+245 44 728 6998'
281
281
  it_is_correct_for 'Guyana', :samples => '+592 263 1234'
282
282
  it_is_correct_for 'Honduras (Republic of)', :samples => '+504 12 961 637'
283
+ it_is_correct_for 'Italy', :samples => ['+39 0574 1234']
283
284
  it_is_correct_for 'Iraq', :samples => ['+964 1 123 4567',
284
285
  '+964 21 113 456',
285
286
  '+964 71 1234 5678']
@@ -516,7 +517,10 @@ describe 'plausibility' do
516
517
  it_is_correct_for 'Lybia', :samples => ['+218 205 123 45',
517
518
  '+218 22 123 456',
518
519
  '+218 21 1234 456',
519
- '+218 91 1234 456']
520
+ '+218 91 1234 456',
521
+ '+218 92 1234 456',
522
+ '+218 94 1234 456',
523
+ '+218 95 1234 456']
520
524
  it_is_correct_for 'Mongolia', :samples => ['+976 11 123 45',
521
525
  ['+976 121 12 34', '+976 121 12 345'],
522
526
  '+976 70 123 456',
@@ -470,6 +470,7 @@ describe 'country descriptions' do
470
470
  it_splits '3903123391', ['39', '031', '23391'] # Como
471
471
  it_splits '390909709511', ['39', '090', '9709511'] # Barcellona
472
472
  it_splits '390471811353', ['39', '0471', '811', '353'] # Bolzano
473
+ it_splits '3905745730', ['39', '0574', '5730'] # Prato
473
474
  end
474
475
  describe 'Japan' do
475
476
  it_splits '81312345678', %w(81 3 1234 5678) # Tokyo
@@ -1052,6 +1053,8 @@ describe 'country descriptions' do
1052
1053
  it_splits '21822123456', %w(218 22 123 456)
1053
1054
  it_splits '218211234456', %w(218 21 1234 456)
1054
1055
  it_splits '218911234456', %w(218 91 1234 456)
1056
+ it_splits '218941234456', %w(218 94 1234 456)
1057
+ it_splits '218951234456', %w(218 95 1234 456)
1055
1058
  end
1056
1059
  describe 'Madagascar' do
1057
1060
  it_splits '261202254716', ['261', '20', *%w(22 547 16)]
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.19.9
4
+ version: 2.19.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-03-30 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.1.6
118
+ rubygems_version: 3.0.3
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Fast international phone number (E164 standard) normalizing, splitting and