phony 2.8.8 → 2.8.9

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: 63f9b8affada0832063f8369a244225ea5b41060
4
- data.tar.gz: 1145b28728b76d34f16c6c9c4f3a5dc2130281f7
3
+ metadata.gz: fd8cbfadedb2800791fcac55bacbd9b2ef09ab13
4
+ data.tar.gz: 202911c35b494806e41e00e5717bf4147912694e
5
5
  SHA512:
6
- metadata.gz: ac680a041fe7ec58da552d624d8d9b27dd2ce45bcc68094c346d5c5c2eb3146d78bbd7e9cc12df08219d75de69bf8f2eff369669bac81752b9e543254b4c1862
7
- data.tar.gz: fd69c4672958e9b32aedf6e485611da06b451f51bcdbd95d69a2bfaaa3e9ece08b2e01dcc74b566f25f7377b6f5a905fc2d7cd6414c015d0f75a57064038064b
6
+ metadata.gz: 7804bf547d723df7106f1e10a0d3b1dbcc0ab665a0066729ba75c47944de22d8233dec5e19bb205d477a16b8792a7b0f753cae32930e8f6ee67da5cc1f314aa2
7
+ data.tar.gz: 52efca5ffa5152fc6050071a0f47bea7c6d578dc91a53d5415b7ccd0eaeba1c89d53af6d00c571b509792c3f95f62b2f22d9ac048a92eec120f141667afbb868
@@ -1002,7 +1002,14 @@ Phony.define do
1002
1002
  /\A8\d+\z/ => [3,3], # geographic
1003
1003
  )
1004
1004
 
1005
- country '966', fixed(1) >> split(3, 4) # Saudi Arabia (Kingdom of) http://www.wtng.info/wtng-966-sa.html
1005
+ # Saudi Arabia (Kingdom of)
1006
+ # http://www.wtng.info/wtng-966-sa.html
1007
+ # http://www.citc.gov.sa/English/MediaCenter/awarenesscampaigns/Pages/PR_AWR_004.aspx
1008
+ # http://en.wikipedia.org/wiki/Telephone_numbers_in_Saudi_Arabia
1009
+ # https://answers.yahoo.com/question/index?qid=20090303142622AAQBoZ0
1010
+ country '966',
1011
+ match(/\A(5[0-9])\d+\z/) >> split(3,4) | # mobile numbers
1012
+ fixed(3) >> split(3,4)
1006
1013
 
1007
1014
  # Yemen (Republic of)
1008
1015
  # https://www.numberingplans.com/?page=dialling&sub=areacodes
@@ -777,7 +777,8 @@ describe 'plausibility' do
777
777
  '+378 512 345 6789']
778
778
  it_is_correct_for 'Sao Tome and Principe', :samples => ['+239 2 220 012',
779
779
  '+239 9 920 012']
780
- it_is_correct_for 'Saudi Arabia (Kingdom of)', :samples => '+966 5 296 3727'
780
+ it_is_correct_for 'Saudi Arabia (Kingdom of)', :samples => ['+966 50 296 3727',
781
+ '+966 011 307 4838']
781
782
  it_is_correct_for 'Senegal', :samples => '+221 1234 56789'
782
783
  it_is_correct_for 'Serbia', :samples => ['+381 800 123 45',
783
784
  ['+381 10 123 45', '+381 10 123 456'],
@@ -992,7 +992,8 @@ describe 'country descriptions' do
992
992
  it_splits '3785123456789', ['378', false, '512', '345', '6789']
993
993
  end
994
994
  describe 'Saudi Arabia (Kingdom of)' do
995
- it_splits '96628528423', %w(966 2 852 8423)
995
+ it_splits '9660208528423', %w(966 020 852 8423)
996
+ it_splits '966506306201', %w(966 50 630 6201)
996
997
  end
997
998
  describe 'Senegal' do
998
999
  it_splits '221123456789', ['221', false, '1234', '56789']
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.8.8
4
+ version: 2.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-15 00:00:00.000000000 Z
11
+ date: 2014-12-17 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