phony 2.8.7 → 2.8.8
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 +4 -4
- data/spec/functional/plausibility_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: 63f9b8affada0832063f8369a244225ea5b41060
|
|
4
|
+
data.tar.gz: 1145b28728b76d34f16c6c9c4f3a5dc2130281f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac680a041fe7ec58da552d624d8d9b27dd2ce45bcc68094c346d5c5c2eb3146d78bbd7e9cc12df08219d75de69bf8f2eff369669bac81752b9e543254b4c1862
|
|
7
|
+
data.tar.gz: fd69c4672958e9b32aedf6e485611da06b451f51bcdbd95d69a2bfaaa3e9ece08b2e01dcc74b566f25f7377b6f5a905fc2d7cd6414c015d0f75a57064038064b
|
data/lib/phony/countries.rb
CHANGED
|
@@ -551,10 +551,10 @@ Phony.define do
|
|
|
551
551
|
# Portugal.
|
|
552
552
|
#
|
|
553
553
|
country '351',
|
|
554
|
-
|
|
555
|
-
match(/^(9\d)\d+$/) >> split(3,4)
|
|
556
|
-
one_of('21', '22') >> split(3,4)
|
|
557
|
-
fixed(3) >> split(3,
|
|
554
|
+
match(/^([78]\d\d)\d+$/) >> split(3,3) | # Service.
|
|
555
|
+
match(/^(9\d)\d+$/) >> split(3,4) | # Mobile.
|
|
556
|
+
one_of('21', '22') >> split(3,4) | # Lisboa & Porto
|
|
557
|
+
fixed(3) >> split(3,3) # 3-digit NDCs
|
|
558
558
|
|
|
559
559
|
# Luxembourg
|
|
560
560
|
#
|
|
@@ -460,7 +460,8 @@ describe 'plausibility' do
|
|
|
460
460
|
Phony.plausible?('+351 800 123456').should be_true
|
|
461
461
|
Phony.plausible?('+351 90 1234567').should be_true
|
|
462
462
|
Phony.plausible?('+351 90 123456').should be_false
|
|
463
|
-
Phony.plausible?('+351 123
|
|
463
|
+
Phony.plausible?('+351 123 123456').should be_true
|
|
464
|
+
Phony.plausible?('+351 123 1234567').should be_false
|
|
464
465
|
end
|
|
465
466
|
|
|
466
467
|
it "is correct for Russia" do
|
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.8
|
|
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-15 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
|