phony 2.18.17 → 2.18.18
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 +1 -0
- data/spec/lib/phony/countries_spec.rb +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35e5d35fc8879631ec6f0602d0d5cb1e006790c2332a8f4ff536066bc2a5f3c4
|
|
4
|
+
data.tar.gz: 302dbb2edb99ea91db4556161535c28b38d66726e1899197d8396baa41eec63f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e87c3f22321a3c86093f607ee00316ad0ff4fae588f309bd8ff8b609a125deda1199fe1db5b53f166a318aeaa46704eecf8f70ec53de1c97402e7c8ba8eb44b
|
|
7
|
+
data.tar.gz: d9a68e78d43829f1f7e7b42602adee5cc3c3c57ad83aa8b879e55fa7e75136a54b34ed7e5f73e5fe0651bc7cfdc1e0f12f5d6497609ad10f8571092f7c7c7f81
|
data/lib/phony/countries.rb
CHANGED
|
@@ -397,6 +397,7 @@ Phony.define do
|
|
|
397
397
|
country '234',
|
|
398
398
|
match(/^([7-9]0\d)\d+$/) >> split(3,4) | # Mobile
|
|
399
399
|
match(/^(81\d)\d+$/) >> split(3,4) | # Mobile
|
|
400
|
+
match(/^(91\d)\d+$/) >> split(3,4) | # Mobile
|
|
400
401
|
one_of('1', '2') >> split(3,3..4) | # Lagos, Ibadan
|
|
401
402
|
one_of('9') >> split(3,4) | # Abuja
|
|
402
403
|
one_of((30..79).map(&:to_s)) >> split(3,2..3) | # 2-digit NDC
|
|
@@ -1164,6 +1164,17 @@ describe 'country descriptions' do
|
|
|
1164
1164
|
it_splits '2349087661234', %w(234 908 766 1234)
|
|
1165
1165
|
it_splits '2349097661234', %w(234 909 766 1234)
|
|
1166
1166
|
|
|
1167
|
+
it_splits '2349107661234', %w(234 910 766 1234)
|
|
1168
|
+
it_splits '2349117661234', %w(234 911 766 1234)
|
|
1169
|
+
it_splits '2349127661234', %w(234 912 766 1234)
|
|
1170
|
+
it_splits '2349137661234', %w(234 913 766 1234)
|
|
1171
|
+
it_splits '2349147661234', %w(234 914 766 1234)
|
|
1172
|
+
it_splits '2349157661234', %w(234 915 766 1234)
|
|
1173
|
+
it_splits '2349167661234', %w(234 916 766 1234)
|
|
1174
|
+
it_splits '2349177661234', %w(234 917 766 1234)
|
|
1175
|
+
it_splits '2349187661234', %w(234 918 766 1234)
|
|
1176
|
+
it_splits '2349197661234', %w(234 919 766 1234)
|
|
1177
|
+
|
|
1167
1178
|
it_splits '2348107661234', %w(234 810 766 1234)
|
|
1168
1179
|
it_splits '2348117661234', %w(234 811 766 1234)
|
|
1169
1180
|
it_splits '2348127661234', %w(234 812 766 1234)
|