phony 2.18.1 → 2.18.3

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: 7ea8c6332f0da9d7ba47dbd4874768b5abd2bead07dcee7ccca38a0dbea2f741
4
- data.tar.gz: 48659b180852ae68bb6ae9a3277ce7403dadb3d16ac31614b73822a14b3985b9
3
+ metadata.gz: 4f999191cc1bc0a50f69f2330b8b9abacf7c27223460b27b83fa12e7921e38e3
4
+ data.tar.gz: 34262181d5b43964268f916e88e98c989b12265af7cf739e11fc45b5e0a0f293
5
5
  SHA512:
6
- metadata.gz: 29cc75cd083d90e44c3c5b98c1dad659be8160eb4859fa65b8115cbd993fe151022d18e0ac48260945b49af1d9f8fd438b065ed12221b7a9ae287a9cfd737cad
7
- data.tar.gz: b9a1676ae81bf52d122f86cc9f0e5b9333c8668c56322973d80c14d8e56785586ca81eba8daa099122d2664d4ba9adfc7d66143c9bddc33f149b47583b6f4026
6
+ metadata.gz: a8105b14ad360a98f86c85b9c9ef4e4ab616c749d6aa1ec2d09d732cce8a5cc6c0cc98a005cb7bd82f39da2e6452e48f0a4b3bb677c055b124f872cbd45d0c66
7
+ data.tar.gz: 1ab16b6d15ba9a13cfb0d72b6073b24d3009db8c60282b1d9b44321674d9db6117885e0043c6eaad721eb7bc93de514a05fbcdb59c69b6b8f1ec7c1caeeaeacb
@@ -266,7 +266,7 @@ Phony.define do
266
266
  match(/\A(2)\d{10}\z/) >> split(10) |
267
267
  one_of('2') >> split(7) |
268
268
  # mobile
269
- match(/\A(9\d\d)\d{7}\z/) >> split(7) |
269
+ match(/\A([89]\d\d)\d{7}\z/) >> split(7) |
270
270
  match(/\A(9\d\d)\d+\z/) >> split(6) |
271
271
  #
272
272
  fixed(2) >> split(7)
@@ -4021,8 +4021,9 @@ mobile_4digits = [
4021
4021
  '1520', # Vodafone
4022
4022
  '1521', # Lycamobile
4023
4023
  '1522', # Vodafone
4024
+ '1523', # Vodafone
4024
4025
  '1570', # vistream
4025
- '1527', # E-Plus
4026
+ '1577', # E-Plus
4026
4027
  '1672', # Dolphin Telecom
4027
4028
  ]
4028
4029
 
@@ -170,7 +170,7 @@ module Phony
170
170
  #
171
171
  def plausible? rest, hints = {}
172
172
  local, _, ndc, *rest = internal_split rest
173
-
173
+
174
174
  # Element based checking.
175
175
  #
176
176
  # Note: ndc == false means the country has none.
@@ -251,7 +251,7 @@ describe 'plausibility' do
251
251
  it_is_correct_for 'Gabonese Republic', :samples => '+241 1 627 739'
252
252
  it_is_correct_for 'Gambia', :samples => '+220 989 5148'
253
253
  it_is_correct_for 'Germany', :samples => [
254
- '+49 157 753 6870'
254
+ '+49 1577 536 8701'
255
255
  ]
256
256
  it_is_correct_for 'Georgia', :samples => ['+995 220 123 45',
257
257
  '+995 32 123 4567',
@@ -598,6 +598,11 @@ describe 'plausibility' do
598
598
  Phony.plausible?('+81 120 123 123').should be_truthy
599
599
  Phony.plausible?('+81 800 123 1234').should be_truthy
600
600
  end
601
+
602
+ it 'is correct for Philippine' do
603
+ Phony.plausible?('+63 976 1234567').should be_truthy # mobile phone with area code 9
604
+ Phony.plausible?('+63 876 1234567').should be_truthy # mobile phone with area code 8
605
+ end
601
606
  end
602
607
  end
603
608
  end
@@ -291,7 +291,7 @@ describe 'country descriptions' do
291
291
  it_splits '49800222340010', ['49', '800', '222', '340010'] # Service number
292
292
 
293
293
  it_splits '4915111231234', ['49', '151', '1123', '1234'] # Mobile number
294
- it_splits '4915771231234', ['49', '157', '7123', '1234'] # Mobile number
294
+ it_splits '4915771231234', ['49', '1577', '123', '1234'] # Mobile number
295
295
  it_splits '491601234567', ['49', '160', '1234', '567'] # Mobile number
296
296
  it_splits '4916312345678', ['49', '163', '1234', '5678'] # Mobile number
297
297
  it_splits '4915211231234', ['49', '1521', '123', '1234'] # Mobile number
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.18.1
4
+ version: 2.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-29 00:00:00.000000000 Z
11
+ date: 2019-06-03 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