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 +4 -4
- data/lib/phony/countries.rb +8 -1
- data/spec/functional/plausibility_spec.rb +2 -1
- data/spec/lib/phony/countries_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd8cbfadedb2800791fcac55bacbd9b2ef09ab13
|
|
4
|
+
data.tar.gz: 202911c35b494806e41e00e5717bf4147912694e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7804bf547d723df7106f1e10a0d3b1dbcc0ab665a0066729ba75c47944de22d8233dec5e19bb205d477a16b8792a7b0f753cae32930e8f6ee67da5cc1f314aa2
|
|
7
|
+
data.tar.gz: 52efca5ffa5152fc6050071a0f47bea7c6d578dc91a53d5415b7ccd0eaeba1c89d53af6d00c571b509792c3f95f62b2f22d9ac048a92eec120f141667afbb868
|
data/lib/phony/countries.rb
CHANGED
|
@@ -1002,7 +1002,14 @@ Phony.define do
|
|
|
1002
1002
|
/\A8\d+\z/ => [3,3], # geographic
|
|
1003
1003
|
)
|
|
1004
1004
|
|
|
1005
|
-
|
|
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
|
|
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 '
|
|
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.
|
|
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-
|
|
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
|